Skip to main content
Glama
EricSeokgon

egovframe-scaffold-mcp

by EricSeokgon

보안약점 점검 (개발보안 가이드)

check_egovframe_secure_coding
Idempotent

행정안전부·KISA 「소프트웨어 개발보안 가이드」(2021) 구현단계 보안약점 중 정적 패턴으로 오탐을 통제할 수 있는 항목을 소스에서 찾습니다 — SQL 삽입(MyBatis ${…}·iBATIS $…$·JDBC 문자열 연결), 크로스사이트 스크립트(요청 값·EL param/header/cookie 무이스케이프 출력, <c:out escapeXml="false">), 경로 조작, 신뢰되지 않는 URL 자동접속, 운영체제…

Instructions

행정안전부·KISA 「소프트웨어 개발보안 가이드」(2021) 구현단계 보안약점 중 정적 패턴으로 오탐을 통제할 수 있는 항목을 소스에서 찾습니다 — SQL 삽입(MyBatis ${…}·iBATIS $…$·JDBC 문자열 연결), 크로스사이트 스크립트(요청 값·EL param/header/cookie 무이스케이프 출력, <c:out escapeXml="false">), 경로 조작, 신뢰되지 않는 URL 자동접속, 운영체제 명령어, XML 외부개체, 취약한 해시·암호, 보안 문맥의 부적절한 난수, 코드·설정의 하드코드된 중요정보, HttpOnly·Secure 없는 쿠키, printStackTrace, 빈 catch, 역직렬화, 남은 디버그 출력. 규칙은 catalog/secure-coding-rules.json 데이터이고 주석은 무시합니다. 항목마다 파일·라인·CWE·등급·조치와 출처(공통컴포넌트 원본·수정본·매니페스트 없음·프로젝트 코드·테스트)를 냅니다. 예외는 .egovframe-secure-ignore.json(사유·검토자 필수), baselinePath(이전 JSON 결과·SARIF)와 비교해 새 항목 표시, format=sarif 또는 sarifPath 로 SARIF 2.1.0(GitHub code scanning 등). 패턴 기반 진단 보조이며 공인 진단을 대체하지 않습니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
topNoMarkdown 상세 항목 수
pathsNo프로젝트 상대 경로 접두어로 좁히기(예: src/main/java/egovframework/example)
rulesNo점검할 규칙 id(기본 전체)
formatNo응답 형식(sarif 는 SARIF 2.1.0 JSON 본문)markdown
overwriteNosarifPath 가 있으면 덮어쓰기
sarifPathNoSARIF 2.1.0 을 쓸 프로젝트 상대 경로(예: egovframe-secure.sarif)
projectDirYes프로젝트 디렉터리(절대경로 권장) — 읽기만 함
maxFindingsNo응답에 담을 최대 항목 수(SARIF 파일에는 전부)
baselinePathNo이전 결과(format=json 출력 또는 SARIF, 프로젝트 상대 경로) — 새로 생긴 항목만 표시
includeTestsNosrc/test 도 점검(등급은 낮음으로)

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
notesYes
sarifNo
byRuleYes
summaryYes
baselineNo
byOriginYes
byTargetYes
findingsYes
truncatedYes
disclaimerYes
projectDirYes
filesScannedYes
rulesVersionYes
suppressionsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.45.0

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With readOnlyHint=false, the description explains why: although projectDir is read-only, the tool can write SARIF output (sarifPath, overwrite). It also discloses non-obvious behavior the annotations cannot — rule source, comment-skipping, output fields (file/line/CWE/severity/remedy plus provenance), baseline diffing, SARIF 2.1.0 for GitHub code scanning, and the authoritative-diagnosis caveat.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and rule source are front-loaded in the first clause, and every later sentence carries actionable information. The long enumeration of vulnerability classes is informative but heavy, and the single dense paragraph makes the description hard to skim; slightly tighter grouping of output/exception/baseline behavior would help.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool is complex (10 params, 1 enum, output schema present) yet the description covers rule provenance, ignore-file prerequisites, baseline comparison, output formats, and the limits of static analysis, so an agent can call it and interpret results without opening the schema. The output schema handles return-value detail.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the schema already documents all ten parameters. The description still adds value by tying baselinePath to "new findings only", explaining format=sarif / sarifPath as SARIF 2.1.0 versus the maxFindings "all findings in file" distinction, and describing the exception-file contract — semantics beyond the schema text.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a precise verb and resource — static pattern-based search for implementation-stage security weaknesses in source, keyed to the MOIS/KISA 2021 guide — and enumerates the exact rule classes (SQL injection, XSS, path traversal, XXE, weak crypto, etc.) it covers. No sibling tool performs secure-coding analysis (the nearest siblings are SBOM/dependency checks), so the domain alone makes it unmistakable.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives clear operating context: rules come from catalog/secure-coding-rules.json, comments are ignored, exceptions go in .egovframe-secure-ignore.json with mandatory reason/reviewer, and baselinePath shows only newly introduced findings. It also scopes the tool honestly ("패턴 기반 진단 보조이며 공인 진단을 대체하지 않습니다"). It never explicitly says when to prefer another tool or which conditions make it inappropriate, so it stops short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.