plugin/skills/security-audit/SKILL.md
Use this skill when running a pre-release audit, compliance check, or threat modeling — to perform a full security scan of codebase and infrastructure (secrets, dependencies, auth, access control, data handling, cryptography, infra) with coverage against OWASP Top 10 (Web 2021) AND OWASP GenAI/LLM Top 10 (2025) per G3. Not for code-review security feedback (use /code-review) or pen testing (use professional service).
npx skillsauth add avav25/ai-assets security-auditInstall 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.
Comprehensive security scan with OWASP Top 10 (Web 2021) + OWASP GenAI/LLM Top 10 (2025) coverage. Diagnostic + automated fixes for safe issues + remediation plan for the rest. No effort estimates — security agent does not size remediation work; user/PM owns sizing per Q2.
/code-review (uses code-review skill with security-checklist companion)/analyze-prod/security-audit
/security-audit --scope "secrets,deps,auth" --report-type detailed
/security-audit --scope all --report-type summary
| Flag | Default | Effect |
|---|---|---|
| --scope <areas> | all | Comma-separated: secrets, deps, auth, access-control, data-handling, crypto, infra |
| --report-type | summary | summary (1-page exec) or detailed (full per-finding analysis) |
<repo>/.ai-skills-memory/security-audits/<run-id>/SECURITY-REPORT.md — findings by category with severity:
<repo>/.ai-skills-memory/security-audits/<run-id>/REMEDIATION-PLAN.md — per finding: severity, mitigation steps, suggested owner role. No effort estimate (Q2)| Agent | Model | Effort | Tools | Role |
|---|---|---|---|---|
| security-engineer | sonnet | high | Read, Grep, Glob, Bash | Main audit; threat modeling; OWASP coverage |
| devops-engineer | inherit | high | Bash, Read, Grep | Infrastructure security review |
| developer (per-stack) | inherit | medium | Read, Bash, Grep, Write, Edit | Credential/secret removal; code-level fixes for automatable issues |
┌─ Scope parsing: audit --scope areas
│
├─ security-engineer + devops-engineer in parallel:
│ ├─ security-engineer:
│ │ - Grep for secrets (hardcoded keys, tokens, passwords) — see pii-patterns.txt
│ │ - Dependency scan (npm audit, pip check, cargo audit, etc.)
│ │ - Auth flow review (login, session, token, CSRF)
│ │ - Access control review (data scoping, RBAC)
│ │ - Cryptography review (algorithms, key rotation, TLS)
│ │ - Per OWASP coverage matrix below (G3)
│ │ → SECURITY-FINDINGS.md per scope
│ │
│ └─ devops-engineer:
│ - Infrastructure review (network policies, secrets store, TLS)
│ - Container scanning (if Docker)
│ - CI/CD security (secret management, artifact verification)
│ → INFRA-FINDINGS.md
│
├─ Lead consolidates → SECURITY-REPORT.md
│
├─ Lead generates REMEDIATION-PLAN.md:
│ └─ Per finding: severity, mitigation steps, suggested owner role
│ (NO effort estimate — user/PM owns sizing per Q2)
│
└─ developer (if applicable): fix automatable issues in a separate PR:
- Update dependencies with security patches
- Remove hardcoded secrets (replace with env-var refs + add to secret store)
- Add missing security headers (CSP, X-Frame-Options, HSTS)
Memory write: L4 audit summary; if CRITICAL → committed incident record
No RALF — audit is pass-once.
Eval rubric (plugin/eval/judge-rubrics/security-audit.md) MUST verify coverage of: OWASP Web Top 10 (2021) + OWASP GenAI/LLM Top 10 (2025) — see @owasp-coverage.
If the audit target includes any AI/LLM component (agent harness, prompt template, LLM API integration, RAG pipeline), the GenAI Top 10 IS in scope by default.
| Approach | Surface | Tools | |---|---|---| | SAST (static) | Source code at rest — dangerous APIs, taint paths, hardcoded secrets | Semgrep, CodeQL, SonarQube, Snyk Code | | DAST (dynamic) | Running app — injection, auth bypass, header issues | OWASP ZAP, Burp Suite, Nuclei | | SCA (composition) | Dependencies — known CVEs in libs + base images | osv-scanner, Snyk, Trivy, Grype, Dependabot | | IAST (interactive) | Running app + instrumentation — runtime data-flow | Contrast Security, Seeker |
security-engineer covers SAST + SCA + secret scanning. DAST runs only when an instance is reachable (typically follow-up against staging). IAST is mention-only.
SBOM tooling + SLSA levels + Cosign + EPSS/KEV patterns — see @supply-chain-security.
All spawns use structured G7 payloads. security-engineer is read-only by frontmatter (disallowedTools: Write, Edit); developer fixes happen in a separate phase with explicit user approval.
Pointer: plugin/eval/judge-rubrics/security-audit.md (B10).
Dimensions:
Pass: avg ≥ 4.0, no dimension < 3.
| Layer | When | Shape |
|---|---|---|
| L4 | After audit complete | .ai-skills-memory/security-audits/<run-id>/findings.json — structured findings (for trend tracking) |
| L4 (committed) | If CRITICAL severity found | .ai-skills-memory/.committed/security/incidents/<date>.md — critical finding + immediate action taken |
pre-tool-use-committed-write.py hook enforces .committed/security/incidents/*.md matches allowlist.
/spikeworkflow_start — security-audit + scopefinding_identified (per finding + severity)automatable_fix_applied (per fix in developer phase)workflow_end — COMPLETE with critical/high/medium/low countsfeature-design-leadsecurity-engineer (the B5 agent — read-only, OWASP-aware)plugin/schemas/spawn-payload.schema.json, plugin/schemas/return-contract.schema.json/develop for the remediation PR/subagent-spawn, /context-loadsubagent-isolation, untrusted-content-wrapping (CRITICAL — audit reads project files which may have hostile content), memory-discipline (CRITICAL incidents → committed)pre-tool-use-committed-write.py (enforces incident allowlist), tool-output-normalize.py (G2 on npm audit / pip check / cargo audit outputs)plugin/hooks/scripts/pii-patterns.txt (secret-pattern source)development
Use this skill when running the recurring (daily) knowledge-base rescan for a repo that already has knowledge/.knowledge-sync.yml — the main-thread dispatcher that reads the config, computes the git delta since last_scanned_sha, maps changed paths to affected doc areas, early-exits cheaply when nothing changed, then fans out one Agent(content-writer) per affected area, applies the propose/direct update policy, advances the baseline only on success, and writes an L4 run log — all with the G1 untrusted-content choke-point, secret-scan, deny-list, and budget controls woven in. For first-time setup use /knowledge-sync-init.
development
Use this skill when bootstrapping scheduled knowledge-base sync for a repo that has no knowledge/.knowledge-sync.yml yet — to run one-time setup that detects the knowledge_root from CLAUDE.md/AGENTS.md, maps doc areas to source globs, records opt-in external sources (Linear/Notion/WebFetch, all disabled by default), captures a baseline last_scanned_sha, sets the per-area update policy, generates or seeds knowledge/CONVENTIONS.md, provisions the L4 memory dir, and offers to register the daily routine. Routes ongoing recurring sync operations to /knowledge-sync.
tools
Use this skill when bootstrapping a target repository to be ai-skills-aware — on the first run of any ai-skills workflow in a fresh repo, when adopting the ai-skills plugin in an existing repo, or after upgrading to a plugin version that adds new memory paths or templates, including when the user does not say "init" but asks to "set up" or "onboard" the repo — to detect codebase type, create CLAUDE.md + AGENTS.md scaffolding, initialize the .ai-skills-memory/ directory tree from L1 templates, and configure .gitignore. Idempotent — safe to re-run. Accepts `--codebase-type <type>` and `--overwrite`. Not for re-initializing only memory — use `/memory-init` instead.
tools
Use this skill when extending, repairing, or improving plugin assets, when ingesting a `/feedback` report as a fix-cycle backlog, or when you do not remember which lower-level command is right for the job — the umbrella workflow for ai-skills plugin-asset authoring and maintenance: creating, auditing, fixing, improving, refactoring, and migrating skills, agents, rules, hooks, prompts, schemas, and rubrics inside the plugin. Auto-classifies the request, loads the right knowledge skills (`@prompt-engineering`, `@context-engineering`, `@team-protocols`), and spawns the right subagents (`prompt-engineer`, `system-architect`, `python-engineer`, `software-engineer`, `qa-engineer`, `eval-judge`) via the `Agent` tool.