vuln-scan
できること
このスキルは、プロジェクトのソースコードを読み、いくつかの重点分野でセキュリティ上の弱点を探します。コードのビルドや実行はしません。コードベースの最初の確認を求めるセキュリティのレビュー担当者向けです。
使う場面
- ✓テストを実行する前に、コードベースを静的にレビューしてセキュリティの問題を調べたいとき。
- ✓結果を、トリアージに渡せる形式で受け取りたいとき。
- ✓レビューを1つ以上の特定のリスクの分野に絞りたいとき。
スキルのリンク
https://github.com/anthropics/defending-code-reference-harness/blob/main/.claude/skills/vuln-scan/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私のプロジェクトのコードをスキャンして、セキュリティ上の問題や危険な箇所を一覧にしてもらえますか?”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、レビューを重点分野に分け、それぞれの分野のコードを読み、発見をJSONファイルと読みやすい要約に書き出します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
/vuln-scan
Static vulnerability review of a source tree. Produces VULN-FINDINGS.json
(+ a human-readable .md) that /triage ingests directly.
This skill does not execute code. It reads source and reasons about it.
For execution-verified findings (ASAN crashes, reproducing PoCs), point the
user at vuln-pipeline run <target> — see README Step 2.
Tool fallbacks. Prefer the dedicated Glob and Grep tools. Some sessions
do not provision them — allowed-tools is a permission filter, not a loader,
so listing them here does not make them appear. When Glob/Grep are
unavailable, fall back to the read-only Bash commands whitelisted above:
rg --files <scope> / ls -R for enumeration, rg -n / grep -rn for
search, wc / head / file for sniffing. These are the ONLY permitted
Bash commands; do not write helper scripts or pipe target content into a
shell interpreter.
Arguments
<target-dir>(required) — directory to scan. Relative or absolute.--focus <area>— scan only this focus area (repeatable). Skips recon.--single— no subagent fan-out; one sequential pass. Use on tiny targets or when debugging the prompt.--extra <file>— append the contents of<file>to the review brief (after the category list). Use to add org-specific vulnerability classes, compliance checks, or stack-specific patterns. Plain text; same shape as the category blocks below.--no-score— skip the Step 3b confidence pass (saves a round of subagents). Findings keep the scanner's self-reported confidence only.
Step 1 — Scope
- Resolve
<target-dir>. If it doesn't exist or has no source files, stop with an error. - Look for
<target-dir>/THREAT_MODEL.md. If present, parse its section 3 "Entry points & trust boundaries" table and section 4 "Threats" table for focus areas and threat classes. This is the preferred scoping input. - If no THREAT_MODEL.md and no
--focus: do a quick recon — list the source tree, read entry points and dispatch code, and propose 3-10 focus areas using the pattern<subsystem> (<function/file>) — <key operations>. Same shape asharness/prompts/recon_prompt.py. - If
--focuswas given, use exactly those.
Tell the user the focus areas you'll scan and the source-file count before fanning out.
Step 2 — Fan out
Unless --single, spawn one Task subagent per focus area in parallel.
Cap at 10 concurrent. Each subagent gets the review brief below with its
focus area filled in. On tiny targets (<15 source files), fall through to
--single automatically.
Review brief (per subagent)
You are conducting authorized static security review of source code. Your
focus area: **{focus_area}**. Other agents cover other areas; duplication
is wasted effort.
TARGET: {target_dir}
TRUST BOUNDARY: {from THREAT_MODEL.md section 3, or "untrusted input → process memory"}
TASK: read the source in your focus area and identify candidate
vulnerabilities. This is static review — do NOT build, run, or probe
anything. Reason from the code.
REPORTING BAR: report anything with a plausible exploit path. Skip style
concerns, best-practice gaps, and purely theoretical issues with no attack
story at all — but if you're unsure whether something is real, REPORT IT
with a low confidence score rather than dropping it. A downstream triage
step does the rigorous verification; your job is to not miss things.
WHAT TO LOOK FOR:
MEMORY SAFETY (C/C++ and unsafe/FFI blocks) — HIGH VALUE:
- heap-buffer-overflow / stack-buffer-overflow / global-buffer-overflow
- heap-use-after-free / double-free
- integer overflow feeding an allocation or index
- format-string bugs
- unbounded recursion or allocation driven by untrusted size fields
INJECTION & CODE EXECUTION — HIGH VALUE:
- SQL / command / LDAP / XPath / NoSQL / template injection
- path traversal in file operations
- unsafe deserialization (pickle, YAML, native), eval injection
- XSS (reflected, stored, DOM-based) — but see React/Angular note below
AUTH, CRYPTO, DATA — HIGH VALUE:
- authentication or authorization bypass, privilege escalation
- TOCTOU on a security check
- hardcoded secrets, weak crypto, broken cert validation
- sensitive data (secrets, PII) in logs or error responses
LOW VALUE — note briefly, keep looking:
- null-pointer deref at small fixed offsets with no attacker control
- assertion failures / clean error returns (correct handling, not a bug)
DO NOT RE
よくある質問
私のコードを実行しますか?
いいえ。ソースファイルを読み、その内容について推論するだけです。
自分で確認項目を追加できますか?
はい。テキストファイルに追加のルールや重点分野を書けます。
結果はどうなりますか?
次のトリアージの手順で読める形式で保存されます。
詳細
作者による元の説明
Static source-code vulnerability scan. Reads a target directory (and THREAT_MODEL.md if present), spawns parallel review subagents per focus area, and writes VULN-FINDINGS.json + .md for /triage to consume. Read-only — no building, running, or network. For execution-verified crashes, use vuln-pipeline instead. Use when asked to "scan for vulns", "review this code for security issues", "find bugs in <dir>", or as the step between /threat-model and /triage.
人気
- GitHubのスター
- 7.7k
- ランキング
- #13107
- ライセンス
- —
- 更新日
- 2026/8/6
コメント
- …
このリポジトリの他のスキル
customize
7.7k対象の種類、言語、ターゲットに合わせて、個別の部分だけを書き換え、AIによる脆弱性の検出パイプラインを適応させるようエージェントを支援します。
dnr-hunt
7.7kアラートがない状態でWebのログを調べ、攻撃の兆候を探し、見つかった事案を文書にまとめるようエージェントを支援します。
dnr-respond
7.7k1つのセキュリティアラートや兆候について、攻撃が成功したか、どこまで広がったかを確認するようエージェントを支援します。
patch
7.7k検証済みのセキュリティの発見に対する修正案のコードを作り、人が確認できるように差分として保存するようエージェントを支援します。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。