Audit project dependencies, frameworks, languages, and dev tools for known vulnerabilities, CVEs, and security anti-patterns. Use when the user mentions 'dependency audit,' 'npm audit,' 'CVE,' 'vulnerable packages,' 'supply chain security,' 'outdated dependencies,' 'known vulnerabilities,' 'security advisory,' 'package security,' 'framework vulnerability,' 'is this package safe,' or needs to check whether their stack has known security issues.
69
85%
Does it follow best practices?
Impact
—
No eval scenarios have been run
Risky
Do not use without reviewing
Audit project dependencies, frameworks, language runtimes, and dev tools for known vulnerabilities (CVEs), security anti-patterns, and supply chain risks.
Identify everything in use — not just direct dependencies but the full chain:
Package manifests — read and catalog:
Node/JS: package.json, package-lock.json, yarn.lock, pnpm-lock.yaml
Python: requirements.txt, Pipfile.lock, pyproject.toml, poetry.lock
Ruby: Gemfile, Gemfile.lock
Go: go.mod, go.sum
Rust: Cargo.toml, Cargo.lock
Java: pom.xml, build.gradle
PHP: composer.json, composer.lock
.NET: *.csproj, packages.configFramework and runtime versions:
Dev tools and CI/CD:
Edge cases in package manifests:
optionalDependencies — installed but not audited by defaultpeerDependencies — version range may not match what's installedoverrides / yarn resolutions / pnpm overrides — check if used to silence advisories rather than fix thempackages/*/package.json and apps/*/package.json, not just the rootengines field — older-than-LTS Node makes other audits mootRun the appropriate audit command for the project:
# Node.js
npm audit --json # full structured output
npm audit --omit=dev --json # production-only: filters dev/build-time vulns
# Compare the two — vulns only in dev/build tooling do not ship to users
# and should be triaged as lower priority. Don't bury this in the report.
# Python
pip audit # If pip-audit installed
safety check # If safety installed
# Ruby
bundle audit
# Go
govulncheck ./...
# Rust
cargo audit
# PHP
composer audit
# .NET
dotnet list package --vulnerable
# Docker
docker scout cves <image>
trivy image <image>
# General (if Trivy is available)
trivy fs .Applying fixes — read before you --force:
npm audit fix # safe: upgrades within stated ranges
npm audit fix --dry-run --force # ALWAYS dry-run first
npm audit fix --force # only after reviewing the dry-runnpm audit fix --force can resolve an advisory by DOWNGRADING a package to an older version that doesn't trigger the audit signature. This is almost always wrong (e.g. downgrading next@16 to next@9 to "fix" a transitive postcss CVE). Inspect dry-run output for "Will install X@Y, which is a breaking change" — that's the tool trying to downgrade.
When npm audit fix cannot resolve an advisory (transitive dep pinned by an upstream package):
npm ls <package> + reading the parent's source can rule it out as unreachable.package.json overrides pin to a patched version (test thoroughly — overrides can break the parent).Beyond CVEs in packages, check for known vulnerability patterns specific to the framework in use. Search for recent advisories and common misconfiguration issues.
For every direct dependency, cross-reference the installed version against:
https://github.com/advisories?ecosystem=npm&query=<package>https://github.com/<org>/<repo>/security/advisoriesThe framework-specific patterns below cover evergreen anti-patterns (mass assignment, debug-in-prod, etc.). Recent CVEs need a fresh check because hardcoded advisory lists rot fast and LLM training data is often 6+ months behind the latest.
Next.js / React:
dangerouslySetInnerHTML without sanitizationnext/image with unrestricted domains).env files in public directory or client bundle (NEXT_PUBLIC_ prefix leaking secrets)process.env.SECRET or instantiating a DB client should start with import "server-only"; — fails the build if imported from a Client Componentlib/ that touch process.env.[A-Z_]+ but do NOT import server-only"use client" importing from such a module is a leaknext.config.js security headersDjango:
*)@csrf_exempt on state-changing viewsextra(), raw(), or RawSQL without parameterizationRails:
where("column = '#{input}'")Express / Node.js:
Object.assign, lodash.merge, deep-extendreq.params in file serving routeseval() or Function() with user inputServerless / edge runtimes (Vercel, Lambda, Cloud Run, Workers):
Map or Set for rate limiting, sessions, or caches is per-instance. Cold starts reset state; load spreads across instances; attackers bypass trivially.
const rateLimitMap = new Map, const cache = new Map in server-action / API-route filesx-forwarded-for trust: only trustworthy when the edge overwrites it. Behind misconfigured proxy chains it's attacker-spoofable. A fallback to a single "unknown" bucket throttles all anonymous traffic together; random-fallback silently disables the limit.Spring / Java:
Laravel / PHP:
$fillable / $guardedWordPress:
Beyond known CVEs, look for supply chain attack indicators:
Dependency confusion / substitution:
.npmrc or pip.conf scoping to private registryTyposquatting:
Malicious packages:
scripts.postinstall in package.json)Maintenance risk:
Lockfile integrity:
git ls-files | grep -E 'package-lock\.json|yarn\.lock|pnpm-lock\.yaml|Gemfile\.lock|poetry\.lock|composer\.lock|Cargo\.lock|go\.sum'.github/workflows/*.yml, .gitlab-ci.yml, Jenkinsfile, vercel.json, netlify.toml, Dockerfilenpm install (bad) vs npm ci (good); yarn install (bad) vs yarn install --immutable (good); pip install -r (bad) vs pip install --require-hashes -r (good)integrity hashes present in the lockfile? (modern npm/pnpm yes by default)GitHub Actions:
pull_request_target trigger with checkout of PR code (code injection risk)uses: actions/checkout@main vs @v4.1.0 or SHA pin)${{ github.event.issue.title }} in run: blocksDocker:
USER directive)trivy or docker scout)docker history)latest tag instead of pinned versionTerraform / IaC:
.tf files# Dependency & Stack Security Audit
## Project: [name]
## Stack: [language, framework, key tools]
## Date: [date]
### Stack Inventory
| Component | Version | Latest | Status |
|-----------|---------|--------|--------|
### Known Vulnerabilities (CVEs)
| Package | Installed | Vuln | Severity | Where reachable | CVE | Fix Version |
|---------|-----------|------|----------|-----------------|-----|-------------|
Where reachable values: `runtime` / `build-only` / `dev-only`. Confirm with `npm ls --omit=dev <package>` or inspect the deployment artifact (Vercel function bundle, Docker layer). Build- and dev-only vulnerabilities should not block a release on their own; runtime-reachable ones should.
### Framework-Specific Issues
#### [SEVERITY] [Title]
**Component:** [framework/tool name and version]
**Issue:** [description]
**Evidence:** [code or config snippet]
**Remediation:** [specific fix]
### Supply Chain Risks
| Risk | Package/Component | Details | Remediation |
|------|-------------------|---------|-------------|
### Dev Tool / CI Security
| Tool | Issue | Severity | Remediation |
|------|-------|----------|-------------|
### Prioritized Action Plan
1. [Critical — actively exploited CVEs, RCE vulnerabilities]
2. [High — known CVEs with public exploits, supply chain risks]
3. [Medium — framework misconfigurations, outdated dependencies]
4. [Low — maintenance risks, best practice improvements]c9ade03
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.