Skip to main content

This skill may not reflect the latest upstream change

Federal Register Rules update on 2026-11-25 may affect this skill Last checked Nov 25, 2026.

SecurityOfficialCertifiedAI reviewed Jul 21, 2026

dependency-scan

We earn commissions when you shop through the links below.

Scan project dependencies for known vulnerabilities (CVEs), auto-fix safe patches, and generate SBOM.

v2.0.17 installs

Install this skill

No account required. Pick your tool, or use the command that detects it for you.

Run in your terminal. It detects your AI tool.

npx @skills-hub-ai/cli install dependency-scan
Or get the file:
Browse all CLI commands β†’
Manual setup by platform

Claude Code

~/.claude/skills/dependency-scan/SKILL.md

Setup guide β†’

Signing

SignedSLSA L2
Signed by
skills-hub.ai distributor
Method
Distributor-signed by skills-hub.aiSigned with the skills-hub.ai Ed25519 distributor key over this exact slug, version and content. Check it with `npx @skills-hub-ai/cli verify`.
Key
skills-hub-ed25519-2026-11
Signed
0Save

Instructions

You are in AUTONOMOUS MODE. Do NOT ask questions. Detect, scan, fix, and report.

TARGET:
$ARGUMENTS

If arguments contain "sbom" or "SBOM", generate a Software Bill of Materials in
addition to the vulnerability scan. If no arguments provided, scan the entire
project in the current working directory.

IMPORTANT: Scan ALL detected package managers β€” monorepos often have multiple (e.g., npm frontend + Python backend). For each vulnerability, record: package name, current version, patched version, severity, CVE/advisory URL, and whether it is direct or transitive. Apply safe fixes (patch-level bumps) automatically, but never apply major version bumps without flagging them. After applying fixes, always re-run the scan to verify resolution and run the project test suite to check for regressions. Do not commit if tests fail.


PHASE 0: PACKAGE MANAGER DETECTION


Scan the project root and subdirectories to detect all package managers in use:

FilePackage ManagerScan Command
package-lock.jsonnpmnpm audit --json
yarn.lockyarnyarn audit --json
pnpm-lock.yamlpnpmpnpm audit --json
requirements.txt / pyproject.toml / Pipfilepippip-audit --format=json
poetry.lockpoetrypoetry audit or pip-audit
Cargo.lockcargocargo audit --json
go.sumgo modgovulncheck -json ./...
pom.xmlMavenmvn dependency-check:check
build.gradle / build.gradle.ktsGradlegradle dependencyCheckAnalyze
Gemfile.lockbundlerbundle audit check --format=json
composer.lockcomposercomposer audit --format=json

A project may have multiple package managers (e.g., monorepo with frontend npm
and backend Python). Detect and scan ALL of them.


PHASE 1: VULNERABILITY SCAN


For each detected package manager, run the appropriate audit command.

NPM:

npm audit --json 2>/dev/null

Parse the JSON output. Extract: package name, severity, CVE/advisory URL,
current version, patched version, whether it is a direct or transitive dependency.

YARN (Classic v1):

yarn audit --json 2>/dev/null

Note: Yarn audit outputs newline-delimited JSON, not a single JSON object.
Parse each line as a separate JSON advisory.

YARN (Berry v2+):

yarn npm audit --json 2>/dev/null

PNPM:

pnpm audit --json 2>/dev/null

PIP:

pip-audit --format=json 2>/dev/null || pip-audit --format=columns 2>/dev/null

If pip-audit is not installed, scan requirements.txt manually and check
versions against known CVE databases using web search.

CARGO:

cargo audit --json 2>/dev/null || cargo audit 2>/dev/null

GO:

govulncheck -json ./... 2>/dev/null || govulncheck ./... 2>/dev/null

BUNDLER:

bundle audit check --format=json 2>/dev/null || bundle audit check 2>/dev/null

If the scan tool is not installed, note it in the output and fall back to
manual analysis of the lock file against known CVEs.


PHASE 2: CATEGORIZE FINDINGS


For each vulnerability found, classify:

  1. Severity: Critical / High / Medium / Low
  2. Dependency type: Direct (in package.json/requirements.txt) or Transitive
  3. Fix available: Yes (patch version exists) / No (no fix yet)
  4. Auto-fixable: Can be fixed by version bump without breaking changes
  5. Breaking change risk: Major version bump required / minor / patch

Sort findings: Critical first, then by fix availability (fixable first).


PHASE 3: AUTO-FIX


Apply fixes in order of safety. Always commit after each fix category.

SAFE FIXES (apply automatically):

For npm:

# Patch-level fixes for direct dependencies
npm audit fix

# If audit fix resolves issues, verify with:
npm audit --json

For yarn (classic):

# Upgrade direct dependencies to patched versions
yarn upgrade <package>@<safe-version>

For pip:

# Update requirements.txt with patched versions
pip install <package>==<safe-version>
pip freeze > requirements.txt  # or update pyproject.toml

For cargo:

cargo update <package>

For go:

go get <package>@<safe-version>
go mod tidy

OVERRIDE FIXES (transitive dependencies):

For npm β€” add overrides in package.json:

{
  "overrides": {
    "<vulnerable-package>": "<safe-version>"
  }
}

For yarn β€” add resolutions in package.json:

{
  "resolutions": {
    "<vulnerable-package>": "<safe-version>"
  }
}

For pip β€” pin transitive dependency in requirements:

<vulnerable-package>>=<safe-version>

After applying overrides:

  • Reinstall dependencies
  • Verify the vulnerable version is gone from the lock file
  • Run the project's test suite to check for regressions

Commit fixes: "fix: resolve N vulnerable dependencies"

RISKY FIXES (major version bumps β€” flag but do not auto-apply):

If a fix requires a major version bump:

  • Document the required change
  • Note potential breaking changes from the changelog
  • Flag for manual review

PHASE 4: SBOM GENERATION (if requested)


If the user requested SBOM generation, produce a Software Bill of Materials:

For npm:

npm sbom --sbom-format=cyclonedx 2>/dev/null || npm ls --json --all

For other managers, generate a dependency tree and format as:

## Software Bill of Materials

| Package | Version | License | Direct/Transitive | Source |
|---------|---------|---------|-------------------|--------|
| express | 4.18.2  | MIT     | Direct            | npm    |
| lodash  | 4.17.21 | MIT     | Transitive        | npm    |

Include license information where available. Flag any copyleft licenses
(GPL, AGPL, LGPL) that may have compliance implications.


SELF-HEALING VALIDATION (max 2 iterations)


After producing the security analysis, validate thoroughness:

  1. Verify every category in the audit was actually checked (not skipped).
  2. Verify every finding has a specific file:line location.
  3. Verify severity ratings are justified by impact assessment.
  4. Verify no false positives by re-reading flagged code in context.

IF VALIDATION FAILS:

  • Re-audit skipped categories or vague findings
  • Verify or remove false positives
  • Repeat up to 2 iterations

OUTPUT


Dependency Vulnerability Report

Project: [name]
Package Managers: [list detected]
Scan Date: [date]

Summary

SeverityTotalFixedRemainingAuto-Fixable
CriticalNNNN
HighNNNN
MediumNNNN
LowNNNN

Fixed Vulnerabilities

[List of packages upgraded/overridden with old β†’ new version]

Remaining Vulnerabilities (no fix available)

PackageVersionSeverityCVEDescriptionWorkaround
pkg-name1.2.3HighCVE-XXXX-XXXXDescriptionSuggested workaround

Breaking Changes Required

[List of major version bumps needed with migration notes]

SBOM

[If requested, include the full SBOM table]


NEXT STEPS


After fixing dependencies:

  • "Run the test suite to verify no regressions from dependency updates."
  • "Run /secure for a full security posture assessment."
  • "Run /owasp to check A06 (Vulnerable Components) compliance."
  • "Schedule recurring dependency scans (weekly recommended)."

SELF-EVOLUTION TELEMETRY


After producing output, record execution metadata for the /evolve pipeline.

Check if a project memory directory exists:

  • Look for the project path in ~/.claude/projects/
  • If found, append to skill-telemetry.md in that memory directory

Entry format:

### /dependency-scan β€” {{YYYY-MM-DD}}
- Outcome: {{SUCCESS | PARTIAL | FAILED}}
- Self-healed: {{yes β€” what was healed | no}}
- Iterations used: {{N}} / {{N max}}
- Bottleneck: {{phase that struggled or "none"}}
- Suggestion: {{one-line improvement idea for /evolve, or "none"}}

Only log if the memory directory exists. Skip silently if not found.
Keep entries concise β€” /evolve will parse these for skill improvement signals.


DO NOT


  • Do NOT apply major version bumps automatically β€” flag them for review.
  • Do NOT remove dependencies to fix vulnerabilities β€” only upgrade or override.
  • Do NOT skip scanning any detected package manager.
  • Do NOT ignore transitive dependencies β€” they are the most common attack vector.
  • Do NOT commit changes if the test suite fails after fixes.
  • Do NOT install global scanning tools β€” use project-local tools or manual analysis.
  • Do NOT expose CVE details that could aid exploitation β€” focus on fix guidance.
This skill doesn’t include stateful context yet, instructions only. Learn about stateful skills.

Security

Loading security scan...

Reviews (0)

Browse all β†’
design-animateAdd purposeful motion to interfaces using modern CSS β€” scroll-driven animations, view transitions, @starting-style, and GPU-accelerated transforms. Triggers: 'add animation', 'animate', 'add motion', 'transitions', 'scroll animation'.78 installsdesign-auditComprehensive autonomous design quality audit across accessibility (WCAG 2.2), performance, theming, responsive/adaptive design, and anti-pattern detection. Triggers: 'audit design', 'check accessibility', 'a11y audit', 'design review', 'UI quality check'.61 installsdiagramGenerate Mermaid architecture diagrams from your codebase. Produces C4 context and container diagrams, sequence diagrams for key flows, ER diagrams from database schemas, and module dependency graphs. Use when you need architecture diagrams, system diagrams, database ERD, sequence diagrams, dependency visualization, or C4 model diagrams.56 installssecureFull-stack security posture assessment with 0-100 risk scoring. Scans dependency vulnerabilities (npm audit, pip-audit, cargo audit, govulncheck), dangerous code patterns (SQL injection, eval, command injection, ReDoS, innerHTML, XSS vectors), authentication gaps (missing auth middleware.56 installsdesign-polishFinal autonomous quality pass before shipping. Fixes alignment, spacing, consistency, typography hierarchy, color harmony, motion timing, and every micro-detail that separates good from great..55 installsresponsiveAudit and fix responsive design issues across all breakpoints. Scans for fixed widths that cause mobile overflow, missing media query variants, non-responsive images, undersized touch targets below 48px, unreadable typography, and horizontal scroll violations..49 installs

More from Skills Hub

View source β†’
security-reviewSecurity audit and vulnerability assessment for any codebase. Scans for authentication bypasses, missing auth middleware, broken JWT validation (algorithm confusion, weak secrets, missing expiry), OAuth state and PKCE flaws, IDOR and horizontal privilege escalation.197 installsunit-testGenerate comprehensive unit tests with edge cases, error paths, and boundary values. Triggers: you need to add unit tests, increase code coverage, test edge cases, or verify error handling paths.164 installsweb-gameScaffolds a browser-based game with Phaser 3, PixiJS, or Three.js including game loop, asset pipeline, responsive canvas, input handling, audio, save/load, and deployment to itch.io or web. Triggers: on: "web game", "browser game", "html5 game", "phaser game", "pixi game".134 installshumanizerMulti-pass editor that removes AI-writing tells from drafted content β€” eliminates filler phrases, balances sentence length, restores opinion and voice, and strips em-dash overuse so posts sound human and opinionated rather than ChatGPT-generic..131 installsflutterBuilds Flutter applications from videos, screenshots, descriptions, or app clone requests. Triggers on: flutter app, build a mobile app, replicate this app in Flutter, build from video, build from screenshots, clone this app, build an app, make an app like, recreate this UI.127 installsdesign-to-codeTurn a design into production-quality frontend code: extract a design system with tokens and components, make layouts responsive across breakpoints, add dark mode with WCAG-compliant theming, then run a UX audit to validate everything..124 installs

More Security skills

Browse category β†’

Frequently asked questions about dependency-scan

What does the dependency-scan skill do?

Scan project dependencies for known vulnerabilities (CVEs), auto-fix safe patches, and generate SBOM. It's a reusable SKILL.md instruction set that loads into your AI coding assistant on demand, no prompt engineering, no copy-pasting every session.

How do I install the dependency-scan skill?

Run `npx @skills-hub-ai/cli install dependency-scan` from your terminal. The CLI writes the SKILL.md to the correct location for your AI tool (e.g. ~/.claude/skills/dependency-scan/ for Claude Code or ~/.cursor/skills/ for Cursor with --target cursor) and adds it to your project's .skills.json lockfile.

Which AI tools does dependency-scan work with?

dependency-scan runs in Claude Code. It follows the open Agent Skills standard (SKILL.md), so the same skill works in every supported tool without modification.

Is the dependency-scan skill free?

Yes. Every skill on skills-hub.ai is free and open-source. There are no premium tiers, paywalls, or usage limits. You only pay for whatever AI assistant you're already using.

How do I use dependency-scan after installing it?

In Claude Code, type `/dependency-scan` (or whatever slash command the skill registers) and the AI follows the skill's instructions immediately. You can also reference it by name in natural language, your AI loads the skill into context when relevant.

Can I share the dependency-scan skill with my team?

Yes. Commit your project's .skills.json lockfile and teammates run `npx @skills-hub-ai/cli install` (no args) to install every skill at the exact version you pinned. Organization-scoped installs work via skills-hub.ai organizations.