agentleFS
saizulsaizul/security-audit-skills/skills/dependency-audit/SKILL.md

dependency-audit

Skill0 starsChanged 10 days agoMITView on GitHub

Run or read npm audit, pip-audit and composer audit JSON and turn it into one prioritized fix plan - P1 fix now (critical/high with a fix), P2 this sprint, P3 track - with direct vs transitive packages, semver-major warnings, abandoned Composer packages and the exact upgrade command per package. Includes triage guidance on reachability, overrides and when an advisory does not apply. Use when the user asks to fix npm audit / Dependabot / pip-audit / composer audit warnings, "which vulnerable dependencies matter", wants a dependency security report for a Node, Python or PHP project, or a CI gate on known-vulnerable packages.

  • Installs packages

53 other projects use a version of this.

Adopted by

Most recently taken up by

Used with

Projects with it also use api-audit, container-audit and 9 more.

Other files people use alongside this one.

Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
  • gmanch94Skill

    api-audit

    Guides a structured API portfolio audit — from discovery through primary-source-verified inventory, shortcomings analysis, prioritized recommendations, executive summary, and options analysis. Enforces primary-source discipline, cross-file consistency, and advisor review gates. Use when auditing an API portfolio, evaluating a vendor's developer ecosystem, or producing defensible technical analysis of an API set.

    Also in 3 projects that use this

  • grichaSkill

    container-audit

    Audit local Docker images and running containers for hardening issues before deploy — privileged flags, root users, stale base images, missing resource limits. Use for pre-deploy container review.

    Also in 3 projects that use this

  • GitHubSkill

    accessibility-audit

    Audits actual components and routes against applicable WCAG 2.2 A/AA criteria using consumer-owned design-system evidence and repository tools. Use when asked for an accessibility audit, a11y check, keyboard or focus review, contrast check, or screen-reader verification.

    Also in 5 projects that use this

  • AnthropicSkill

    threat-model

    Claude Security plugin: create or update a repository's threat model, or check the findings of a report that this plugin wrote against how the system is deployed.

    Also in 4 projects that use this

  • conorluddySkill

    performance-profiling

    Instruments integration and performance analysis workflows for iOS apps. Use when profiling CPU usage, memory allocation, network activity, or energy consumption. Covers Time Profiler, Allocations, Leaks, Network instruments, and performance optimization strategies.

    Also in 3 projects that use this

  • renfei-designSkill

    a11y-audit

    Audit Figma designs for WCAG accessibility issues — color contrast, minimum font size, touch target sizing, and missing text alternatives. Use when asked to check accessibility, audit contrast ratios, find a11y issues, verify WCAG compliance, or review designs for accessibility problems. Scans nodes, analyzes offline, and annotates issues in Figma.

    Also in 3 projects that use this

The file

We split this skill into the rules it gives an agent

3 rules. 0 are common, 2 are distinctive, and 1 is very specific to this project.

  • 0

    Common

    Most of the 49 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After a widely reported package vulnerability: "are we affected?"

    line 21
  2. Distinctive:

    No fix: mitigate (input validation, config flag, WAF rule), replace the package, or accept with a written reason and review date.

    line 55
  3. Very specific:

    Gate CI: if asked: the audit command plus audit_report.py --fail-on high (see commands.md).

    line 62

“Common” is measured: kept by at least 6 in 10 of the 49 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Dependency audit

Turn noisy audit output into a short, ordered list of upgrades the user can actually ship. Paths below are relative to this skill's folder (in Claude Code: ${CLAUDE_SKILL_DIR}).

When to use

  • "npm audit shows 47 vulnerabilities, what do I fix first?"
  • Dependabot / GitHub security alerts, pip-audit or composer audit output to review
  • A dependency security section for a release checklist or a CI gate
  • After a widely reported package vulnerability: "are we affected?"

When not to use

  • Container image / OS package CVEs (use Trivy, Grype or Docker Scout on the image)
  • A package that is actively malicious (typosquat, hijacked release): go to incident-response-playbook (malicious-dependency) - rotating secrets matters more than upgrading
  • Licence compliance or SBOM generation (use dedicated SBOM tools)

Workflow

  1. Detect the ecosystems from lockfiles: package-lock.json / npm-shrinkwrap.json (npm), requirements*.txt / poetry.lock / uv.lock / Pipfile.lock (Python), composer.lock (PHP). For yarn/pnpm, Poetry and others see references/commands.md.
  2. Produce JSON (these read lockfiles and query advisory databases; they do not change the project). Ask before running them if the user has not, since they use the network:
    npm audit --json > npm-audit.json            # exit code is non-zero when vulns exist; that's fine
    pip-audit -r requirements.txt -f json -o pip-audit.json
    composer audit --format=json --locked > composer-audit.json
  3. Build the plan (read-only).
    python3 scripts/audit_report.py npm-audit.json pip-audit.json composer-audit.json
    python3 scripts/audit_report.py npm-audit.json --json --fail-on critical
    Exit 1 = a finding at or above --fail-on (default high); --fail-on any for pip-audit, which reports no severity. Exit 2 = unreadable or unknown JSON.
  4. Triage before upgrading. For each P1/P2 item decide with the user, using references/triage.md:
    • Is the vulnerable code reachable (server vs build-only/dev dependency, function used)?
    • Direct dependency (upgrade it) or transitive (upgrade the parent named in npm's fixAvailable, or pin with npm overrides / Composer constraint / pip constraint file)?
    • Semver-major fix: read the changelog; plan it as its own change with tests.
    • No fix: mitigate (input validation, config flag, WAF rule), replace the package, or accept with a written reason and review date.
    • pip-audit unknown severity: look up the ID on osv.dev and re-rank.
  5. Propose the change set as exact commands grouped by priority, smallest safe step first (npm audit fix without --force; never npm audit fix --force without showing what majors it pulls). Run upgrades only after the user confirms; then run the tests and re-run the audit to prove the count went down.
  6. Gate CI if asked: the audit command plus audit_report.py --fail-on high (see commands.md).

Output

dependency audit: 13 finding(s) - P1 5, P2 4, P3 4

== P1 fix now ==
- [critical] npm:example-parser (<2.1.0) direct
    Prototype pollution in example-parser
    fix: npm install example-parser@2.1.0
- [high] npm:example-template (<5.0.0) direct
    fix: npm install example-template@5.0.0   # semver-major upgrade: read the changelog and test
...

Then summarise for the user: what to run now (P1), what needs a ticket (P2 with owner), what was accepted and why (P3 / not reachable), and the before/after audit counts.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.