DevSecOps Supply Chain Audit
ultrathink
Output path directive (canonical — overrides in-body references).
All file outputs from this skill MUST be written under .anthril/audits/devsecops-supply-chain-audit/.
Run mkdir -p .anthril/audits/devsecops-supply-chain-audit before the first Write call.
Primary artefact: .anthril/audits/devsecops-supply-chain-audit/<artefact>.
Do NOT write to the project root or to bare filenames at cwd.
Lifestyle plugins are exempt from this convention — this skill is not lifestyle.
When to use
Run this skill when the user mentions:
- Supply-chain audit, DevSecOps
- SLSA, SBOM, Dependabot, Renovate
- Dependency security, secrets scanning, SCA
- Branch protection review
Detects every ecosystem in the repo (npm, pnpm, yarn, pip, Poetry, Go modules, Cargo, Bundler, Maven, Gradle, Composer, Docker images, Terraform providers) and spawns one sub-agent per ecosystem. Covers dependency pinning (lockfile committed, exact-vs-range, integrity hashes), vulnerability surface (npm audit, pip-audit, govulncheck, bundler-audit, trivy, grype), secret scanning (gitleaks-style patterns against HEAD and history), SBOM generation (Syft, CycloneDX), provenance and signing (SLSA level, cosign, sigstore, npm --provenance), branch protection, CODEOWNERS coverage, and Dependabot/Renovate configuration.
Before You Start
- Determine operating mode.
--live runs vulnerability scanners available on the system (npm audit, pip-audit, govulncheck, bundler-audit, trivy). --apply can open PRs pinning dependencies, adding dependabot.yml, or hardening branch protection via gh api.
- Detect ecosystems. Run
scripts/detect-ecosystems.sh. One sub-agent per ecosystem detected.
- Load
.secops-ignore for suppression (e.g., accepting a vulnerability in a dev dependency).
- Sub-agent budget. One agent per ecosystem. 2–6 sub-agents typical.
User Context
$ARGUMENTS
Ecosystems detected: !bash "${CLAUDE_PLUGIN_ROOT}/skills/devsecops-supply-chain-audit/scripts/detect-ecosystems.sh"
Live scanners: !which npm pip-audit govulncheck trivy 2>/dev/null | head -4 || echo "none available"
Audit Phases
Phase 1: Discovery & Mode Selection
- Parse ecosystem output. Set up one sub-agent per ecosystem.
- Check for repo-wide signals (Dependabot config, CODEOWNERS, branch-protection docs, signing config).
- Confirm mode with user.
Phase 2: Repo-wide Signal Snapshot
Collect:
.github/dependabot.yml presence and ecosystem coverage
renovate.json / .renovaterc presence
.github/CODEOWNERS presence and coverage
- Branch protection (via
gh api repos/:owner/:repo/branches/main/protection in live mode)
- Commit signing (
git log --show-signature -1 in live mode)
- SLSA level clues (
--provenance in publish workflows, signed releases, reproducible builds)
SECURITY.md presence
.gitleaks.toml / secret scan config
Phase 3: Parallel Sub-Agent Audit (one per ecosystem)
Spawn sub-agents simultaneously. Each receives:
- Ecosystem identifier (npm / pip / go / ruby / cargo / maven / docker / terraform)
- Pre-detected manifest files and lockfiles
- The audit taxonomy and severity rubric from
reference.md
- The operating mode
- Scanner output from live mode (if available)
Each sub-agent walks categories A–H:
- A. Dependency pinning — lockfile present and committed? exact vs range? integrity hashes where supported (npm
integrity, pip hash, cargo checksum, go go.sum)
- B. Vulnerability surface — count CRITICAL/HIGH/MEDIUM/LOW from scanner. Known-actively-exploited CVEs called out.
- C. Secret patterns — gitleaks/trufflehog-style patterns (AWS keys, private key headers, high-entropy strings) across tracked files. Live mode extends to
git log -p (history).
- D. SBOM & provenance — SBOM generation configured? SLSA level (L0–L4)?
npm publish --provenance for npm packages?
- E. Image signing — cosign config? sigstore?
cosign verify works live?
- F. Branch protection (repo-wide) — required reviews, required status checks, signed commits, linear history, restrict deletions
- G. CODEOWNERS — covers sensitive paths (
.github/, infra/, auth/, payments/)
- H. Automation — Dependabot / Renovate grouping sensible, security-only fast-lane for critical vulns
Phase 4: Merge & SLSA Self-Assessment
- Merge sub-agent findings. Apply
.secops-ignore.
- Compute SLSA level per
reference.md §3:
- L0: no provenance
- L1: provenance generated
- L2: hosted build with authenticated publish
- L3: hardened, tamper-evident build service
- L4: two-party review + reproducible builds
- Assign
SEC-001… IDs.
Phase 5: Remediation Drafting
Per finding, emit actionable remediation:
- Dependency pinning fixes → commented diff for
package.json / requirements.txt / go.mod
- Vulnerability surface →
npm audit fix / pip install -U commands (but commented — user runs)
- Secret leaks (current files) → listed with
file:line and a rotation instruction
- Secret leaks (history) →
git filter-repo command block (requires explicit user action)
- Branch protection gaps →
gh api PATCH commands (commented)
Output files: devsecops-supply-chain-audit.md, devsecops-supply-chain-audit.json, slsa-self-assessment.md, and sbom.json if generated in live mode.
Phase 6: Apply Mode (opt-in)
Interactive. Per finding:
- Safe: lockfile regeneration,
.github/dependabot.yml creation, SECURITY.md stub, CODEOWNERS addition.
- Require confirmation: branch-protection API calls, opening PRs.
- Never auto-applied: history rewrites (
git filter-repo), secret rotation, publishing changes.
Phase 7: Reporting
Render report from templates/output-template.md.
Scoring
Weights: A=15, B=25, C=20, D=10, E=5, F=15, G=5, H=5 (sum 100). See reference.md §4.
| Total |
Verdict |
| 90+ |
PASS |
| 70–89 |
PASS WITH WARNINGS |
| 50–69 |
CONDITIONAL |
| <50 |
FAIL |
Important Principles
- Known-exploited CVEs are always CRITICAL. Check against CISA's Known Exploited Vulnerabilities (KEV) catalogue.
- A leaked secret in the current HEAD is CRITICAL even if the secret was later "removed". It's in history. Surface + rotate.
- SLSA L1 is achievable in a weekend. SLSA L3 requires infrastructure. Set expectations.
- Dependabot on its own isn't enough. Many teams enable it and ignore the PRs. Flag if the last 10 Dependabot PRs are unmerged.
- Dev dependencies matter. A compromised dev-dep can exfiltrate secrets during
npm install.
- Signed commits are a weak signal alone — combine with branch-protection-required and required-reviews.
- Australian English. DD/MM/YYYY. Markdown-first.
Edge Cases
- Monorepo. Sub-agents may need to walk multiple package.jsons / requirements.txts inside one ecosystem. Aggregate findings per ecosystem.
- Private registry. If lockfile references a private registry, live-mode scanners may fail with auth errors — record as limitation and continue static.
- Archived repo. Downgrade findings by one tier; note archival state.
- First-party code vulnerabilities. Out of scope — refer to
software-development plugin.
- Secrets found in history but rotated. Document but do not suppress — history rewrite is still recommended.
- No lockfile (pure
package.json). CRITICAL for JS/TS, HIGH for Python (requirements.txt without ==).
- Go modules with
replace directives pointing at forks. Audit the fork's provenance.
1---
2name: devsecops-supply-chain-audit
3description: Audit software supply chain across every ecosystem (npm, pip, Go, Ruby, Cargo, Maven, Docker, Terraform) — pinning, vulnerabilities, secrets, SBOM, signing, branch protection, CODEOWNERS. One sub-agent per ecosystem. Three modes.
4argument-hint: [repo-path]
5allowed-tools: Read Grep Glob Write Edit Bash(bash:*) Agent
6effort: high
7metadata:
8 source: https://skillmd.com/skills/aibot88/devsecops-supply-chain-audit
9---
10
11# DevSecOps Supply Chain Audit
12
13ultrathink
14
15<!-- anthril-output-directive -->
16> **Output path directive (canonical — overrides in-body references).**
17> All file outputs from this skill MUST be written under `.anthril/audits/devsecops-supply-chain-audit/`.
18> Run `mkdir -p .anthril/audits/devsecops-supply-chain-audit` before the first `Write` call.
19> Primary artefact: `.anthril/audits/devsecops-supply-chain-audit/<artefact>`.
20> Do NOT write to the project root or to bare filenames at cwd.
21> Lifestyle plugins are exempt from this convention — this skill is not lifestyle.
22
23## When to use
24
25Run this skill when the user mentions:
26- Supply-chain audit, DevSecOps
27- SLSA, SBOM, Dependabot, Renovate
28- Dependency security, secrets scanning, SCA
29- Branch protection review
30
31Detects every ecosystem in the repo (npm, pnpm, yarn, pip, Poetry, Go modules, Cargo, Bundler, Maven, Gradle, Composer, Docker images, Terraform providers) and spawns one sub-agent per ecosystem. Covers dependency pinning (lockfile committed, exact-vs-range, integrity hashes), vulnerability surface (`npm audit`, `pip-audit`, `govulncheck`, `bundler-audit`, `trivy`, `grype`), secret scanning (gitleaks-style patterns against HEAD and history), SBOM generation (Syft, CycloneDX), provenance and signing (SLSA level, cosign, sigstore, `npm --provenance`), branch protection, CODEOWNERS coverage, and Dependabot/Renovate configuration.
32
33## Before You Start
34
351. **Determine operating mode.** `--live` runs vulnerability scanners available on the system (`npm audit`, `pip-audit`, `govulncheck`, `bundler-audit`, `trivy`). `--apply` can open PRs pinning dependencies, adding `dependabot.yml`, or hardening branch protection via `gh api`.
362. **Detect ecosystems.** Run `scripts/detect-ecosystems.sh`. One sub-agent per ecosystem detected.
373. **Load `.secops-ignore`** for suppression (e.g., accepting a vulnerability in a dev dependency).
384. **Sub-agent budget.** One agent per ecosystem. 2–6 sub-agents typical.
39
40## User Context
41
42$ARGUMENTS
43
44Ecosystems detected: !`bash "${CLAUDE_PLUGIN_ROOT}/skills/devsecops-supply-chain-audit/scripts/detect-ecosystems.sh"`
45
46Live scanners: !`which npm pip-audit govulncheck trivy 2>/dev/null | head -4 || echo "none available"`
47
48---
49
50## Audit Phases
51
52### Phase 1: Discovery & Mode Selection
53
541. Parse ecosystem output. Set up one sub-agent per ecosystem.
552. Check for repo-wide signals (Dependabot config, CODEOWNERS, branch-protection docs, signing config).
563. Confirm mode with user.
57
58### Phase 2: Repo-wide Signal Snapshot
59
60Collect:
61
62- `.github/dependabot.yml` presence and ecosystem coverage
63- `renovate.json` / `.renovaterc` presence
64- `.github/CODEOWNERS` presence and coverage
65- Branch protection (via `gh api repos/:owner/:repo/branches/main/protection` in live mode)
66- Commit signing (`git log --show-signature -1` in live mode)
67- SLSA level clues (`--provenance` in publish workflows, signed releases, reproducible builds)
68- `SECURITY.md` presence
69- `.gitleaks.toml` / secret scan config
70
71### Phase 3: Parallel Sub-Agent Audit (one per ecosystem)
72
73Spawn sub-agents simultaneously. Each receives:
74- Ecosystem identifier (npm / pip / go / ruby / cargo / maven / docker / terraform)
75- Pre-detected manifest files and lockfiles
76- The audit taxonomy and severity rubric from `reference.md`
77- The operating mode
78- Scanner output from live mode (if available)
79
80Each sub-agent walks categories A–H:
81
82- **A. Dependency pinning** — lockfile present and committed? exact vs range? integrity hashes where supported (npm `integrity`, pip `hash`, cargo `checksum`, go `go.sum`)
83- **B. Vulnerability surface** — count CRITICAL/HIGH/MEDIUM/LOW from scanner. Known-actively-exploited CVEs called out.
84- **C. Secret patterns** — gitleaks/trufflehog-style patterns (AWS keys, private key headers, high-entropy strings) across tracked files. Live mode extends to `git log -p` (history).
85- **D. SBOM & provenance** — SBOM generation configured? SLSA level (L0–L4)? `npm publish --provenance` for npm packages?
86- **E. Image signing** — cosign config? sigstore? `cosign verify` works live?
87- **F. Branch protection (repo-wide)** — required reviews, required status checks, signed commits, linear history, restrict deletions
88- **G. CODEOWNERS** — covers sensitive paths (`.github/`, `infra/`, `auth/`, `payments/`)
89- **H. Automation** — Dependabot / Renovate grouping sensible, security-only fast-lane for critical vulns
90
91### Phase 4: Merge & SLSA Self-Assessment
92
931. Merge sub-agent findings. Apply `.secops-ignore`.
942. Compute SLSA level per `reference.md` §3:
95 - L0: no provenance
96 - L1: provenance generated
97 - L2: hosted build with authenticated publish
98 - L3: hardened, tamper-evident build service
99 - L4: two-party review + reproducible builds
1003. Assign `SEC-001…` IDs.
101
102### Phase 5: Remediation Drafting
103
104Per finding, emit actionable remediation:
105- Dependency pinning fixes → commented diff for `package.json` / `requirements.txt` / `go.mod`
106- Vulnerability surface → `npm audit fix` / `pip install -U` commands (but commented — user runs)
107- Secret leaks (current files) → listed with `file:line` and a rotation instruction
108- Secret leaks (history) → `git filter-repo` command block (requires explicit user action)
109- Branch protection gaps → `gh api` PATCH commands (commented)
110
111Output files: `devsecops-supply-chain-audit.md`, `devsecops-supply-chain-audit.json`, `slsa-self-assessment.md`, and `sbom.json` if generated in live mode.
112
113### Phase 6: Apply Mode (opt-in)
114
115Interactive. Per finding:
116- **Safe**: lockfile regeneration, `.github/dependabot.yml` creation, `SECURITY.md` stub, CODEOWNERS addition.
117- **Require confirmation**: branch-protection API calls, opening PRs.
118- **Never auto-applied**: history rewrites (`git filter-repo`), secret rotation, publishing changes.
119
120### Phase 7: Reporting
121
122Render report from `templates/output-template.md`.
123
124---
125
126## Scoring
127
128Weights: A=15, B=25, C=20, D=10, E=5, F=15, G=5, H=5 (sum 100). See `reference.md` §4.
129
130| Total | Verdict |
131|---|---|
132| 90+ | PASS |
133| 70–89 | PASS WITH WARNINGS |
134| 50–69 | CONDITIONAL |
135| <50 | FAIL |
136
137---
138
139## Important Principles
140
141- **Known-exploited CVEs are always CRITICAL.** Check against CISA's Known Exploited Vulnerabilities (KEV) catalogue.
142- **A leaked secret in the current HEAD is CRITICAL even if the secret was later "removed".** It's in history. Surface + rotate.
143- **SLSA L1 is achievable in a weekend.** SLSA L3 requires infrastructure. Set expectations.
144- **Dependabot on its own isn't enough.** Many teams enable it and ignore the PRs. Flag if the last 10 Dependabot PRs are unmerged.
145- **Dev dependencies matter.** A compromised dev-dep can exfiltrate secrets during `npm install`.
146- **Signed commits are a weak signal alone** — combine with branch-protection-required and required-reviews.
147- **Australian English. DD/MM/YYYY. Markdown-first.**
148
149---
150
151## Edge Cases
152
1531. **Monorepo.** Sub-agents may need to walk multiple package.jsons / requirements.txts inside one ecosystem. Aggregate findings per ecosystem.
1542. **Private registry.** If lockfile references a private registry, live-mode scanners may fail with auth errors — record as limitation and continue static.
1553. **Archived repo.** Downgrade findings by one tier; note archival state.
1564. **First-party code vulnerabilities.** Out of scope — refer to `software-development` plugin.
1575. **Secrets found in history but rotated.** Document but do not suppress — history rewrite is still recommended.
1586. **No lockfile (pure `package.json`).** CRITICAL for JS/TS, HIGH for Python (requirements.txt without `==`).
1597. **Go modules with `replace` directives pointing at forks.** Audit the fork's provenance.