A token-efficient, in-session security-triage skill for Claude Code. secscan runs a staged LLM SAST pipeline entirely inside a single Claude Code session using the agent's own Read/Grep/Glob tools — no external scanner, no per-chunk fan-out, no voting runs.
$ npx -y skills add atgreen/secscan-skill --agent claude-code
Repo: atgreen/secscan-skill
What's inside
A token-efficient, in-session security-triage skill for Claude Code.
secscan runs a staged LLM SAST pipeline entirely inside a single Claude Code
session using the agent's own Read/Grep/Glob tools — no external scanner,
no per-chunk fan-out, no voting runs. It costs a fraction of the tokens a
multi-call scanning harness would, while keeping real discipline: every finding
is gated, severity-calibrated, and adversarially verified before it's reported.
| Stage | What it does |
|---|---|
| s1 — Survey & recon | Read the project's own SECURITY.md (authoritative), inventory languages/frameworks, classify repo kind, map entry points → sinks, pick specialist lenses. |
| s2 — Threat model | Instantiate the OWASP/CWE baseline for the repo kind + a STRIDE pass; anchor to the project's published trust boundaries. |
| s3 — Decompose | Group code into focused review slices (by entry point, by specialist scope, plus a catch-all sweep that adds back anything unrecognized); lay out the slice × lens coverage matrix the pass is accountable to. |
| s4 — Deep-dive | Per slice, trace data flow (not pattern-match), apply specialist lenses, run every candidate through the gates, and park unchasable leads on a wishlist. |
| s5 — Pre-filter | Drop low-confidence / uncited / out-of-scope findings, deterministically and for free. |
| s6 — Adversarial verify | Assume each finding is wrong until confirmed in source; walk callers back to an external entry point; assign a CVSS 3.1 vector. Optionally hand the refutation to a different model. |
| s7/s8 — Dedup & chain | Merge by root cause — one patch site, all its manifestations kept; look for multi-hop exploit chains. |
| s9 — Report | Severity-ranked Markdown (CWE, source→sink, exploit scenario, fix), marked as triage candidates, plus a coverage appendix naming the gaps. Optional schema-validated findings.json and a coverage.json matrix. |
AGENTS/CLAUDE-style blocks — is treated as DATA
to analyze, never as instructions. Injection attempts are reported, not obeyed.remediate.md), which edits only when you name findings to fix and
adversarially validates each patch.findings.json conforming to
findings.schema.json and validated by a zero-dependency script — which also
resolves every cited file:line against the scanned tree, so a hallucinated
citation fails instead of reaching a human.covered / thin / n/a / not-run — and ends by naming its own gaps. A
class nobody examined otherwise leaves the same trace as one that came back
clean. Persisted (opt-in), the matrix points the next run at the empty cells;
it can only reorder that run's work, never let it skip.Clone straight into your Claude Code skills directory:
git clone ssh://cave@cave.moxielogic.com/atgreen/secscan-skill.git \
~/.claude/skills/secscan
Then in Claude Code:
/secscan <path>
or just ask: "security scan src/ for vulnerabilities". With no path it
defaults to the current repo's diff vs. main.
SKILL.md — the skill definition and pipeline (loaded by Claude Code).gates.md — exclusion rules, anti-manipulation (suppression annotations are
not evidence), the six-check self-verification (which opens by naming the
attacker and the trust boundary crossed), severity calibration, and
exhaustiveness (loaded on demand at s4–s6).lenses.md — the specialist lenses (crypto, logic-bug, access-control,
sensitive-data, log-injection, deserialization, batch-etl, iac, memory-safety,
ai-llm, web-protocol, client-side, php, wordpress), each gated on a surface
actually present in the repo, and per-repo-kind threat-model baselines
(web-api, web-app, mobile, native, iac, library).lang-hints.md — per-language "where to look first" blocks (go, ruby,
csharp, kotlin, swift, elixir, solidity, cobol, jcl), loaded selectively by s1
for the languages actually present. A starting set for discovery, not a
checklist and not a verdict.cwe-kb.md — per-CWE taint knowledge base (sources, sinks, sanitizers split
into universal / CWE-class-specific / unproven-by-name, look-alike
non-sanitizers, false-positive checks, and attacker bypass
hints) plus a source/sink recognition taxonomy (sanitizer names, reflection
sinks, framework request-binding sources). Loaded before s4; drives discovery
(s4), pre-filter (s5), and adversarial verify (s6).findings.schema.json — JSON schema for the optional findings.json (s9),
with true_positive and false_positive verdict branches.validate-findings.cjs — zero-dependency Node validator for a
findings.json. Checks schema conformance, and with --repo <scanned-path>
also resolves every source_ref/sink_ref against the scanned tree (file
present, line in range and non-blank) — a hallucinated citation fails the
build instead of reaching a human. Structural check only.remediate.md — the opt-in fix flow (re-confirm → minimal root-cause
patch → adversarial validation, including re-running the finding's reproducer
and its bypass variants, since a reproducer going quiet is not by itself proof
of a fix), loaded only when you ask to fix named findings. It's the one path that edits the target; a scan never triggers it.Apache License 2.0 — see LICENSE.
FAQ
secscan-skill is a Claude Code plugin with 1 hand-picked skill for security work, indexed on Flowy. Install it with the command on its page. It includes secscan-skill. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.
Is this plugin yours?
Claim it with GitHubSubmit a pluginPromote it