/skillry-security:dependency-supply-chain-reviewfrom skillry-security
Audits dependency graphs for CVEs, typosquatting, install-time scripts, and lockfile integrity. Provides severity-graded remediation for npm, yarn, pip, and poetry projects.
Ships in skillry-security. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Audit the project's package dependency graph for known CVEs, suspicious install-time scripts, lockfile integrity issues, typosquatting candidates, outdated packages with breaking changes, and transitive dependency risks. Every finding gets a severity, a concrete package reference, and a prioritized remediation step. The audit is read-only and non-destructive — no packages are installed, upgraded, or removed without explicit user approval.
A dependency review that only runs npm audit and lists the output is not sufficient. The goal is to assess exploitability in context (a server-side RCE in a browser-only bundle is different from one in a server process), to check install-time code execution, to verify lockfile integrity, and to identify structural supply-chain risks such as namespace confusion or unreviewed postinstall scripts.
Skillry 3.0.0 merged these former skills into this one. The procedure below stays the default; when the task matches a row, open only that reference.
| Former skill | Reference | Use for |
|---|---|---|
agent-supply-chain-review | references/agent-supply-chain-review.md | third-party agents, skills, MCP servers, plugins, tool definitions, shared prompts, install scripts: provenance, injection scan, declared vs runtime tools, isolation, verdict |
npm audit, yarn audit, or pip-audit has flagged vulnerabilities and you need a structured remediation plan.package-lock.json, yarn.lock, poetry.lock, pnpm-lock.yaml) is missing or was recently deleted and regenerated.Confirm lockfile presence and integrity. Check that package-lock.json / yarn.lock / pnpm-lock.yaml / poetry.lock exists and is committed. A missing lockfile means installs are non-deterministic. Verify the lockfile was generated by the matching tool and version (check lockfileVersion in package-lock.json — v3 for npm 7+).
Run the audit non-destructively. Execute npm audit --json or yarn audit --json and capture the output to a temp file. Do not run npm audit fix --force without reviewing the proposed changes. For Python, run pip-audit --format json. For Go, run govulncheck ./....
Classify each CVE by exploitability in this project. For every finding, determine:
Inspect install-time scripts. For every dependency with postinstall, prepare, preinstall, or install scripts in its package.json, read what the script does. Flag any that download binaries, execute curl/wget, modify system files, or phone home. Legitimate packages like esbuild and puppeteer download platform-specific binaries — verify the download uses a checksum.
Check for typosquatting candidates. Compare recently added package names against their intended counterparts: lodash vs l0dash, express vs expres. Pay special attention to packages added in the last PR with few public downloads or a short publish history. Use the npm registry API to check download counts and creation dates.
Audit transitive dependency pinning. For CVEs in transitive (indirect) dependencies where a direct upgrade cannot resolve the issue, check whether overrides (npm 8+) or resolutions (yarn) can pin the safe transitive version. Document which CVEs are unresolvable without a major dependency change.
Verify CI uses a reproducible install command. npm ci fails when the lockfile is out of sync with package.json, ensuring reproducibility. npm install silently updates the lockfile. CI pipelines must use npm ci (or yarn install --frozen-lockfile / pnpm install --frozen-lockfile).
Check for outdated major versions. Run npm outdated and flag packages more than one major version behind, especially those with known end-of-life status (e.g., a runtime version past its LTS window, a framework version with no security patches).
Review private registry configuration. If .npmrc configures a private registry scope, confirm it is scoped to the organization's namespace (e.g., @company/*) and does not redirect all traffic through an untrusted registry. Unscoped private registry config enables dependency confusion attacks where a public package with the same name and a higher version takes precedence.
Document approved exceptions. For CVEs assessed as not exploitable in context, create or update an audit exception file (e.g., npm-audit-exceptions.json or .auditignore) with the CVE ID, the package, the reason for the exception, the reviewer's name, and the review date.
lockfileVersion field).npm audit (or equivalent) returns zero critical or high findings, or all findings have documented exceptions with justification.curl/wget, or modify paths outside the package directory.overrides/resolutions where a direct upgrade cannot fix them.npm ci / --frozen-lockfile / --immutable, not npm install..npmrc scopes any private registry to @org-scope/* only; no full-redirect to an untrusted registry.package.json dependencies ranges are not * or >=0.0.0 for production packages.devDependencies are not require()-d in application code that ships to production.# Detect package manager from lockfile
ls package-lock.json 2>/dev/null && echo "npm" || true
ls pnpm-lock.yaml 2>/dev/null && echo "pnpm" || true
ls yarn.lock 2>/dev/null && echo "yarn" || true
ls bun.lockb 2>/dev/null && echo "bun" || true
ls poetry.lock 2>/dev/null && echo "poetry (python)" || true
# Non-destructive npm audit (capture JSON; do NOT run fix yet)
npm audit --json > /tmp/npm-audit.json 2>&1
cat /tmp/npm-audit.json | python3 -c "import json,sys; d=json.load(sys.stdin); print('critical:', d.get('metadata',{}).get('vulnerabilities',{}).get('critical',0), 'high:', d.get('metadata',{}).get('vulnerabilities',{}).get('high',0))"
# Python / pip
pip-audit --format json --output /tmp/pip-audit.json 2>/dev/null || echo "pip-audit not installed"
# Go
govulncheck ./... 2>/dev/null || echo "govulncheck not installed"
# Check lockfile version
node -e "const l=require('./package-lock.json'); console.log('lockfileVersion:', l.lockfileVersion)"
# Inspect all postinstall / prepare scripts in direct dependencies
node -e "
const pkg = require('./package.json');
const deps = {...(pkg.dependencies||{}), ...(pkg.devDependencies||{})};
Object.keys(deps).forEach(name => {
try {
const p = require('./node_modules/' + name + '/package.json');
const s = p.scripts || {};
const hooks = ['postinstall','preinstall','install','prepare'].filter(k => s[k]);
if (hooks.length) console.log(name + '@' + p.version + ':', hooks.map(k => k + '=' + s[k]).join(' | '));
} catch(e) {}
});
"
# Check for outdated packages (read-only)
npm outdated 2>/dev/null || true
# Check private registry config
cat .npmrc 2>/dev/null | grep -E "registry|scope" || echo "no .npmrc"
# Check whether CI uses npm ci or npm install
rg -n "npm install\b" .github/workflows/ .gitlab-ci.yml Makefile 2>/dev/null || true
rg -n "npm ci\b" .github/workflows/ .gitlab-ci.yml Makefile 2>/dev/null || true
# Check for wildcard or loose version ranges in production deps
node -e "
const pkg = require('./package.json');
Object.entries(pkg.dependencies||{}).forEach(([k,v]) => {
if (v === '*' || v.startsWith('>=0') || v.startsWith('x')) console.log('LOOSE RANGE:', k, v);
});
"
# Check devDependencies used in production code (node_modules audit)
# List devDep names, then grep for require/import of those names in src/
node -e "const p=require('./package.json'); Object.keys(p.devDependencies||{}).slice(0,20).forEach(n=>console.log(n))" \
| xargs -I{} sh -c 'rg -l "require.*{}\|from.*{}" src/ 2>/dev/null && echo "DEV IN PROD: {}" || true'
# Typosquatting quick check: compare package names against npm registry
# (manual step — check these with: npm view <suspected-package> time --json | head -5)
# Look for: very recent creation, <1000 weekly downloads, owner with no other packages
# Transitive CVE: identify the dependency chain for a specific package
npm ls <vulnerable-package> 2>/dev/null | head -20
# Check overrides/resolutions in package.json
node -e "const p=require('./package.json'); console.log(JSON.stringify(p.overrides||p.resolutions||{}, null,2))"
# Verify the lockfile is what was actually installed (hash check)
npm ci --dry-run 2>/dev/null | tail -5 || echo "dry-run not supported; run npm ci in CI only"
| Severity | Example |
|---|---|
| Critical | Remotely exploitable CVE (RCE, SQL injection) in a package reachable from a production request handler. Postinstall script downloads and executes arbitrary code. Confirmed typosquatting package installed. |
| High | XSS or path traversal CVE in a package handling untrusted user input. Lockfile deleted and regenerated without audit of version changes. npm install (not npm ci) used in CI, allowing lockfile drift. |
| Medium | ReDoS or DoS CVE in a package reachable from user input. Loose production version range (^1.0.0 is fine; >=1 <99 is not). devDependency found in production code. Outdated major version with known vulnerabilities in that major. |
| Low | Informational CVE not reachable in this project's code paths, with a documented exception. Outdated minor version with no known vulnerability. Missing audit exception documentation for a known, assessed CVE. |
npm install in CI: the lockfile can mutate between CI runs; always use npm ci. A failing npm ci is not a problem to paper over — it signals a real inconsistency between package.json and the lockfile.devDependencies promoted to production: a require() in application code that pulls a dev-only package will silently fail in a production Docker image built from npm ci --omit=dev.--legacy-peer-deps flag in CI: this flag silently installs incorrect peer versions. Its presence signals an outdated dependency graph that needs resolution, not suppression.@acme is not claimed on the public registry, an attacker can publish @acme/internal-lib publicly with a higher version and npm will prefer it (dependency confusion attack).puppeteer, cypress, esbuild, and similar packages download platform binaries at install time. Verify the download script checks a hash against a bundled manifest — unchecked binary downloads are a supply chain risk.npm audit inspects node_modules, but if a vulnerable package is bundled into a client-side chunk via webpack/rollup and then dropped from node_modules (e.g., via tree-shaking), audit may not flag it. Check the final bundle's included packages separately.## Dependency Supply Chain Review
### Critical CVEs requiring immediate fix
| Package | Installed | Safe version | CVE | Exploitable in this project |
|---------|-----------|-------------|-----|----------------------------|
### High CVEs — fix before next release
| Package | Installed | Safe version | CVE | Notes |
### Suspicious install-time scripts
- package@version: script content summary, risk level, recommendation.
### Outdated packages (1+ major behind)
| Package | Current | Latest | EOL? | Upgrade priority |
|---------|---------|--------|------|-----------------|
### Lockfile status
- Present: yes/no. Generator: npm/yarn/pnpm. Version: X. CI uses reproducible install: yes/no.
### Private registry config
- .npmrc present: yes/no. Scoped to org namespace only: yes/no. Risk: none/low/high.
### Audit exceptions (assessed not exploitable)
| CVE | Package | Reason | Reviewer | Date |
### Recommended next commands
1. npm audit fix # review diff before committing — run npm audit again after to confirm
2. ...
### Summary
- Total direct dependencies: N. Total audit findings: N (critical: N, high: N).
- Single highest-priority action: one sentence.
npm audit --json (read-only) only. Do not run npm audit fix --force, npm install, or any script that modifies node_modules or the lockfile without explicit user approval..npmrc auth values.What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub fluxonlab/skillry --plugin skillry-security3 skills in this plugin
Other plugins' skills for the same job