SECURITY / METRICS

보안은 한 번의
스캔이 아닙니다

review의 finding, security의 OWASP fan-out, security-metrics의 결정론적 scorecard를 서로 다른 증거로 결합합니다.

GITHUB ACTIONS REVIEW GATE

어떤 순서로 무엇을 확인하는가

TOUCH PROBE

변경 범위

문서·테스트 전용 PR인지, production root를 건드리는지 분류

REVIEW

/dev-kit:review

correctness·security·architecture 병렬 reviewer와 verifier

SECURITY

/dev-kit:security

OWASP A01–A10별 finding, 중복 제거, 검증

L3 EVIDENCE

pytest tail

실제 테스트 수·시간·exit code를 PR evidence에 기록

COMBINED

worst-of

Blocked > Changes Requested > Approve. parse failure는 approve하지 않음

AUTO-APPROVE

strict clean path

두 verdict와 L3 evidence가 모두 존재하고 clean일 때만

OWASP TOP 10

security가 보는 열 가지

A01

Broken Access Control

권한 상승·IDOR·보호된 route 접근

A02

Security Misconfiguration

기본값·debug·과도한 권한·헤더

A03

Software Supply Chain Failures

취약 dependency·action·lockfile

A04

Cryptographic Failures

약한 해시·평문 secret·키 관리

A05

Injection

SQL·shell·template·command 입력

A06

Insecure Design

위협 모델·실패 안전성·business rule

A07

Authentication Failures

세션·토큰·MFA·credential 흐름

A08

Software or Data Integrity Failures

서명·무결성·검증 없는 업데이트

A09

Security Logging and Monitoring Failures

감사 로그·경보·민감정보 노출

A10

Mishandling of Exceptional Conditions

예외·timeout·fallback·복구 경로

SECURITY-METRICS

점수는 무엇을 측정하고 어떻게 읽는가

`/dev-kit:security-metrics`는 LLM 판정이 아니라 소스 트리 패턴으로 각 OWASP 영역을 0–100에서 시작해 감점합니다. 점수는 빠른 triage 신호이며, 전체 보안 리뷰를 대체하지 않습니다. 각 category 평균이 overall score가 되고, threshold 아래는 REVIEW로 표시됩니다.

AreaMeasuresEvidence / deduction
A01권한·인증 marker코드 트리에서 빠른 위생 신호auth/permission 흔적 -10
A02설정·라이선스기본 문서와 운영 책임SECURITY.md -10, LICENSE -5
A03공급망재현 가능성과 action 고정lockfile -10, unpinned action -15
A04암호화약한 알고리즘과 secret 패턴md5/sha1 -20, hardcoded credential -20
A05Injection위험한 실행·쿼리 패턴eval -25, shell=True -20, SQL interpolation -20
A06–A10설계·로그·예외운영 안전장치의 존재 신호design/logging/timeout marker마다 감점

대표 감점에는 hardcoded credentials -20, dynamic eval -25, `curl | sh` -25, `shell=True` -20, interpolated SQL -20, bare except -15, timeout/logging marker가 포함됩니다. 점수는 0 아래로 내려가지 않도록 clamp합니다.