sec-review-team
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-10-12
- Stars
- ★ 4
- Forks
- 0
02 资源文件 84
- 参考文档docs/consolidation-template.md4.7 KB
- 参考文档docs/scanner-coverage.md5.6 KB
- 参考文档docs/tradeoffs.md5.6 KB
- 参考文档fixtures/cicd-github-actions-vulnerable/.github/workflows/ci.yml825 B
- 参考文档fixtures/cicd-github-actions-vulnerable/.github/workflows/deploy.yml570 B
- 其他fixtures/cicd-github-actions-vulnerable/expected-coverage.jsonl1.3 KB
- 其他fixtures/cicd-github-actions-vulnerable/expected-findings.jsonl3.7 KB
- 参考文档fixtures/cicd-github-actions-vulnerable/README-FIXTURE.md1.4 KB
- 脚本fixtures/concurrency-race-vulnerable/auth.js1.3 KB
- 其他fixtures/concurrency-race-vulnerable/expected-coverage.jsonl1.8 KB
- 其他fixtures/concurrency-race-vulnerable/expected-findings.jsonl3.6 KB
- 参考文档fixtures/concurrency-race-vulnerable/package.json281 B
- 参考文档fixtures/concurrency-race-vulnerable/README-FIXTURE.md1.2 KB
- 脚本fixtures/concurrency-race-vulnerable/session.js1.0 KB
- 脚本fixtures/concurrency-race-vulnerable/wallet.js840 B
- 参考文档fixtures/container-docker-vulnerable/docker-compose.yml516 B
- 其他fixtures/container-docker-vulnerable/Dockerfile484 B
- 其他fixtures/container-docker-vulnerable/expected-coverage.jsonl1.3 KB
- 其他fixtures/container-docker-vulnerable/expected-findings.jsonl4.2 KB
- 参考文档fixtures/container-docker-vulnerable/README-FIXTURE.md1.5 KB
- 其他fixtures/desktop-tauri-vulnerable/expected-coverage.jsonl719 B
- 其他fixtures/desktop-tauri-vulnerable/expected-findings.jsonl2.7 KB
- 参考文档fixtures/desktop-tauri-vulnerable/README-FIXTURE.md1.2 KB
- 参考文档fixtures/desktop-tauri-vulnerable/src-tauri/capabilities/default.json266 B
- 其他fixtures/desktop-tauri-vulnerable/src-tauri/Cargo.toml577 B
- 其他fixtures/desktop-tauri-vulnerable/src-tauri/src/db/schema.sql188 B
- 脚本fixtures/desktop-tauri-vulnerable/src-tauri/src/lib.rs758 B
- 参考文档fixtures/desktop-tauri-vulnerable/src-tauri/tauri.conf.json337 B
- 其他fixtures/iac-terraform-vulnerable/expected-coverage.jsonl1.9 KB
- 其他fixtures/iac-terraform-vulnerable/expected-findings.jsonl4.2 KB
- 其他fixtures/iac-terraform-vulnerable/iam.tf783 B
- 其他fixtures/iac-terraform-vulnerable/main.tf939 B
- 其他fixtures/iac-terraform-vulnerable/network.tf659 B
- 参考文档fixtures/iac-terraform-vulnerable/README-FIXTURE.md1.5 KB
- 其他fixtures/iac-terraform-vulnerable/terraform.tfvars164 B
- 其他fixtures/iac-terraform-vulnerable/variables.tf236 B
- 脚本fixtures/llm-agent-python-vulnerable/agent.py1.7 KB
- 其他fixtures/llm-agent-python-vulnerable/expected-coverage.jsonl1.7 KB
- 其他fixtures/llm-agent-python-vulnerable/expected-findings.jsonl5.2 KB
- 脚本fixtures/llm-agent-python-vulnerable/rag.py715 B
- 参考文档fixtures/llm-agent-python-vulnerable/README-FIXTURE.md1.5 KB
- 参考文档fixtures/llm-agent-python-vulnerable/requirements.txt35 B
- 脚本fixtures/privacy-telemetry-vulnerable/app.js1.2 KB
- 其他fixtures/privacy-telemetry-vulnerable/expected-coverage.jsonl2.2 KB
- 其他fixtures/privacy-telemetry-vulnerable/expected-findings.jsonl3.5 KB
- 参考文档fixtures/privacy-telemetry-vulnerable/index.html2.1 KB
- 参考文档fixtures/privacy-telemetry-vulnerable/package.json314 B
- 参考文档fixtures/privacy-telemetry-vulnerable/README-FIXTURE.md1.4 KB
- 其他fixtures/python-django-vulnerable/expected-coverage.jsonl843 B
- 其他fixtures/python-django-vulnerable/expected-findings.jsonl4.2 KB
- 脚本fixtures/python-django-vulnerable/myapp/views.py1.1 KB
- 脚本fixtures/python-django-vulnerable/myproject/settings.py1.2 KB
- 参考文档fixtures/python-django-vulnerable/README-FIXTURE.md1.4 KB
- 参考文档fixtures/python-django-vulnerable/requirements.txt186 B
- 参考文档fixtures/README.md3.3 KB
- 脚本fixtures/run-harness.sh4.0 KB
- 其他fixtures/webapp-express-vulnerable/expected-coverage.jsonl1.1 KB
- 其他fixtures/webapp-express-vulnerable/expected-findings.jsonl3.9 KB
- 参考文档fixtures/webapp-express-vulnerable/package.json392 B
- 参考文档fixtures/webapp-express-vulnerable/README-FIXTURE.md1.8 KB
- 脚本fixtures/webapp-express-vulnerable/src/app.js1.4 KB
- 脚本fixtures/webapp-express-vulnerable/src/config.js308 B
- 脚本fixtures/webapp-express-vulnerable/src/routes/user.js878 B
- 其他fixtures/webapp-frontend-vulnerable/expected-coverage.jsonl1.4 KB
- 其他fixtures/webapp-frontend-vulnerable/expected-findings.jsonl3.8 KB
- 参考文档fixtures/webapp-frontend-vulnerable/index.html772 B
- 参考文档fixtures/webapp-frontend-vulnerable/README-FIXTURE.md1.4 KB
- 脚本fixtures/webapp-frontend-vulnerable/server.js710 B
- 参考文档schema/coverage.schema.json2.1 KB
- 参考文档schema/finding.schema.json3.2 KB
- 参考文档specialists/auth-authz-auditor.md5.1 KB
- 参考文档specialists/ci-cd-security-auditor.md1.8 KB
- 参考文档specialists/concurrency-race-auditor.md2.0 KB
- 参考文档specialists/container-runtime-auditor.md1.8 KB
- 参考文档specialists/data-exposure-auditor.md2.2 KB
- 参考文档specialists/dependency-supplychain-auditor.md2.4 KB
- 参考文档specialists/frontend-security-auditor.md1.9 KB
- 参考文档specialists/iac-auditor.md2.1 KB
- 参考文档specialists/input-validation-auditor.md3.4 KB
- 参考文档specialists/privacy-telemetry-auditor.md2.3 KB
- 参考文档specialists/prompt-injection-auditor.md2.2 KB
- 参考文档specialists/secrets-crypto-auditor.md3.1 KB
- 参考文档specialists/silent-failure-hunter.md2.4 KB
- 参考文档stack-signals.md3.9 KB
03 SKILL.md 正文
Multi-Agent Security Review Team — Orchestration
Follow these steps. Review-only. Never apply fixes.
Step 0: Pre-run confirmation
The skill's largest user-facing safety gate. Never spawn specialists without showing this block (unless --yes / auto-approve is passed).
0.1 Parse arguments
- Target path — absolute path. If missing, ask: "What repo should I review? (absolute path)" Verify it exists and is readable.
- Scope — one of:
all— full tree<subdir>— a subdirectory, e.g.src/api/diff vs main(ordiff vs <branch>) — only files changed on current branch vs target branch If missing, ask: "What scope? Full tree, a subdirectory, or a diff?"
- Flags:
--yes/-yskips confirmation entirely. Default is to confirm.
0.2 Enumerate scope
Use git-aware commands (fall back to find if not a git repo):
# File count + line count (scoped)
cd "<TARGET>"
if [[ "<SCOPE>" == "all" ]]; then
FILE_COUNT=$(git ls-files | wc -l)
LINE_COUNT=$(git ls-files | xargs wc -l 2>/dev/null | tail -1 | awk '{print $1}')
elif [[ "<SCOPE>" == diff* ]]; then
BASE="${SCOPE#diff vs }"; BASE="${BASE:-main}"
FILES=$(git diff --name-only "$BASE"...HEAD)
FILE_COUNT=$(echo "$FILES" | wc -l)
LINE_COUNT=$(echo "$FILES" | xargs wc -l 2>/dev/null | tail -1 | awk '{print $1}')
else
FILE_COUNT=$(git ls-files "<SCOPE>" | wc -l)
LINE_COUNT=$(git ls-files "<SCOPE>" | xargs wc -l 2>/dev/null | tail -1 | awk '{print $1}')
fi
Cap LINE_COUNT at 500k (anything larger: warn and suggest scope narrowing).
0.3 Detect stack signals
Read the highest-signal manifests first (cheapest): README.md top 50 lines, package.json, Cargo.toml, pyproject.toml, go.mod, Gemfile, tauri.conf.json, Dockerfile, .github/workflows/ (existence only), requirements.txt. Two or three file-reads is enough.
Apply each rule in stack-signals.md against what you observe. Collect matching signals (multiple can match). Example: a Tauri note app emits desktop + desktop-with-webview.
0.4 Pick default roster
Per stack-signals.md: union the specialist sets across all matching stack signals. Always include the baseline 4 (secrets-crypto-auditor, dependency-supplychain-auditor, silent-failure-hunter, data-exposure-auditor).
0.5 Detect scanner availability
For each scanner in Step 2.5's pre-pass list, run command -v <name>. Flag available vs missing. Missing scanners don't block — they just reduce pre-pass coverage; dependent specialists will work in manual mode.
0.6 Estimate runtime + tokens + cost
Use these baselines (from a prior reference run against recall on Opus 4.7):
- Input tokens per specialist:
~min(40k, 30 + 0.02 × LINE_COUNT)k tokens — small repos float near 30k overhead; large repos grow linearly with source lines but the agent self-caps reads. - Output tokens per specialist:
~5–10kregardless of repo size (findings + prose). - Total tokens:
N_specialists × (input + output). - Runtime: longest-path specialist
≈ 3 minbaseline; add0.6 sec / file read. Dependency auditor is typically slowest (~20–30 minon a repo with a 700-packagenode_modules). Report estimate as a range:longest × 1.1tolongest × 1.5. - Cost (on Opus 4.7 pricing — $5/MTok input, $25/MTok output, April 2026):
(input_tokens × 5 + output_tokens × 25) / 1_000_000. Print$X.XX.
Use claude-opus-4-7[1m] pricing if the orchestrator is running on the 1M-context variant; otherwise standard Opus 4.7. Print the pricing assumption.
0.7 Render confirmation block
╭─ sec-review-team ──────────────────────────────────────────╮
│ │
│ Target: <absolute path> │
│ Scope: <scope> │
│ <N> files, <N> lines │
│ │
│ Stack: <detected signals, comma-separated> │
│ Model: <current model ID> │
│ │
│ Specialists (<N> in roster): │
│ ✓ secrets-crypto-auditor │
│ ✓ dependency-supplychain-auditor │
│ ✓ silent-failure-hunter │
│ ✓ data-exposure-auditor │
│ ✓ <stack-specific additions> │
│ │
│ Pre-pass scanners: │
│ ✓ gitleaks (found on PATH) │
│ ✗ trufflehog (missing — skip) │
│ ✓ semgrep │
│ ✓ npm audit │
│ ✗ cargo audit (missing — skip) │
│ │
│ Estimated: │
│ Tokens: ~<N>k input / ~<N>k output │
│ Runtime: <N>–<N> min (wall-clock) │
│ Cost: ~$<N.NN> (<model pricing tier>) │
│ │
│ Output: <TARGET>/.planning/security-review/ │
│ │
╰────────────────────────────────────────────────────────────╯
Proceed? [y / narrow / add-specialist / drop-specialist / abort]
0.8 Handle response
- y / yes / (
--yesflag) → continue to Step 1. - narrow → prompt: "Narrow to which subdirectory or diff?" — re-run 0.2–0.7 with the new scope.
- add-specialist
<name>→ append the named specialist if present inspecialists/, reject if unknown, re-render 0.7. - drop-specialist
<name>→ remove from roster, warn if dropping a baseline specialist ("secrets-crypto is in the baseline. Drop anyway?"), re-render 0.7. - abort / n / no / empty response after 60 s (if interactive) → exit cleanly. Do NOT create
.planning/security-review/. Do NOT spawn any agent.
0.9 Run-metadata capture
After confirmation, before Step 1, write <TARGET>/.planning/security-review/run-metadata.json:
{
"run_id": "<ISO timestamp>",
"target": "<absolute path>",
"scope": "<scope>",
"stack_signals": ["..."],
"roster": ["..."],
"scanners_available": ["..."],
"scanners_missing": ["..."],
"model": "<model ID>",
"estimated_tokens_input": <N>,
"estimated_tokens_output": <N>,
"estimated_cost_usd": <N.NN>,
"confirmed_at": "<ISO timestamp>"
}
This is consumed later by the consolidation step (fills in REPORT.md header), by re-run comparison, and by telemetry if enabled.
Step 1: Final roster
Load only the specialist brief files from specialists/ that match the confirmed roster. Do not load briefs for specialists not in the roster.
Step 2: Prepare findings directory
Create <TARGET>/.planning/security-review/ if absent.
Pollution check: run git check-ignore <TARGET>/.planning/ (or grep .gitignore). If .planning/ is NOT ignored, warn the user:
"⚠
.planning/is not in the target's .gitignore. Findings land inside the repo. Options: (a) add to .gitignore, (b) write to /tmp/sec-review-<timestamp>/ instead, (c) proceed."
Respect choice. Default (no response) is (c).
Step 2.5: Scanner pre-pass
Deterministic scanners run before the LLM specialists. This is the biggest accuracy-per-token lever in the skill — specialists spend tokens on signal tools can't catch (architectural, multi-step, context-dependent), not re-deriving secret-detection regexes.
2.5.1 Scanner inventory
| Scanner | Detects | Command | Feeds specialist |
|---|---|---|---|
gitleaks |
secrets at rest | gitleaks detect --source <TARGET> --report-format json --report-path - |
secrets-crypto-auditor |
trufflehog |
secrets (git history + fs) | trufflehog filesystem <TARGET> --json |
secrets-crypto-auditor |
semgrep |
pattern-based SAST | semgrep scan --config auto --json --output - |
multi: input-validation, data-exposure, silent-failure (by rule category) |
npm audit |
npm CVEs | cd <TARGET> && npm audit --json |
dependency-supplychain-auditor |
cargo audit |
crate CVEs | cd <TARGET> && cargo audit --json |
dependency-supplychain-auditor |
pip-audit |
Python CVEs | pip-audit -r <TARGET>/requirements.txt -f json |
dependency-supplychain-auditor |
osv-scanner |
multi-ecosystem CVEs | osv-scanner -r <TARGET> --format json |
dependency-supplychain-auditor |
bandit |
Python SAST | bandit -r <TARGET> -f json |
input-validation-auditor (Python targets) |
hadolint |
Dockerfile lint | hadolint <file> -f json |
container-runtime-auditor |
trivy image |
base image CVEs | trivy image --format json <image> |
container-runtime-auditor |
actionlint |
GHA syntax + security | actionlint -format '{{json .}}' |
ci-cd-security-auditor |
tfsec |
Terraform security | tfsec <TARGET> --format json |
iac-auditor |
checkov |
IaC security | checkov -d <TARGET> --output json |
iac-auditor |
retire.js |
known-vulnerable JS libs | retire --path <TARGET> --outputformat json |
frontend-security-auditor |
Full mapping: see docs/scanner-coverage.md.
2.5.2 Detection + invocation
For each scanner in the inventory:
if command -v <scanner> >/dev/null 2>&1; then
run the scanner, capture stdout
parse JSON output
normalize to finding.schema.json format (see 2.5.3)
append to <TARGET>/.planning/security-review/scanner-prepass.jsonl
else
log "scanner <name> not available — skipping"
fi
Run scanners in parallel where safe (no shared-state conflicts). Wall-clock ceiling per scanner: 120 s (kill if exceeded; log partial results).
2.5.3 Normalization
Every scanner emits different JSON. Normalize each finding to finding.schema.json with:
id—scanner-<name>-<index>(e.g.scanner-gitleaks-001)specialist— the specialist this finding is routed to (see inventory above). Even scanner findings get routed; specialists triage them.source—"scanner-<name>"(so provenance is visible)severity— mapped from scanner's severity (HIGH→high,MEDIUM→medium, etc.)confidence— scanners getcertainfor deterministic rule hits,likelyfor heuristic rulestitle,root_issue— from scanner output, slug-normalizedfile,line_range,evidence— from scanner outputexploit,fix— scanners often omit these; leave""and let the specialist agent fill during triage
Save to <TARGET>/.planning/security-review/scanner-prepass.jsonl.
2.5.4 Feed specialists
When spawning each specialist in Step 3, include a "Pre-pass context" section in the brief:
Pre-pass scanner findings relevant to your specialist (from `<TARGET>/.planning/security-review/scanner-prepass.jsonl`):
[N findings from gitleaks]
[M findings from semgrep for your category]
Triage rules:
1. For each scanner-sourced finding, decide: true-positive / false-positive / needs-investigation.
Emit a finding entry in your JSONL with `source: "scanner-<name>-confirmed"` (for true-positive) or
`source: "scanner-<name>-false-positive"` (for false-positive triaged out).
2. After triage, find what the scanner missed via architectural / cross-file analysis — these go in your
JSONL with `source: "specialist"` as usual.
Specialists are not obligated to re-derive secret regexes. Their job is triage + judgment.
2.5.5 REPORT.md provenance
The consolidation step (Step 4) renders REPORT.md with a "Source" column for each finding so the reader sees which scanner (if any) caught it and whether a specialist confirmed or overturned the triage. Scanner-only confirmations (no specialist review) are flagged with ⚠ unreviewed by specialist — this happens when a specialist errored before triaging the scanner pre-pass.
2.5.6 Scanner unavailability
If zero scanners are available in the environment, the run continues — specialists do the full job themselves, which is the LLM-only baseline mode. Log a tooling caveat in REPORT.md so the reader knows coverage is LLM-only.
Step 3: Spawn specialists in parallel
Issue one Agent tool call per specialist in a single assistant message — this is what makes them run concurrently.
For each specialist:
- Read its brief file (
specialists/<name>.md). - Substitute
<TARGET>,<SCOPE>,<STACK CONTEXT>,<THREAT_MODEL>. - Pass
allowed-toolsper the specialist's## Allowed toolssection (hard read-only; Write scoped to the four output-file paths only). - Use
preferred_subagent_typefrom frontmatter; fall back tofallback_subagent_typeif unregistered.
Print to the user before the parallel batch returns:
Spawning <N> specialists in parallel against <TARGET> (scope: <SCOPE>).
Each specialist writes to <TARGET>/.planning/security-review/<name>.{md, findings.jsonl, coverage.jsonl, status.json}.
Live progress (run in a separate terminal):
watch -n 5 'jq -s "sort_by(.agent) | map({agent, status, files_read, findings_written})" <TARGET>/.planning/security-review/*.status.json'
Or:
tail -f <TARGET>/.planning/security-review/*.status.json
Spawning now. Interim status lines will appear as each specialist returns.
3.1 Heartbeat contract (per specialist)
Every specialist brief instructs the agent to write <name>.status.json at spawn time and to update it as progress happens. Format:
{
"agent": "<specialist-name>",
"status": "starting | scanning | writing-findings | completed | errored",
"started_at": "<ISO>",
"finished_at": "<ISO|null>",
"files_read": <int>,
"findings_written": <int>,
"current_file": "<path|null>",
"severity_counts": { "critical": 0, "high": 0, "medium": 0, "low": 0 },
"error": "<message|null>"
}
- On spawn: write with
status: "starting",started_at, counters at 0. - Every ~5 file reads: update
files_read,current_file, setstatus: "scanning". - On each finding: increment
findings_written, updateseverity_counts. - On completion: set
status: "completed",finished_at, final counts. - On error: set
status: "errored",finished_at, populateerror.
The agent must flush .status.json to disk before returning from its Agent tool call, so the orchestrator sees the final state once the subagent completes.
3.2 Interim reports (orchestrator-side)
Batched Agent calls in a single message run concurrently, but the orchestrator receives their results serialized — one completion at a time. As each specialist returns:
- Read the specialist's
status.jsonfile to confirm final state. - Print one line to the user:
✓ auth-authz-auditor done (0C / 2H / 2M / 1L) [4m 22s] 12 files read
✓ input-validation-auditor done (0C / 0H / 0M / 3L) [3m 15s] 8 files read
✗ dependency-supplychain-auditor errored after 18m — node_modules walk timed out. Partial findings preserved.
✓ silent-failure-hunter done (0C / 2H / 3M / 3L) [5m 03s] 14 files read
...
-
Errored specialists don't block the run. Keep processing completions from the remaining specialists. In Step 4 (consolidate), errored specialists are flagged in REPORT.md with their last-known
status.jsonstate. -
After the last specialist returns, print:
All <N> specialists completed (<X> done, <Y> errored). Consolidating...
3.3 Output files per specialist
Each specialist writes four files:
<name>.md— prose findings (human-readable)<name>.findings.jsonl— perschema/finding.schema.json<name>.coverage.jsonl— perschema/coverage.schema.json<name>.status.json— heartbeat / final state
Step 4: Consolidate
Read all *.findings.jsonl and *.coverage.jsonl. Apply docs/consolidation-template.md:
- Group findings by
root_issue(dedupe). - For each group:
max(severity),max(confidence),distinct(specialist) → raised_by. - Split actionable (
certain|likely) from worth-investigating (possible|unverified). - Build coverage matrix (category × specialist) from coverage.jsonl.
- Render
REPORT.mdfrom template.
If any specialist failed schema validation on its JSONL, fall back to prose parse for that specialist and log a warning in REPORT.md.
As each specialist returns, print an interim-status line: ✓ <name> done (<counts>) [<runtime>] or ✗ <name> errored: <msg>. Don't block on errored specialists.
Step 5: Deliver
Tell the user:
- Path to
REPORT.mdand the four per-specialist files each - Headline severity counts (deduped)
- Top 2–3 fixes by impact
- Tooling caveats (scanners unavailable, fallbacks taken, specialists errored)
- Coverage completeness score
Do NOT apply fixes. Fix workflow → companion skill /sec-review-fixes.
Related
- Specialist library:
specialists/(13 briefs) - Stack signals:
stack-signals.md - Schemas:
schema/finding.schema.json,schema/coverage.schema.json - Consolidation template:
docs/consolidation-template.md - Design tradeoffs:
docs/tradeoffs.md - Upstream skill: ported from
fsad_playbook(see~/Repo/fsad_playbook/.claude/skills/sec-review-team/for the canonical prompt source, validation notes, and improvement history)
04 同仓库更多 Skills
verify-ac
暂无简介
spec-review
暂无简介
ship
Short alias for /fsad-harness:ship-it. Wrap up finished work, cut a version, commit, push, and open a PR.
ship-it
Wrap up a finished round of work — verify README and CHANGELOG are current, cut a version if warranted, move completed task files into the completed/ folder, then create a feature branch if needed, commit, push, and open a PR. Run after `/fsad-harness:do-task` has marked one or more tasks done. Takes no arguments.
set-context
暂无简介
sec-review-team
暂无简介