Security Scan
Produce an evidence-backed security assessment without changing application code or dependencies.
Boundaries
- Treat scanning as read-only. Do not install tools, update advisory databases, build images,
run project scripts, or modify global client settings without explicit approval.
- Never report a clean scan when a tool failed, was missing, or could not cover the target.
- Never copy secret values into chat or reports. Follow
the reporting and redaction contract.
- Scan every detected project in a monorepo, not only the repository root.
Interpret the Request
Default to dependency and code scanning. Apply these modes before running tools:
--deps-only: skip Semgrep.
--code-only: skip dependency scanners.
--owasp A01 through A10: retain only findings mapped to that 2025 category.
--severity critical,high: filter after normalizing scanner output.
--export-bypass: read the reporting reference and export reviewed false positives only.
--auto-remind: explain that reminders are client-specific. Do not claim they are enabled or
write client configuration until the user chooses a supported hook or automation.
Reject incompatible --deps-only and --code-only requests instead of guessing.
Workflow
Record the repository path, Git commit, requested modes, scope, and exclusions.
Read the scanner contract. Build the dependency plan with:
python3 <skill-root>/scripts/scan_plan.py <project-root> --pretty
For every ready project, run exactly its planned command from that project's directory.
Never chain package managers with ||. Capture stdout, stderr, exit code, and tool version
separately; a non-zero exit may mean findings rather than execution failure.
Do not run planner records marked inconclusive; their command is null because project evidence
is ambiguous. Preserve the planner's reason and report the affected scope as incomplete. Mark
needs-lockfile, needs-export, and missing-tool entries as inconclusive or skipped. Offer
installation or preparation instructions, but do not perform them without approval.
Unless code scanning was disabled, run:
semgrep scan --config p/owasp-top-ten --json --metrics=off <project-root>
Parse the JSON even when the command exits non-zero. Treat Semgrep as pattern coverage, not
proof that all OWASP risks were tested.
Read the OWASP 2025 mapping. Do not trust legacy 2017 or 2021 labels
without translating them. Dependency findings map primarily to A03:2025.
Enrich actual CVE identifiers only when useful. Batch up to 100 IDs with the NVD cveIds
parameter, honor rate limits, and preserve the scanner result if enrichment fails. Do not
invent CVEs for GHSA, RUSTSEC, PYSEC, or other advisory identifiers.
Generate the result using the reporting contract. Unless the user
requested files, summarize in chat. Never overwrite an existing report without confirmation.
Completion Gate
Report every scanner as clean, findings, failed, skipped, or inconclusive. Include tool
versions and uncovered scope. A scan is complete only when all planned scanners have a recorded
state and every displayed snippet has passed redaction.
1---2name: security-scan3description: Use when a user asks to scan a repository for dependency vulnerabilities, insecure code patterns, CVEs, or OWASP Top 10 risks.4license: MIT5---67# Security Scan89Produce an evidence-backed security assessment without changing application code or dependencies.1011## Boundaries1213- Treat scanning as read-only. Do not install tools, update advisory databases, build images,14 run project scripts, or modify global client settings without explicit approval.15- Never report a clean scan when a tool failed, was missing, or could not cover the target.16- Never copy secret values into chat or reports. Follow17 [the reporting and redaction contract](references/REPORTING.md).18- Scan every detected project in a monorepo, not only the repository root.1920## Interpret the Request2122Default to dependency and code scanning. Apply these modes before running tools:2324- `--deps-only`: skip Semgrep.25- `--code-only`: skip dependency scanners.26- `--owasp A01` through `A10`: retain only findings mapped to that 2025 category.27- `--severity critical,high`: filter after normalizing scanner output.28- `--export-bypass`: read the reporting reference and export reviewed false positives only.29- `--auto-remind`: explain that reminders are client-specific. Do not claim they are enabled or30 write client configuration until the user chooses a supported hook or automation.3132Reject incompatible `--deps-only` and `--code-only` requests instead of guessing.3334## Workflow35361. Record the repository path, Git commit, requested modes, scope, and exclusions.372. Read [the scanner contract](references/SCANNERS.md). Build the dependency plan with:3839 ```bash40 python3 <skill-root>/scripts/scan_plan.py <project-root> --pretty41 ```42433. For every `ready` project, run exactly its planned command from that project's directory.44 Never chain package managers with `||`. Capture stdout, stderr, exit code, and tool version45 separately; a non-zero exit may mean findings rather than execution failure.464. Do not run planner records marked `inconclusive`; their command is null because project evidence47 is ambiguous. Preserve the planner's reason and report the affected scope as incomplete. Mark48 `needs-lockfile`, `needs-export`, and missing-tool entries as `inconclusive` or `skipped`. Offer49 installation or preparation instructions, but do not perform them without approval.505. Unless code scanning was disabled, run:5152 ```bash53 semgrep scan --config p/owasp-top-ten --json --metrics=off <project-root>54 ```5556 Parse the JSON even when the command exits non-zero. Treat Semgrep as pattern coverage, not57 proof that all OWASP risks were tested.586. Read [the OWASP 2025 mapping](references/OWASP.md). Do not trust legacy 2017 or 2021 labels59 without translating them. Dependency findings map primarily to A03:2025.607. Enrich actual CVE identifiers only when useful. Batch up to 100 IDs with the NVD `cveIds`61 parameter, honor rate limits, and preserve the scanner result if enrichment fails. Do not62 invent CVEs for GHSA, RUSTSEC, PYSEC, or other advisory identifiers.638. Generate the result using [the reporting contract](references/REPORTING.md). Unless the user64 requested files, summarize in chat. Never overwrite an existing report without confirmation.6566## Completion Gate6768Report every scanner as `clean`, `findings`, `failed`, `skipped`, or `inconclusive`. Include tool69versions and uncovered scope. A scan is complete only when all planned scanners have a recorded70state and every displayed snippet has passed redaction.