skills/supply-chain-audit/SKILL.md
Audit npm/pip/Docker/GitHub Actions for supply chain risks; apply cooldown, lockfile, ignore-scripts, SHA pinning, scanning after approval. Use for 'supply chain audit', 'harden dependencies'. Skip for runtime vulns, secret scanning, code review.
npx skillsauth add montimage/skills supply-chain-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.
Audits a project for the controls that block supply chain attacks — compromised packages, poisoned transitive dependencies, malicious post-install scripts, untrusted base images, hijacked GitHub Actions. Then proposes a layered remediation plan and applies it after explicit user approval.
The skill follows a strict four-phase workflow: detect → audit → plan → apply. Phase boundaries are gates the user crosses, not steps the agent powers through. Do not jump ahead.
Do not use this skill for:
code-review).The apply phase mutates files in the repo (.npmrc, pyproject.toml, Dockerfile, workflow YAMLs). Before any edit, sync with the remote so changes don't land on a stale base:
branch="$(git rev-parse --abbrev-ref HEAD)"
git fetch origin
git pull --rebase origin "$branch"
If the working tree is dirty: git stash → sync → git stash pop. If origin is missing or a rebase conflict appears, stop and ask the user before continuing. Do not skip this — applying changes on a stale tree leaves the user with a confusing rebase to untangle.
The skill runs against the current working directory by default. If the user names a subdirectory ("audit services/api"), cd into it before detection. The skill never crosses repository boundaries on its own.
If the repo is a monorepo with multiple ecosystems (a package.json and a pyproject.toml and a Dockerfile), audit each in turn — do not silently pick one.
Verify before running. Stop and tell the user if any check fails.
git rev-parse --git-dir succeeds). The skill needs git so it can show the user the exact diff before applying.Identify which ecosystems are in play. The scripts/detect_ecosystems.sh helper prints one line per detected ecosystem; use it as a starting point and verify by reading the manifest files yourself.
Supported ecosystems:
| Ecosystem | Trigger files |
|------------------|------------------------------------------------------------------|
| npm/Node | package.json, package-lock.json, pnpm-lock.yaml, yarn.lock |
| Python | pyproject.toml, requirements*.txt, Pipfile, uv.lock, poetry.lock |
| Docker | Dockerfile, Dockerfile.*, docker-compose*.y*ml |
| GitHub Actions | .github/workflows/*.y*ml |
If the repo has multiple, the audit covers each one and the report has one section per ecosystem. If none of these exist, exit with a one-line message ("No supported ecosystems detected — nothing to audit.") and stop.
For each ecosystem detected, read its reference file before auditing:
references/npm.md — npm, pnpm, yarn checks and remediation.references/python.md — pip, uv, Poetry, Pipenv checks and remediation.references/docker.md — Dockerfile and image controls.references/github-actions.md — workflow pinning, permissions, OIDC.Do not load reference files for ecosystems that aren't present. Token discipline matters here — a pure-npm project should never read docker.md.
Print the Phase 1 completion report:
◆ Detect (phase 1 of 4 — read-only)
··································································
Git repository: √ pass
Manifest scan: √ pass (N ecosystems found)
Reference files read: √ pass (npm, docker)
Multiple-lockfile: √ none | × flagged (note)
Criteria: √ 4/4 met
____________________________
Result: PASS
For each detected ecosystem, walk the checklist in its reference file. Each check resolves to one of:
present — the control is in place and correctly configured.partial — the control exists but is weak (e.g., lockfile committed but no npm ci in CI).missing — the control is absent.n/a — does not apply (e.g., no CI yet).Emit the audit report using the template in references/audit-report.md. The report must:
references/scoring.md.Do not propose fixes for things you didn't actually inspect. If you can't tell whether a control is in place (e.g., CI config in a private system), mark it unknown and ask the user.
After emitting the report, stop and wait for the user to decide whether to proceed to Phase 3. Do not auto-roll into planning. The audit alone is a valid deliverable.
Print the Phase 2 completion report:
◆ Audit (phase 2 of 4 — report only)
··································································
Ecosystems detected: √ pass (npm, docker, github-actions)
Findings collected: √ pass (N findings)
Severities assigned: √ pass
Posture computed: √ pass
Criteria: √ 4/4 met
____________________________
Result: PASS
Only enter Phase 3 if the user explicitly agrees. A reply like "looks good" or "interesting" is not approval to plan — ask "Shall I draft a change plan?" if intent is ambiguous.
Use the template in references/change-plan.md. For every proposed change, the plan must state:
ignore-scripts=true breaks packages that legitimately need postinstall (e.g., native modules). Call this out.min-release-age delays security patches; tell the user how to fast-track an override.dependabot auto-bumps unless paired with a SHA-aware updater.git revert is fine, but mention it).Group changes by ecosystem, ordered by severity (apply Critical first). If two changes touch the same file, show them as one combined diff so the user can reason about the final state.
Never include in the plan: changes the audit didn't justify, "while I'm here" cleanups, refactors of unrelated code, dependency upgrades that aren't security-driven. Scope stays inside the audit's findings.
After emitting the plan, stop and wait for explicit approval. Ask: "Approve the plan, approve a subset (list IDs), or reject?" Accept partial approval — the user may want to skip the cooldown setting but accept everything else.
Print the Phase 3 completion report:
◆ Plan (phase 3 of 4 — proposed diffs, nothing applied)
··································································
Findings covered: √ N/N from audit
Out-of-scope changes: √ none
Diffs included: √ pass (every change has a diff block)
Impact statements: √ pass (every change names a downside)
Reversibility lines: √ pass
Criteria: √ 5/5 met
____________________________
Result: PASS
Only enter Phase 4 with explicit approval from Phase 3. If the user approved a subset, apply only those items.
For each approved change:
Read then Edit — do not Write over a file blindly.git diff -- <file>) so the user sees what landed.After all approved edits:
npm ci, uv sync, docker build --check). Do not run anything that takes more than a minute without asking. If a check fails, surface the failure but do not auto-revert — let the user decide.◆ Apply (phase 4 of 4 — local changes only)
··································································
Changes approved: √ N items
Changes applied: √ N items
Files modified: √ <list>
Sanity checks: √ pass | × failed (note)
Commit: — left to user (intentional)
Criteria: √ 4/4 met
____________________________
Result: PASS
.npmrc or a workflow YAML.After applying, offer — don't auto-run:
minimumReleaseAge (point to references/renovate.md if you add one later).syft . -o cyclonedx-json > sbom.json)./schedule.references/npm.md — npm/pnpm/yarn audit & remediation.references/python.md — pip/uv/Poetry/Pipenv audit & remediation.references/docker.md — Dockerfile and image checks.references/github-actions.md — workflow hardening.references/audit-report.md — Phase 2 report template.references/change-plan.md — Phase 3 plan template.references/scoring.md — posture rating rubric.scripts/detect_ecosystems.sh — one-liner ecosystem detection.development
Expand unit test coverage by targeting untested branches and edge cases. Use when users ask to "increase test coverage", "add more tests", "expand unit tests", "cover edge cases", "improve test coverage", "find untested code", "what's not tested", "run coverage report", "write missing tests", or want to identify and fill gaps in existing test suites. Adapts to project's testing framework. Trigger this skill whenever the user mentions test gaps, untested code, coverage percentages, or wants to harden their test suite.
development
Analyze agent skills for security risks, malicious patterns, and potential dangers before installation. Use when asked to "audit a skill", "check if a skill is safe", "analyze skill security", "review skill risk", "should I install this skill", "is this skill safe", "scan this skill", or when evaluating any skill directory for trust and safety. Also triggers when the user pastes a skill install command like "npx skills add https://github.com/org/repo --skill name". Produces a comprehensive security report with a clear install/reject verdict. Trigger this skill proactively whenever the user is about to install a third-party skill or mentions concerns about skill safety.
development
Add OSS-standard files (README, CONTRIBUTING, LICENSE, CODE_OF_CONDUCT, SECURITY, GitHub templates) and run an 8-section readiness audit. Use for 'make this open source', 'OSS readiness', 'public release'. Skip for marketing pages or closed code.
testing
Prepare a repository for end-to-end OSS release across 6 sub-agent steps: audit, branch cleanup, docs, README, publications, optional Pages. Use for 'full OSS prep', 'OSS release flow', 'open-source this repo'. Skip for audit-only (use oss-ready) or single-doc edits.