Supply Chain Audit Skill
Auditing software supply chain security across CI/CD pipelines, container images, and
language package ecosystems. Produces structured findings with severity ratings,
file:line references, and actionable fix templates.
When to Use This Skill
- CI/CD security review: Unpin action refs, excessive permissions, secret leakage
- Dependency pinning: Lock files missing, hash verification absent, mutable semver refs
- Container supply chain: Mutable base image tags, non-root execution, SBOM generation
- Credential hygiene: OIDC migration from long-lived secrets, subject constraint gaps
- Compliance mapping: SLSA L1-L4 readiness assessment, SBOM generation guidance
- Pre-merge gate: Block PRs that introduce High/Critical supply chain regressions
Prerequisites — External Tool Check
Before running the audit, check for missing external tools and offer to install them:
from supply_chain_audit.external_tools import check_missing_tools, install_tool
missing = check_missing_tools()
if missing:
# Show the user what's missing and what each tool does
for tool in missing:
print(f"Missing: {tool['name']} — {tool['description']}")
for opt in tool['install_options']:
print(f" Install: {opt}")
# Ask the user if they want to install
# If yes, install each one:
for tool in missing:
success, msg = install_tool(tool['name'])
print(f" {tool['name']}: {msg}")
The audit runs without these tools (offline/degraded mode) but produces fewer findings:
| Tool |
What's lost without it |
gh |
Cannot resolve action tags to SHAs via GitHub API |
crane |
Cannot resolve container image digests |
syft |
Cannot generate SBOMs (SPDX/CycloneDX) |
grype |
Cannot scan for known CVEs |
cosign |
Cannot verify image signatures or attestations |
Ecosystem Detection
Detect which dimensions apply before running checks:
| Signal |
Ecosystem |
Dimensions Triggered |
.github/workflows/*.yml |
GitHub Actions |
1, 2, 3, 4 |
Dockerfile / docker-compose.yml |
Containers |
5, 12 |
.github/workflows/ with secrets.* |
Credentials |
6 |
*.csproj / NuGet.Config |
.NET / NuGet |
7 |
requirements*.txt / pyproject.toml / setup.cfg |
Python |
8 |
Cargo.toml / Cargo.lock |
Rust |
9 |
package.json / package-lock.json / yarn.lock |
Node.js |
10 |
go.mod / go.sum |
Go |
11 |
Run all triggered dimensions. Report skipped dimensions explicitly.
12 Audit Dimensions
Dimensions 1-4: GitHub Actions
See reference/actions.md
| # |
Name |
What to Check |
| 1 |
Action SHA pinning |
uses: refs must be @<40-char-SHA> # vX.Y.Z |
| 2 |
Workflow permissions |
Top-level permissions: read-all; job-level minimal grants |
| 3 |
Secret exposure |
No secrets in run: echo/env; ACTIONS_STEP_DEBUG guard |
| 4 |
Cache poisoning |
actions/cache key collision; restore-keys breadth |
Dimensions 5 & 12: Containers
See reference/containers.md
| # |
Name |
What to Check |
| 5 |
Base image pinning |
FROM image@sha256:<digest> not :latest or semver tag |
| 12 |
Docker build chain |
Multi-stage scratch/distroless final stage; non-root USER |
Dimension 6: Credentials
See reference/credentials.md
| # |
Name |
What to Check |
| 6 |
OIDC vs long-lived secrets |
Prefer id-token: write OIDC; verify subject constraints |
Dimension 7: .NET / NuGet
See reference/dotnet.md
| # |
Name |
What to Check |
| 7 |
NuGet lock & audit |
RestoreLockedMode, authorized sources, NuGetAudit severity gate |
Dimension 8: Python
See reference/python.md
| # |
Name |
What to Check |
| 8 |
Python dependency integrity |
--require-hashes, --extra-index-url risks, typosquatting signals |
Dimension 9: Rust
See reference/rust.md
| # |
Name |
What to Check |
| 9 |
Cargo supply chain |
Cargo.lock committed, build.rs risk, [patch]/[replace] scope |
Dimension 10: Node.js
See reference/node.md
| # |
Name |
What to Check |
| 10 |
Node.js integrity |
npm ci not npm install, npx resolution, postinstall scripts |
Dimension 11: Go
See reference/go.md
| # |
Name |
What to Check |
| 11 |
Go module integrity |
go.sum present and committed, GONOSUMCHECK, replace directive scope |
5-Step Audit Workflow
Step 1: Scope Detection
# Detect active ecosystems
ls .github/workflows/*.yml 2>/dev/null && echo "GHA detected"
ls Dockerfile docker-compose.yml 2>/dev/null && echo "Containers detected"
ls requirements*.txt pyproject.toml 2>/dev/null && echo "Python detected"
ls package.json 2>/dev/null && echo "Node detected"
ls go.mod 2>/dev/null && echo "Go detected"
ls Cargo.toml 2>/dev/null && echo "Rust detected"
ls *.csproj 2>/dev/null && echo ".NET detected"
Record active dimensions. Skip and annotate inactive ones in the report.
Step 2: Static Analysis (per ecosystem)
Run dimension-specific checks from each reference file. Collect raw findings with:
- Dimension number
- File path and line number (
file:line)
- Current value (the offending pattern)
- Expected value (the fix)
- Severity: Critical / High / Medium / Info
Step 3: Severity Scoring
Map findings to CVSS-aligned severity bands:
| Severity |
CVSS Range |
Examples |
| Critical |
9.0-10.0 |
Unpin third-party action with write permissions + secret access |
| High |
7.0-8.9 |
Mutable action ref; :latest container; long-lived secret with broad scope |
| Medium |
4.0-6.9 |
Missing permissions: read-all; missing Cargo.lock commit |
| Info |
0.1-3.9 |
Semver action ref for first-party org action; advisory-only NuGet finding |
Step 4: Report Generation
Produce a structured markdown report:
## Supply Chain Audit Report
**Date**: YYYY-MM-DD
**Scope**: [list active ecosystems]
**Skipped**: [list inactive ecosystems with reason]
### Summary
| Severity | Count |
| -------- | ----- |
| Critical | N |
| High | N |
| Medium | N |
| Info | N |
### Findings
#### CRITICAL-001 · Dim 1 · Unpin third-party action
- **File**: `.github/workflows/release.yml:14`
- **Current**: `uses: actions/checkout@v4`
- **Expected**: `uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2`
- **Fix**: Look up SHA at https://github.com/actions/checkout/releases
### SLSA Readiness
[See reference/sbom-slsa.md for compliance table]
### Recommended Next Steps
1. Fix all Critical findings before next deployment
2. Delegate lock-file issues to `dependency-resolver` skill
3. Install SHA-pinning pre-commit hooks via `pre-commit-manager` skill
Step 5: Remediation Prioritization
Order fixes:
- Critical first: Unpin + write-permissions + secret-access combinations
- High: Any mutable reference in production workflows
- Delegate: Lock file generation to
dependency-resolver
- Automate: Pre-commit enforcement via
pre-commit-manager
- Compliance: SBOM generation, SLSA provenance — see reference/sbom-slsa.md
Output Format Conventions
- Every finding includes
file:line (e.g., .github/workflows/ci.yml:23)
- Fix templates are copy-pasteable with no placeholders requiring guessing
- SHA lookups always reference the official release page URL
- Severity is explicit per finding; never implicit
- Report ends with a "next steps" section distinguishing manual vs. automatable fixes
Integration Points
| Skill |
When to Delegate |
dependency-resolver |
Lock file conflicts, outdated transitive deps, version incompatibilities |
pre-commit-manager |
Install SHA-pinning hooks, npm ci enforcement, go mod verify hooks |
cybersecurity-analyst |
Runtime threat modeling, network exposure analysis, post-incident review |
silent-degradation-audit |
CI reliability issues, flaky tests masking security regressions |
Evaluation Scenarios
See reference/eval-scenarios.md for three graded scenarios:
- Scenario A: GitHub Actions monorepo — GHA + Python + Node (7 planted findings)
- Scenario B: Containerized Go service — Containers + Go + Credentials (5 findings)
- Scenario C: .NET + Rust mixed repo — .NET + Rust + SLSA readiness (6 findings)
Additional Reference
- SBOM generation, CVSS scoring, SLSA L1-L4 mapping, fix-PR workflow
- Invocation interface, finding schema, inter-skill contracts, error handling
- GitHub Actions SHA lookup:
gh api repos/{owner}/{repo}/git/ref/tags/{tag}
- SLSA framework: https://slsa.dev
- OpenSSF Scorecard: https://securityscorecards.dev
Related Skills
dependency-resolver — lock file conflict resolution
pre-commit-manager — automated quality enforcement hooks
cybersecurity-analyst — runtime security and threat modeling
silent-degradation-audit — CI reliability and regression detection
pr-review-assistant — philosophy-aware PR review including supply chain checks
1---
2name: supply-chain-audit
3version: 1.0.0
4description: |
5 Auditing software supply chain security across CI/CD pipelines, container images, and
6 language ecosystems. Detects mutable dependency references, insecure CI patterns,
7 credential exposure risks, and missing SBOM/SLSA controls. Use when performing a
8 supply chain audit, checking action pinning, auditing dependencies, scanning for
9 CI security issues, reviewing container security, or assessing dependency security.
10 Covers GitHub Actions, containers, Python, Node, Go, Rust, .NET, and more.
11auto_activates:
12 - "supply chain audit"
13 - "audit dependencies"
14 - "check action pinning"
15 - "dependency security"
16 - "CI security audit"
17 - "pin GitHub Actions"
18 - "check for mutable tags"
19 - "SLSA compliance"
20 - "SBOM generation"
21 - "container image pinning"
22priority_score: 72.0
23metadata:
24 source: https://skillmd.com/skills/rysweet/supply-chain-audit
25---
26
27# Supply Chain Audit Skill
28
29Auditing software supply chain security across CI/CD pipelines, container images, and
30language package ecosystems. Produces structured findings with severity ratings,
31`file:line` references, and actionable fix templates.
32
33## When to Use This Skill
34
35- **CI/CD security review**: Unpin action refs, excessive permissions, secret leakage
36- **Dependency pinning**: Lock files missing, hash verification absent, mutable semver refs
37- **Container supply chain**: Mutable base image tags, non-root execution, SBOM generation
38- **Credential hygiene**: OIDC migration from long-lived secrets, subject constraint gaps
39- **Compliance mapping**: SLSA L1-L4 readiness assessment, SBOM generation guidance
40- **Pre-merge gate**: Block PRs that introduce High/Critical supply chain regressions
41
42---
43
44## Prerequisites — External Tool Check
45
46**Before running the audit**, check for missing external tools and offer to install them:
47
48```python
49from supply_chain_audit.external_tools import check_missing_tools, install_tool
50
51missing = check_missing_tools()
52if missing:
53 # Show the user what's missing and what each tool does
54 for tool in missing:
55 print(f"Missing: {tool['name']} — {tool['description']}")
56 for opt in tool['install_options']:
57 print(f" Install: {opt}")
58
59 # Ask the user if they want to install
60 # If yes, install each one:
61 for tool in missing:
62 success, msg = install_tool(tool['name'])
63 print(f" {tool['name']}: {msg}")
64```
65
66The audit runs without these tools (offline/degraded mode) but produces fewer findings:
67
68| Tool | What's lost without it |
69| -------- | ------------------------------------------------- |
70| `gh` | Cannot resolve action tags to SHAs via GitHub API |
71| `crane` | Cannot resolve container image digests |
72| `syft` | Cannot generate SBOMs (SPDX/CycloneDX) |
73| `grype` | Cannot scan for known CVEs |
74| `cosign` | Cannot verify image signatures or attestations |
75
76---
77
78## Ecosystem Detection
79
80Detect which dimensions apply before running checks:
81
82| Signal | Ecosystem | Dimensions Triggered |
83| ---------------------------------------------------- | -------------- | -------------------- |
84| `.github/workflows/*.yml` | GitHub Actions | 1, 2, 3, 4 |
85| `Dockerfile` / `docker-compose.yml` | Containers | 5, 12 |
86| `.github/workflows/` with `secrets.*` | Credentials | 6 |
87| `*.csproj` / `NuGet.Config` | .NET / NuGet | 7 |
88| `requirements*.txt` / `pyproject.toml` / `setup.cfg` | Python | 8 |
89| `Cargo.toml` / `Cargo.lock` | Rust | 9 |
90| `package.json` / `package-lock.json` / `yarn.lock` | Node.js | 10 |
91| `go.mod` / `go.sum` | Go | 11 |
92
93Run all triggered dimensions. Report skipped dimensions explicitly.
94
95---
96
97## 12 Audit Dimensions
98
99### Dimensions 1-4: GitHub Actions
100
101See [reference/actions.md](reference/actions.md)
102
103| # | Name | What to Check |
104| --- | -------------------- | ----------------------------------------------------------- |
105| 1 | Action SHA pinning | `uses:` refs must be `@<40-char-SHA> # vX.Y.Z` |
106| 2 | Workflow permissions | Top-level `permissions: read-all`; job-level minimal grants |
107| 3 | Secret exposure | No secrets in `run:` echo/env; `ACTIONS_STEP_DEBUG` guard |
108| 4 | Cache poisoning | `actions/cache` key collision; restore-keys breadth |
109
110### Dimensions 5 & 12: Containers
111
112See [reference/containers.md](reference/containers.md)
113
114| # | Name | What to Check |
115| --- | ------------------ | --------------------------------------------------------- |
116| 5 | Base image pinning | `FROM image@sha256:<digest>` not `:latest` or semver tag |
117| 12 | Docker build chain | Multi-stage scratch/distroless final stage; non-root USER |
118
119### Dimension 6: Credentials
120
121See [reference/credentials.md](reference/credentials.md)
122
123| # | Name | What to Check |
124| --- | -------------------------- | --------------------------------------------------------- |
125| 6 | OIDC vs long-lived secrets | Prefer `id-token: write` OIDC; verify subject constraints |
126
127### Dimension 7: .NET / NuGet
128
129See [reference/dotnet.md](reference/dotnet.md)
130
131| # | Name | What to Check |
132| --- | ------------------ | ------------------------------------------------------------------- |
133| 7 | NuGet lock & audit | `RestoreLockedMode`, authorized sources, `NuGetAudit` severity gate |
134
135### Dimension 8: Python
136
137See [reference/python.md](reference/python.md)
138
139| # | Name | What to Check |
140| --- | --------------------------- | -------------------------------------------------------------------- |
141| 8 | Python dependency integrity | `--require-hashes`, `--extra-index-url` risks, typosquatting signals |
142
143### Dimension 9: Rust
144
145See [reference/rust.md](reference/rust.md)
146
147| # | Name | What to Check |
148| --- | ------------------ | -------------------------------------------------------------------- |
149| 9 | Cargo supply chain | `Cargo.lock` committed, `build.rs` risk, `[patch]`/`[replace]` scope |
150
151### Dimension 10: Node.js
152
153See [reference/node.md](reference/node.md)
154
155| # | Name | What to Check |
156| --- | ----------------- | ------------------------------------------------------------------- |
157| 10 | Node.js integrity | `npm ci` not `npm install`, `npx` resolution, `postinstall` scripts |
158
159### Dimension 11: Go
160
161See [reference/go.md](reference/go.md)
162
163| # | Name | What to Check |
164| --- | ------------------- | ------------------------------------------------------------------------- |
165| 11 | Go module integrity | `go.sum` present and committed, `GONOSUMCHECK`, `replace` directive scope |
166
167---
168
169## 5-Step Audit Workflow
170
171### Step 1: Scope Detection
172
173```bash
174# Detect active ecosystems
175ls .github/workflows/*.yml 2>/dev/null && echo "GHA detected"
176ls Dockerfile docker-compose.yml 2>/dev/null && echo "Containers detected"
177ls requirements*.txt pyproject.toml 2>/dev/null && echo "Python detected"
178ls package.json 2>/dev/null && echo "Node detected"
179ls go.mod 2>/dev/null && echo "Go detected"
180ls Cargo.toml 2>/dev/null && echo "Rust detected"
181ls *.csproj 2>/dev/null && echo ".NET detected"
182```
183
184Record active dimensions. Skip and annotate inactive ones in the report.
185
186### Step 2: Static Analysis (per ecosystem)
187
188Run dimension-specific checks from each reference file. Collect raw findings with:
189
190- **Dimension number**
191- **File path and line number** (`file:line`)
192- **Current value** (the offending pattern)
193- **Expected value** (the fix)
194- **Severity**: Critical / High / Medium / Info
195
196### Step 3: Severity Scoring
197
198Map findings to CVSS-aligned severity bands:
199
200| Severity | CVSS Range | Examples |
201| ------------ | ---------- | --------------------------------------------------------------------------- |
202| **Critical** | 9.0-10.0 | Unpin third-party action with write permissions + secret access |
203| **High** | 7.0-8.9 | Mutable action ref; `:latest` container; long-lived secret with broad scope |
204| **Medium** | 4.0-6.9 | Missing `permissions: read-all`; missing `Cargo.lock` commit |
205| **Info** | 0.1-3.9 | Semver action ref for first-party org action; advisory-only NuGet finding |
206
207### Step 4: Report Generation
208
209Produce a structured markdown report:
210
211```markdown
212## Supply Chain Audit Report
213
214**Date**: YYYY-MM-DD
215**Scope**: [list active ecosystems]
216**Skipped**: [list inactive ecosystems with reason]
217
218### Summary
219
220| Severity | Count |
221| -------- | ----- |
222| Critical | N |
223| High | N |
224| Medium | N |
225| Info | N |
226
227### Findings
228
229#### CRITICAL-001 · Dim 1 · Unpin third-party action
230
231- **File**: `.github/workflows/release.yml:14`
232- **Current**: `uses: actions/checkout@v4`
233- **Expected**: `uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2`
234- **Fix**: Look up SHA at https://github.com/actions/checkout/releases
235
236### SLSA Readiness
237
238[See reference/sbom-slsa.md for compliance table]
239
240### Recommended Next Steps
241
2421. Fix all Critical findings before next deployment
2432. Delegate lock-file issues to `dependency-resolver` skill
2443. Install SHA-pinning pre-commit hooks via `pre-commit-manager` skill
245```
246
247### Step 5: Remediation Prioritization
248
249Order fixes:
250
2511. **Critical first**: Unpin + write-permissions + secret-access combinations
2522. **High**: Any mutable reference in production workflows
2533. **Delegate**: Lock file generation to `dependency-resolver`
2544. **Automate**: Pre-commit enforcement via `pre-commit-manager`
2555. **Compliance**: SBOM generation, SLSA provenance — see [reference/sbom-slsa.md](reference/sbom-slsa.md)
256
257---
258
259## Output Format Conventions
260
261- Every finding includes `file:line` (e.g., `.github/workflows/ci.yml:23`)
262- Fix templates are copy-pasteable with no placeholders requiring guessing
263- SHA lookups always reference the official release page URL
264- Severity is explicit per finding; never implicit
265- Report ends with a "next steps" section distinguishing manual vs. automatable fixes
266
267---
268
269## Integration Points
270
271| Skill | When to Delegate |
272| -------------------------- | ------------------------------------------------------------------------ |
273| `dependency-resolver` | Lock file conflicts, outdated transitive deps, version incompatibilities |
274| `pre-commit-manager` | Install SHA-pinning hooks, `npm ci` enforcement, `go mod verify` hooks |
275| `cybersecurity-analyst` | Runtime threat modeling, network exposure analysis, post-incident review |
276| `silent-degradation-audit` | CI reliability issues, flaky tests masking security regressions |
277
278---
279
280## Evaluation Scenarios
281
282See [reference/eval-scenarios.md](reference/eval-scenarios.md) for three graded scenarios:
283
284- **Scenario A**: GitHub Actions monorepo — GHA + Python + Node (7 planted findings)
285- **Scenario B**: Containerized Go service — Containers + Go + Credentials (5 findings)
286- **Scenario C**: .NET + Rust mixed repo — .NET + Rust + SLSA readiness (6 findings)
287
288---
289
290## Additional Reference
291
292- [SBOM generation, CVSS scoring, SLSA L1-L4 mapping, fix-PR workflow](reference/sbom-slsa.md)
293- [Invocation interface, finding schema, inter-skill contracts, error handling](reference/contracts.md)
294- GitHub Actions SHA lookup: `gh api repos/{owner}/{repo}/git/ref/tags/{tag}`
295- SLSA framework: https://slsa.dev
296- OpenSSF Scorecard: https://securityscorecards.dev
297
298---
299
300## Related Skills
301
302- `dependency-resolver` — lock file conflict resolution
303- `pre-commit-manager` — automated quality enforcement hooks
304- `cybersecurity-analyst` — runtime security and threat modeling
305- `silent-degradation-audit` — CI reliability and regression detection
306- `pr-review-assistant` — philosophy-aware PR review including supply chain checks