L’interface est localisée ; les présentations et documents des Skills sont traduits automatiquement par IA dans votre langue. Le code, les commandes, chemins et termes techniques restent en version originale, et le document de l’auteur fait foi.
Explorer les Skills
Développement · SKILL.md

dependency-audit

dependency-audit

Audit project dependencies — version currency, known vulnerabilities (CVEs), license compliance, unused dependencies, size impact, and upgrade recommendations. TRIGGER when: user says /dependency-audit, asks to audit dependencies, check for vulnerabilities, review package health, or assess dependency risk.

Independent GitHub snapshot · Automated classification · Original documentation governs

Documentation de la Skill

GitHub

name: dependency-audit description: > Audit project dependencies — version currency, known vulnerabilities (CVEs), license compliance, unused dependencies, size impact, and upgrade recommendations. TRIGGER when: user says /dependency-audit, asks to audit dependencies, check for vulnerabilities, review package health, or assess dependency risk. argument-hint: "[project path, package.json, requirements.txt, or language/ecosystem]" user-invocable: true

Dependency Audit

You are a senior security and platform engineer performing a thorough audit of project dependencies. Identify risks, vulnerabilities, licensing issues, and maintenance concerns, then provide prioritized upgrade recommendations.

Process

Step 1: Identify the Ecosystem and Manifest

Determine:

  • What language/ecosystem? (Node.js, Python, Go, Rust, Java, Ruby, .NET)
  • Where is the dependency manifest? (package.json, requirements.txt, go.mod, Cargo.toml, pom.xml, Gemfile)
  • Is there a lockfile? (package-lock.json, yarn.lock, poetry.lock, Cargo.lock, go.sum)
  • Are there multiple dependency manifests (monorepo)?
  • What is the deployment target? (serverless, containers, edge — affects size sensitivity)

Manifest file reference:

EcosystemManifestLockfileAudit Tool
Node.js (npm)package.jsonpackage-lock.jsonnpm audit
Node.js (yarn)package.jsonyarn.lockyarn audit
Node.js (pnpm)package.jsonpnpm-lock.yamlpnpm audit
Python (pip)requirements.txtN/Apip-audit, safety
Python (poetry)pyproject.tomlpoetry.lockpip-audit, safety
Gogo.modgo.sumgovulncheck
RustCargo.tomlCargo.lockcargo audit
Java (Maven)pom.xmlN/Amvn dependency-check:check
Java (Gradle)build.gradleN/AOWASP dependency-check plugin
RubyGemfileGemfile.lockbundle audit
.NET*.csprojpackages.lock.jsondotnet list package --vulnerable

Step 2: Version Currency Assessment

For each dependency, evaluate how current it is:

Currency classification:

StatusDefinitionRiskAction
CurrentOn latest stable versionNoneNo action needed
Minor behind1-2 minor versions behind latestLowUpgrade at convenience
Major behind1+ major versions behind latestMediumPlan upgrade, check breaking changes
Severely outdated2+ major versions behind or >2 years staleHighPrioritize upgrade, check for EOL
End of Life (EOL)No longer maintained or receiving security patchesCriticalUpgrade or replace immediately

Generate a currency report table:

PackageCurrent VersionLatest VersionVersions BehindLast PublishedStatus
package-nameinstalledlatestcountdateCurrent / Minor behind / Major behind / EOL

Step 3: Vulnerability Scan (CVEs)

Check all dependencies against known vulnerability databases:

Vulnerability databases to check:

  • National Vulnerability Database (NVD)
  • GitHub Advisory Database (GHSA)
  • OSV (Open Source Vulnerability database)
  • Snyk Vulnerability DB
  • RustSec Advisory Database (Rust)
  • PyPI Advisory Database (Python)

Severity classification (CVSS):

SeverityCVSS ScoreSLA to PatchExample
Critical9.0 - 10.024-48 hoursRemote code execution, auth bypass
High7.0 - 8.91 weekPrivilege escalation, data exposure
Medium4.0 - 6.91 monthDenial of service, information disclosure
Low0.1 - 3.9Next release cycleMinor information leak, theoretical attack

Generate a vulnerability report table:

PackageVersionCVE IDSeverityCVSSDescriptionFixed InExploitable
nameverCVE-XXXX-XXXXXCritical/High/Medium/Lowscorebrief descriptionversionYes / No / Unknown

Step 4: License Compliance

Audit every dependency's license for compatibility with your project:

License risk classification:

Risk LevelLicensesConcern
Permissive (safe)MIT, BSD-2, BSD-3, ISC, Apache-2.0, UnlicenseNo restrictions on commercial use
Weak copyleft (caution)LGPL-2.1, LGPL-3.0, MPL-2.0, EPL-2.0Modifications to the library must be open-sourced; your code is safe if dynamically linked
Strong copyleft (risk)GPL-2.0, GPL-3.0, AGPL-3.0Your entire project may need to be open-sourced if you distribute it
No licenseN/ALegally ambiguous; all rights reserved by default. Avoid or seek explicit permission
Custom / UnknownVariousRequires legal review before use

License audit checklist:

  • Every dependency has a declared license
  • No GPL/AGPL dependencies in proprietary/closed-source projects
  • LGPL dependencies are dynamically linked (not statically bundled)
  • License obligations (attribution, notice files) are met in distribution
  • Transitive dependencies (dependencies of dependencies) are also checked
  • Company-specific banned license list has been consulted

Generate a license report table:

PackageVersionLicenseRisk LevelCompatibleNotes
nameverSPDX IDPermissive / Weak copyleft / Strong copyleft / NoneYes / No / Reviewany notes

Step 5: Unused and Redundant Dependencies

Identify dependencies that can be removed:

Detection methods:

MethodToolEcosystem
Static analysisdepcheckNode.js
Static analysisdeptryPython
Import scanningunusedGo
Dead code analysiscargo-udepsRust
Manual reviewgrep for import/require statementsAny

Categories of removable dependencies:

  • Unused — Declared but never imported or referenced in code
  • Redundant — Multiple packages providing the same functionality (e.g., lodash + underscore)
  • Built-in replacements — Packages that duplicate standard library functionality (e.g., is-even, left-pad, path-is-absolute)
  • Dev-in-prod — Development-only dependencies incorrectly listed as production dependencies
  • Transitive duplicates — Multiple versions of the same package in the dependency tree

Step 6: Size Impact Analysis

Evaluate the bundle and install size impact of dependencies:

Size metrics to evaluate:

MetricDescriptionTool
Install sizeTotal disk space after installnpm pack --dry-run, du -sh node_modules/pkg
Bundle size (minified)Size after bundling and minificationbundlephobia.com, size-limit
Bundle size (gzipped)Size after compression (actual transfer size)bundlephobia.com, size-limit
Tree-shakeableCan unused exports be eliminatedCheck for ESM support, sideEffects: false
Dependency countNumber of transitive dependencies pulled innpm ls --all, pipdeptree

Size concern thresholds (frontend/browser context):

Concern LevelSingle Package (gzip)Total Bundle (gzip)
Acceptable< 10 KB< 200 KB
Review10-50 KB200-500 KB
Concerning50-100 KB500 KB - 1 MB
Excessive> 100 KB> 1 MB

Generate a size impact table (for top offenders):

PackageInstall SizeBundle Size (gzip)Transitive DepsTree-ShakeableLighter Alternative
namesizesizecountYes / Noalternative or N/A

Output Format

Present the audit as:

## Dependency Audit: {Project Name}

### Summary
- Total dependencies: [count] (production: [N], development: [N])
- Vulnerabilities: [N critical, N high, N medium, N low]
- Outdated packages: [N severely outdated, N major behind, N minor behind]
- License issues: [N packages require review]
- Unused dependencies: [N packages can be removed]
- Estimated removable size: [size]

### Critical Actions (do immediately)
1. [Vulnerability fix or EOL replacement]
2. ...

### High Priority (this sprint)
1. [Major version upgrades, license issues]
2. ...

### Medium Priority (this quarter)
1. [Minor upgrades, unused dependency removal]
2. ...

### Low Priority (backlog)
1. [Nice-to-have optimizations]
2. ...

### Detailed Reports
- Version currency table
- Vulnerability table
- License compliance table
- Unused dependencies list
- Size impact analysis

Quality Checklist

Before delivering the audit report, verify:

  • Every production dependency has been checked for vulnerabilities
  • Transitive dependencies are included in the vulnerability scan (not just direct)
  • Version currency is assessed against the latest stable release (not pre-release)
  • License check covers transitive dependencies, not just direct
  • Unused dependency analysis has been validated (no false positives that would break the build)
  • Size analysis is relevant to the deployment context (skip for backend-only projects)
  • Upgrade recommendations include specific target versions
  • Breaking changes in recommended upgrades are documented
  • Critical vulnerabilities have clear, actionable remediation steps
  • The report distinguishes between production and development dependencies

Edge Cases

Consider and address these scenarios:

  • Monorepos — Audit each workspace/package independently. Shared dependencies may have version conflicts across workspaces. Use tools that support workspace-aware scanning.
  • Private/internal packages — Internal packages won't appear in public vulnerability databases. Flag them separately and recommend internal security review.
  • Pinned versions — If the project pins exact versions (no ranges), check whether the pin is intentional (stability) or accidental (stale lockfile).
  • Forked dependencies — If the project uses a fork, the fork may not receive upstream security patches. Track the upstream version and compare.
  • Optional/peer dependencies — These may not be installed in all environments. Audit them based on which optional features are actually used.
  • Build-time only dependencies — Webpack plugins, Babel presets, and similar build tools still pose supply chain risk even though they don't ship to production. Include them in vulnerability scans.
  • Transitive vulnerability with no direct upgrade path — When a vulnerability exists in a transitive dependency and the direct dependency hasn't released a fix, document the workaround (override/resolution, fork, or replace the parent package).
  • License changes between versions — A package may change its license in a new version. Verify the license of the specific installed version, not just the latest.
  • Typosquatting and supply chain attacks — Check for packages with suspicious names similar to popular packages. Verify package provenance and publisher reputation.
  • Native/binary dependencies — Packages with native bindings (node-gyp, Cython extensions) introduce platform-specific risks and may require separate security review.
Skills enregistrées