security-review

security-review is a command for Claude Code from sangrokjung/claude-forge. It costs 23 tokens per session (5,081 once invoked), scanned B, original, MIT.

A security review procedure based on CWE, a list of common software weaknesses, and STRIDE, a method for identifying threats to a system.

In plain words
What is it for?
Use it to scan source code, map findings to CWE issues, check dependencies, perform threat modelling, and create Markdown or JSON reports.
Why use it?
It helps find security problems in changed files or across a codebase and records the review in a repeatable way.

Command for Claude Code

Written for Claude Code: allowed-tools in frontmatter. Also seen: positional $N argument.

Part of the claude-forge plugin — 33 skills, 39 commands, 17 agents shipped together

Good fit Use it to scan source code, map findings to CWE issues, check dependencies, perform threat modelling, and create Markdown or JSON reports.

Compare 6 commands from other repositories ↓
Install with agentmods
npx agentmods add commands/sangrokjung/claude-forge/security-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/sangrokjung/claude-forge

Made for: Claude Code.

Or install claude-forge, the plugin that ships this one along with the rest of its 33 skills, 39 commands, 17 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for security-review

README.md
[![agentmods](https://agentmods.dev/badge/commands/sangrokjung/claude-forge/security-review/github.svg)](https://agentmods.dev/commands/sangrokjung/claude-forge/security-review)
Your own site
<a href="https://agentmods.dev/commands/sangrokjung/claude-forge/security-review"><img src="https://agentmods.dev/badge/commands/sangrokjung/claude-forge/security-review/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for security-review

Your own site · 80×15
<a href="https://agentmods.dev/commands/sangrokjung/claude-forge/security-review"><img src="https://agentmods.dev/badge/commands/sangrokjung/claude-forge/security-review.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 5,081 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 2 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00023 $0.05081
Opus 5 $0.00012 $0.02540
Sonnet 5 $0.00005 $0.01016
Haiku 4.5 $0.00002 $0.00508

Measured 9d ago against content hash afe87cdf5cf1, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-08, from the pricing page.

Security

Grade B, and why

security-review scanned grade B with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 9d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codemediumSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

grep -rn 'eval(\|new Function(\|JSON\.parse' src/ | grep -v 'JSON\.parse(JSON' # CWE-918: SSRF grep -rn 'fetch(\|axios\.\(get\|post\)' src/ | grep 'req\.\|params\.\|query\.'

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

│ CWE-78 │ OS Command Injection │ exec(, spawn(, execSync( │ Crit │
commands/security-review.md · 446 lines

How it starts

The opening of the file, as written. The whole thing — 446 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Task

0단계: effort:max 강제

⚠️ Security Review는 항상 effort:max로 실행됩니다.
이는 보안 품질을 위해 타협할 수 없는 설정입니다.
모든 분석은 최대 깊이로 수행되며, 축약하지 않습니다.

effort:max를 내부적으로 강제 적용한다. 보안 검토는 속도보다 정확성이 우선이며, shallow scan은 허용하지 않는다.


1단계: 스캔 대상 식별

파라미터 파싱:

  • [경로]: 특정 파일 또는 디렉토리 지정
  • --auto: git diff 기반 변경 파일만 스캔 (민감 패턴 감지 시 자동 트리거)
  • --quick: 변경 파일 대상 빠른 스캔 (CWE 상위 10개만)
  • --cwe: CWE Top 25 전체 매핑 상세 분석
  • --stride: STRIDE 위협 모델링 추가 실행
  • --deps: 의존성 취약점 검사
  • --report [형식]: markdown 또는 json 리포트 파일 생성

스캔 범위 결정:

# --auto: git diff 변경 파일만
git diff --cached --name-only | grep -E '\.(ts|tsx|js|jsx|py|go|rs|java)$'
git diff --name-only | grep -E '\.(ts|tsx|js|jsx|py|go|rs|java)$'

# --quick: 변경 파일 빠른 스캔
git diff --name-only HEAD~1 | grep -E '\.(ts|tsx|js|jsx|py|go|rs|java)$'

# 기본 (플래그 없음): 전체 소스 파일
find src/ lib/ app/ -type f -name '*.ts' -o -name '*.tsx' -o -name '*.js' -o -name '*.jsx'

Auto-trigger 패턴 (--auto 모드에서 파일 경로/내용에 포함 시 자동 확대 스캔):

패턴 위험 수준 설명
auth Critical 인증 관련 코드
payment Critical 결제 처리 코드
session High 세션 관리
token High 토큰 발급/검증
password Critical 비밀번호 처리
secret Critical 시크릿/키 관리
crypto High 암호화 로직
jwt High JWT 토큰 처리
admin High 관리자 기능
upload Medium 파일 업로드
download Medium 파일 다운로드
redirect Medium URL 리다이렉트

2단계: CWE Top 25 매핑

모든 소스 파일에 대해 CWE Top 25 기반 패턴 매칭을 수행한다. 각 발견 항목에는 반드시 CWE ID를 태깅한다.

┌─────────┬──────────────────────────────┬───────────────────────────────┬──────┐
│ CWE ID  │ Name                         │ Detection Pattern             │ Sev  │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-79  │ Cross-site Scripting (XSS)   │ innerHTML, dangerouslySet*,  │ Crit │
│         │                              │ v-html, [innerHTML]=         │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-89  │ SQL Injection                │ query( + string concat/      │ Crit │
│         │                              │ template literal with ${},   │      │
│         │                              │ .raw( + user input           │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-78  │ OS Command Injection         │ exec(, spawn(, execSync(     │ Crit │
│         │                              │ + user-controlled input      │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-22  │ Path Traversal               │ ../ in user-supplied paths,  │ High │
│         │                              │ path.join( + req.params      │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-352 │ Cross-Site Request Forgery   │ POST/PUT/DELETE without      │ High │
│         │                              │ CSRF token validation        │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-287 │ Improper Authentication      │ Missing auth middleware,     │ High │
│         │                              │ auth check bypass            │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-862 │ Missing Authorization        │ Route handler without authz, │ High │
│         │                              │ direct object reference      │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-798 │ Hardcoded Credentials        │ apiKey=", secret=", pass=",  │ Crit │
│         │                              │ token=", key=" (literals)    │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-200 │ Exposure of Sensitive Info   │ console.log + secret/token/  │ Med  │
│         │                              │ password, error stack trace  │      │
│         │                              │ in response                  │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-502 │ Deserialization of Untrusted │ JSON.parse(untrusted),       │ High │
│         │ Data                         │ eval(, new Function(         │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-306 │ Missing Authentication for   │ Critical endpoint without    │ High │
│         │ Critical Function            │ auth guard                   │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-20  │ Improper Input Validation    │ No schema validation (zod/   │ Med  │
│         │                              │ joi), missing sanitization   │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-269 │ Improper Privilege Mgmt      │ Role escalation, missing     │ High │
│         │                              │ role check                   │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-434 │ Unrestricted Upload          │ File upload without type/    │ High │
│         │                              │ size validation              │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-918 │ Server-Side Request Forgery  │ fetch/axios with user URL,   │ High │
│         │                              │ no URL allowlist             │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-611 │ XML External Entity (XXE)    │ XML parser without disabled  │ High │
│         │                              │ external entities            │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-77  │ Command Injection            │ Template strings in shell    │ Crit │
│         │                              │ commands                     │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-276 │ Incorrect Default Perms      │ 0777, world-writable files,  │ Med  │
│         │                              │ permissive CORS              │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-732 │ Incorrect Permission Assign  │ Public access to admin       │ High │
│         │                              │ resources                    │      │
├─────────┼──────────────────────────────┼───────────────────────────────┼──────┤
│ CWE-327 │ Use of Broken Crypto Algo    │ md5(, sha1(, DES, RC4,      │ Med  │
│         │                              │ Math.random() for security   │      │
└─────────┴──────────────────────────────┴───────────────────────────────┴──────┘

Read the full file on GitHub · 446 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 9d ago First seen · 446 lines · 23 tokens per session scan B afe87cdf5cf1

Subscribe to this mod's changes

security-review is a command published in the GitHub repository sangrokjung/claude-forge (825 stars, last pushed 5d ago), licensed MIT. It adds 23 tokens to every session and 5,081 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it B with 2 findings (downloads and executes remote code, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.