name: audit
description: Certification readiness audit of a project against the owner's engineering standards and the SOC 2, ISO 27001, ISO 42001, WCAG, OWASP ASVS and SLSA controls. Reports gaps; changes no product code.
argument-hint: "(none: asks which standards) or soc2|iso27001|iso42001|wcag|asvs|slsa|all [--app ]"
disable-model-invocation: true
Audit this project's readiness for certification ($ARGUMENTS). The security playbook
(../../departments/security/playbook.md) lists the checks a single change gets; this audit
applies them, and the controls below, to the whole project.
0. What to audit
When $ARGUMENTS is empty, ask first, in one AskUserQuestion call with two questions:
"Which standards should the audit cover?", multiSelect, header "Standards", options:
All standards (Recommended): SOC 2, ISO 27001, ISO 42001, WCAG 2.2 AA, OWASP ASVS L2 and SLSA L1;
Security and compliance: SOC 2, ISO 27001 and OWASP ASVS;
Accessibility: WCAG 2.2 AA;
AI and supply chain: ISO 42001 and SLSA.
The person can type single standards under "Other" (for example soc2, wcag).
"Should it also scan the running app?", header "App scan", options:
Code only (Recommended);
Also scan the running app: the person gives its local or preview address under "Other", or
in a follow-up question when they chose this without one. Never production.
When $ARGUMENTS already names standards or --app, skip the questions: soc2, iso27001,
iso42001, wcag, asvs, slsa, all, --app <url>. A standard left out is reported as
Not assessed, never as ready; the scanners still run, since they serve every standard.
The audit finds and ranks gaps with evidence; it fixes nothing. No tool can certify a
project: SOC 2 and the ISO standards are awarded by an outside auditor after they see the
controls working, and most of what they check is how the organization runs, which only the
owner can supply. Say that once in the report.
Write everything to <workflowDir>/audit/<YYYY-MM-DD>/ (workflowDir from
.claude/dev-workflow.json, default docs/workflow): README.md (the report), checklist.md
(the owner's part) and raw/ (scanner output). The folder describes weaknesses: keep it out of
git unless the owner says otherwise (add it to .git/info/exclude of each repository it sits
in), and never put a secret value in it.
1. Inventory (scout)
Repositories (repos in the configuration, else this folder), stacks, where data is stored,
how users sign in, payment and personal data, AI or agent features, the user interface, CI and
deployment. A wide search goes to dev-workflow:scout, started with the scout model
(python3 <plugin folder>/hooks/dw.py models --project <project root>, the plugin folder being two levels above this file). One table in the report.
2. Scanners
Run each in its official Docker image with a fixed version tag (record the tag and the date),
mounting the repository read-only, once per repository. If Docker is not running, start it or
say which scanner was skipped. A scanner that fails is reported as not run, never as clean.
| What |
Command (inside -v <repo>:/src:ro) |
Standard |
| Secrets in files and git history |
zricethezav/gitleaks:<tag> detect --source /src --redact --report-format json --report-path /out/gitleaks.json |
ASVS, SOC 2 CC6, ISO A.8 |
| Code patterns (injection, XSS, auth, crypto) |
semgrep/semgrep:<tag> semgrep scan --config p/default --config p/owasp-top-ten --config p/secrets --json -o /out/semgrep.json /src |
ASVS, OWASP Top 10 |
| Vulnerable dependencies |
ghcr.io/google/osv-scanner:<tag> scan source -r /src --format json |
SLSA, SOC 2 CC7, ISO A.8.8 |
| SBOM |
anchore/syft:<tag> dir:/src -o cyclonedx-json |
SLSA, ISO A.5.21 |
| Misconfiguration (Docker, IaC, CI) |
aquasec/trivy:<tag> fs --scanners misconfig,vuln --format json /src |
SLSA, ISO A.8.9 |
--redact is required for gitleaks; record the rule, file and line of each hit, never the value.
Count findings by severity; read only the high and critical ones in full, and check a sample for
false positives before reporting them.
With --app <url>, also scan the running app. The target is a local or preview address the
owner names, never production:
ghcr.io/zaproxy/zaproxy:<tag> zap-baseline.py -t <url> -J zap.json (passive: it requests
pages and reads the responses; never zap-full-scan, which attacks the target). From Docker,
a local app is http://host.docker.internal:<port>.
- Accessibility and performance: the project's own axe or Lighthouse scripts if it has them,
else
npx @axe-core/cli and npx lighthouse against the same address. WCAG needs a manual
keyboard and screen-reader pass as well: list it in the checklist, do not claim it.
3. Standards review
Read ~/.claude/dev-workflow/standards.md. For each area below, start one
dev-workflow:reviewer agent, with the review model from dw.py models, and an audit brief: the area, the sections it covers, the
repositories, and "check the whole codebase, not a diff; every finding with file:line,
severity and fix". Run them in parallel; give none of them another's results.
| Area |
Standards sections |
Certifications |
| Access, auth, tenancy, validation, secrets, crypto, headers, rate limits |
1 |
ASVS, SOC 2 CC6, ISO 27001 A.5.15-18, A.8.2-5, A.8.24 |
| Audit logs, structured logs, health checks, error handling, retries |
3, 4 |
SOC 2 CC4, CC7, ISO 27001 A.8.15-16 |
| AI features, agents, tool calls |
2 |
ISO 42001, OWASP Top 10 for LLMs (skip with a line when there are none) |
| User interface |
5 |
WCAG 2.2 AA (skip when there is none) |
| Dependencies, lockfiles, images, CI, releases, docs |
6 |
SLSA L1, SOC 2 CC8, ISO 27001 A.8.25-32 |
Merge their findings with the scanners' and remove duplicates. Check every critical or high
finding yourself by reading the cited lines before it goes in the report.
4. Owner's checklist
Copy controls.md (beside this file) to checklist.md. Pre-fill each line you can evidence from
the repositories or GitHub (gh api for branch protection, required reviews, Dependabot and
secret scanning; files such as SECURITY.md, CODEOWNERS, incident or backup docs) with the
evidence path, mark the rest owner to provide. Never mark a control met on a guess.
5. The report (README.md)
- One paragraph: overall readiness, the three largest risks, and that certification needs an
outside auditor and the owner's evidence.
- Readiness per standard:
Ready, Gaps (with the count by severity), Not started or
Not applicable (with the reason).
- Findings, most severe first: id, standard, severity,
file:line, the gap, the fix, effort
(S, M, L).
- What was run: scanner versions, dates, targets, what was skipped and why.
- Next steps: the fixes as tasks in the project's workflow (with
taskWorkflow: project, in
the project's own format; otherwise one line each for /dev-workflow:go), then the owner's
items from the checklist, then an outside penetration test and a readiness review by the
audit firm before the real audit.
Report to the user in at most 10 lines: the readiness line per standard, the top five findings,
the report path. Ask before turning findings into tasks.
1---2name: audit3description: Certification readiness audit of a project against the owner's engineering standards and the SOC 2, ISO 27001, ISO 42001, WCAG, OWASP ASVS and SLSA controls. Re4---5---6name: audit7description: Certification readiness audit of a project against the owner's engineering standards and the SOC 2, ISO 27001, ISO 42001, WCAG, OWASP ASVS and SLSA controls. Reports gaps; changes no product code.8argument-hint: "(none: asks which standards) or soc2|iso27001|iso42001|wcag|asvs|slsa|all [--app <local url>]"9disable-model-invocation: true10---1112Audit this project's readiness for certification (`$ARGUMENTS`). The security playbook13(`../../departments/security/playbook.md`) lists the checks a single change gets; this audit14applies them, and the controls below, to the whole project.1516## 0. What to audit1718When `$ARGUMENTS` is empty, ask first, in one AskUserQuestion call with two questions:19201. "Which standards should the audit cover?", multiSelect, header "Standards", options:21 - `All standards (Recommended)`: SOC 2, ISO 27001, ISO 42001, WCAG 2.2 AA, OWASP ASVS L2 and SLSA L1;22 - `Security and compliance`: SOC 2, ISO 27001 and OWASP ASVS;23 - `Accessibility`: WCAG 2.2 AA;24 - `AI and supply chain`: ISO 42001 and SLSA.2526 The person can type single standards under "Other" (for example `soc2, wcag`).272. "Should it also scan the running app?", header "App scan", options:28 - `Code only (Recommended)`;29 - `Also scan the running app`: the person gives its local or preview address under "Other", or30 in a follow-up question when they chose this without one. Never production.3132When `$ARGUMENTS` already names standards or `--app`, skip the questions: `soc2`, `iso27001`,33`iso42001`, `wcag`, `asvs`, `slsa`, `all`, `--app <url>`. A standard left out is reported as34`Not assessed`, never as ready; the scanners still run, since they serve every standard.3536The audit finds and ranks gaps with evidence; it fixes nothing. No tool can certify a37project: SOC 2 and the ISO standards are awarded by an outside auditor after they see the38controls working, and most of what they check is how the organization runs, which only the39owner can supply. Say that once in the report.4041Write everything to `<workflowDir>/audit/<YYYY-MM-DD>/` (`workflowDir` from42`.claude/dev-workflow.json`, default `docs/workflow`): `README.md` (the report), `checklist.md`43(the owner's part) and `raw/` (scanner output). The folder describes weaknesses: keep it out of44git unless the owner says otherwise (add it to `.git/info/exclude` of each repository it sits45in), and never put a secret value in it.4647## 1. Inventory (scout)4849Repositories (`repos` in the configuration, else this folder), stacks, where data is stored,50how users sign in, payment and personal data, AI or agent features, the user interface, CI and51deployment. A wide search goes to `dev-workflow:scout`, started with the `scout` model52(`python3 <plugin folder>/hooks/dw.py models --project <project root>`, the plugin folder being two levels above this file). One table in the report.5354## 2. Scanners5556Run each in its official Docker image with a fixed version tag (record the tag and the date),57mounting the repository read-only, once per repository. If Docker is not running, start it or58say which scanner was skipped. A scanner that fails is reported as not run, never as clean.5960| What | Command (inside `-v <repo>:/src:ro`) | Standard |61|---|---|---|62| Secrets in files and git history | `zricethezav/gitleaks:<tag> detect --source /src --redact --report-format json --report-path /out/gitleaks.json` | ASVS, SOC 2 CC6, ISO A.8 |63| Code patterns (injection, XSS, auth, crypto) | `semgrep/semgrep:<tag> semgrep scan --config p/default --config p/owasp-top-ten --config p/secrets --json -o /out/semgrep.json /src` | ASVS, OWASP Top 10 |64| Vulnerable dependencies | `ghcr.io/google/osv-scanner:<tag> scan source -r /src --format json` | SLSA, SOC 2 CC7, ISO A.8.8 |65| SBOM | `anchore/syft:<tag> dir:/src -o cyclonedx-json` | SLSA, ISO A.5.21 |66| Misconfiguration (Docker, IaC, CI) | `aquasec/trivy:<tag> fs --scanners misconfig,vuln --format json /src` | SLSA, ISO A.8.9 |6768`--redact` is required for gitleaks; record the rule, file and line of each hit, never the value.69Count findings by severity; read only the high and critical ones in full, and check a sample for70false positives before reporting them.7172With `--app <url>`, also scan the running app. The target is a local or preview address the73owner names, never production:7475- `ghcr.io/zaproxy/zaproxy:<tag> zap-baseline.py -t <url> -J zap.json` (passive: it requests76 pages and reads the responses; never `zap-full-scan`, which attacks the target). From Docker,77 a local app is `http://host.docker.internal:<port>`.78- Accessibility and performance: the project's own axe or Lighthouse scripts if it has them,79 else `npx @axe-core/cli` and `npx lighthouse` against the same address. WCAG needs a manual80 keyboard and screen-reader pass as well: list it in the checklist, do not claim it.8182## 3. Standards review8384Read `~/.claude/dev-workflow/standards.md`. For each area below, start one85`dev-workflow:reviewer` agent, with the `review` model from `dw.py models`, and an audit brief: the area, the sections it covers, the86repositories, and "check the whole codebase, not a diff; every finding with `file:line`,87severity and fix". Run them in parallel; give none of them another's results.8889| Area | Standards sections | Certifications |90|---|---|---|91| Access, auth, tenancy, validation, secrets, crypto, headers, rate limits | 1 | ASVS, SOC 2 CC6, ISO 27001 A.5.15-18, A.8.2-5, A.8.24 |92| Audit logs, structured logs, health checks, error handling, retries | 3, 4 | SOC 2 CC4, CC7, ISO 27001 A.8.15-16 |93| AI features, agents, tool calls | 2 | ISO 42001, OWASP Top 10 for LLMs (skip with a line when there are none) |94| User interface | 5 | WCAG 2.2 AA (skip when there is none) |95| Dependencies, lockfiles, images, CI, releases, docs | 6 | SLSA L1, SOC 2 CC8, ISO 27001 A.8.25-32 |9697Merge their findings with the scanners' and remove duplicates. Check every critical or high98finding yourself by reading the cited lines before it goes in the report.99100## 4. Owner's checklist101102Copy `controls.md` (beside this file) to `checklist.md`. Pre-fill each line you can evidence from103the repositories or GitHub (`gh api` for branch protection, required reviews, Dependabot and104secret scanning; files such as `SECURITY.md`, CODEOWNERS, incident or backup docs) with the105evidence path, mark the rest `owner to provide`. Never mark a control met on a guess.106107## 5. The report (`README.md`)1081091. One paragraph: overall readiness, the three largest risks, and that certification needs an110 outside auditor and the owner's evidence.1112. Readiness per standard: `Ready`, `Gaps` (with the count by severity), `Not started` or112 `Not applicable` (with the reason).1133. Findings, most severe first: id, standard, severity, `file:line`, the gap, the fix, effort114 (S, M, L).1154. What was run: scanner versions, dates, targets, what was skipped and why.1165. Next steps: the fixes as tasks in the project's workflow (with `taskWorkflow: project`, in117 the project's own format; otherwise one line each for `/dev-workflow:go`), then the owner's118 items from the checklist, then an outside penetration test and a readiness review by the119 audit firm before the real audit.120121Report to the user in at most 10 lines: the readiness line per standard, the top five findings,122the report path. Ask before turning findings into tasks.