skills/security-auditor/SKILL.md
Conducting interactive security audits using the Map & Probe methodology. Use when the user wants to perform a security review of source code, find vulnerabilities, audit a codebase, or analyze code for security issues.
npx skillsauth add artifex1/auditor-addon security-auditorInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
CHECKPOINT RULES:
All findings are hypotheses until mechanically verified. Never confirm a finding in isolation — cross-reference against docs, specs, and invariants. The PROBE phase implements this through its mandatory refutation step. </protocols>
<references> ## Referencesreferences/risk-patterns.md: Load at the start of every audit. Common weakness and high severity risk patterns that prime attention during analysis.
</references>
<phase_instructions>
<map_instructions>
TRIGGER: Start of every security audit. TIME BUDGET: 1-2 minutes. This is a structural inventory, not an analysis. CHECKPOINT: Present the system map. If core standards were identified, ask: "Does this system map look accurate? I identified [standards] as core to this codebase. Would you like me to generate security checklists for these before moving to Probe, or skip straight to Probe?" Otherwise, ask: "Does this system map look accurate? Ready to proceed to Probe?" NEXT: After confirmation → CHECKLIST (if requested) or PROBE (if skipped).
Goal: Produce a structural reference artifact for PROBE. Classify code structure and state. Do not construct attack scenarios or evaluate exploitability — that is PROBE's job.
Threat model (for later stages):
Steps:
call_chains on all in-scope files. Batch parallel runs if multiple files.Output — four sections, concise:
For each major component:
Purpose: 1-2 sentences.Key state: state variables — who writes, who reads.External surface: <funcSignature> — Caller: <who>; Writes: [vars]; External calls: [...]List 3-10 invariants that should hold assuming honest privileged roles. Reference specific state variables and functions. Include:
Mark any that depend on out-of-scope assumptions as uncertain.
From call_chains output, list each path:
<Path String>Context: One sentence — what this flow does.Invariants touched: from section 2.[deferred → PROBE].List standards implemented or depended on. Classify as Core or Peripheral. Only Core standards warrant CHECKLIST. If none are core: No core standards identified.
</map_instructions>
<checklist_instructions>
TRIGGER: User opts in at the MAP checkpoint. SKIP: If user declines or no standards were identified, proceed directly to PROBE.
Goal: Obtain standard-specific security checklists to inform the PROBE phase.
Instructions:
checklister agent with the identified standards.<probe_instructions>
TRIGGER: System map confirmed by user (and CHECKLIST completed or skipped). CONSTRAINT: Analyze ONE execution path per turn. After outputting findings for a path, STOP and wait for user input before proceeding to the next path. The user may reprioritize, ask to go deeper, or redirect focus. CHECKPOINT: After all paths are exhausted, present consolidated findings. "Would you like me to write up any of these findings?"
Goal: Systematically analyze every execution path for real, exploitable vulnerabilities.
Threat Model:
Instructions:
Files read during MAP are already in context. Do not re-read them unless checking specific line ranges not previously examined. Resolve any [deferred → PROBE] paths just-in-time when reached.
Step 1 — Prioritize. Scan each MAP execution path against references/risk-patterns.md. Tag paths with matching patterns. Order paths by: number of pattern matches + number of invariants touched, descending. Paths with zero matches and zero invariants may be batch-cleared (e.g., Paths X, Y, Z: clear — read-only getters with no state interaction).
Step 2 — Analyze. For each path in priority order:
Path <name>: clear. Then STOP and wait for user input.Refutation (mandatory for every confirmed finding): Before confirming any vulnerability, argue the opposite:
After all paths:
Output Format (per finding):
Confirmed vulnerability:
Suspicious (unconfirmed):
development
Analyzing codebases to systematically identify and categorize potential security threats, producing a threat model report before code-level auditing. Use when starting an engagement and wanting to map the attack surface, identify high-value assets, and enumerate threat agents before diving into code-level analysis.
testing
Technical writing for formal security audit reports. Use when the user wants to write up a security finding, create a formal issue report, or draft system overview and security model sections for an audit report.
development
Running the SAiST (Static AI-assisted Security Testing) pipeline against a codebase. Use when the user wants to run static analysis rules, detect code smells, find vulnerability patterns, or scan code with the built-in rule engine. Covers the full init → resolve gaps → run rules flow.
development
Writing SAiST static analysis rules — both shipped rules in the auditor-addon repo and custom per-engagement rules in audit workspaces. Use when the user wants to create a new detection rule, add a security check, implement a code smell detector, turn a confirmed finding into a reusable rule, or extend the rule set. Covers rule types (shallow, deep, MapRule), the trait system, language scoping, finding kinds, custom rules, and testing patterns.