
audit-dependencies
Use when fixing dependency vulnerabilities, running pnpm audit, or when the audit-dependencies CI check fails
- Installs
- 131
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/payloadcms/payload --skill audit-dependencies- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads audit-dependencies automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
Audit Dependencies
Overview
Fix dependency vulnerabilities reported by .github/workflows/audit-dependencies.sh. Prefer fixes in this order: direct dependency bump > lockfile update > pnpm override. Every override requires justification for why simpler approaches aren't feasible.
Core Workflow
digraph audit {
"Run audit script" [shape=box];
"Group by package" [shape=box];
"Trace dependency chain" [shape=box];
"Can bump direct dep?" [shape=diamond];
"Research breaking changes" [shape=box];
"Breaking changes acceptable?" [shape=diamond];
"Apply direct bump" [shape=box];
"Is version pinned or ranged?" [shape=diamond];
"Lockfile update" [shape=box];
"Apply pnpm override" [shape=box];
"More packages?" [shape=diamond];
"Present plan to user" [shape=box];
"Install and verify" [shape=box];
"Build and verify" [shape=box];
"Commit and create PR" [shape=box];
"Run audit script" -> "Group by package";
"Group by package" -> "Trace dependency chain";
"Trace dependency chain" -> "Can bump direct dep?";
"Can bump direct dep?" -> "Research breaking changes" [label="yes"];
"Can bump direct dep?" -> "Is version pinned or ranged?" [label="no"];
"Research breaking changes" -> "Breaking changes acceptable?";
"Breaking changes acceptable?" -> "Apply direct bump" [label="yes"];
"Breaking changes acceptable?" -> "Is version pinned or ranged?" [label="no"];
"Is version pinned or ranged?" -> "Lockfile update" [label="ranged - fix is in range"];
"Is version pinned or ranged?" -> "Apply pnpm override" [label="pinned - explain why"];
"Apply direct bump" -> "More packages?";
"Lockfile update" -> "More packages?";
"Apply pnpm override" -> "More packages?";
"More packages?" -> "Trace dependency chain" [label="yes"];
"More packages?" -> "Present plan to user" [label="no"];
"Present plan to user" -> "Install and verify";
"Install and verify" -> "Build and verify";
"Build and verify" -> "Commit and create PR";
}
Step-by-Step
1. Run the Audit Script
./.github/workflows/audit-dependencies.sh $ARGUMENTS
$ARGUMENTS is the severity passed to the skill (defaults to high if omitted). The script runs pnpm audit --prod --json and filters for actionable vulnerabilities (those with a patched version available). high includes critical.
Parse the output to build a deduplicated list of vulnerable packages with:
- Package name and current version
- Fixed version requirement
- Full dependency chain (e.g.,
packages/plugin-sentry > @sentry/nextjs > rollup)
2. For Each Vulnerable Package
Trace the dependency chain
Identify whether the vulnerable package is:
- Direct dependency: Listed in a workspace package's
package.json - Transitive dependency: Pulled in by another package
Try direct bump first
For transitive deps, walk up the chain to find the nearest package you control:
- Check if bumping the parent package resolves the vulnerability
pnpm view <parent>@latest dependencies.<vulnerable-pkg>- Check intermediate versions too (the fix may exist in a minor bump)
- If the parent bump resolves it, research breaking changes:
- Check changelogs/release notes
- Search GitHub issues for compatibility problems
- Review the API surface used in this repo (read the source files)
- Check if the version range crosses a major version boundary
- Present findings to user with risk assessment
Parallelize research: When multiple packages need breaking change analysis, dispatch parallel agents (one per package) to research simultaneously.
Check if a lockfile update is sufficient
Before reaching for an override, check whether the parent's version specifier is pinned (exact version like 3.10.3) or ranged (like ^2.3.1, ~4.0.3):
pnpm view <parent> dependencies.<vulnerable-pkg>
If the range already includes the fixed version, a lockfile update is all that's needed:
pnpm update <vulnerable-pkg> --recursive
No package.json changes required — the lockfile was just stale.
Fall back to override only when justified
Add a pnpm override in root package.json only when:
- The parent pins an exact version that doesn't satisfy the fix
- No version of the parent package fixes the vulnerability
- The parent bump has high breaking change risk (major API changes, no test coverage, requires code changes across many files)
- The user explicitly decides to defer the parent bump to a separate PR
Override format: "<parent>><vulnerable-pkg>": "^<fixed-version>"
Override syntax rules:
- Use
^ranges, not>=.>=can cross major versions and cause unexpected resolutions (e.g.,"picomatch": ">=2.3.2"can resolve to 4.x). - pnpm only supports single-level parent scoping:
"parent>pkg"works,"grandparent>parent>pkg"does not. - pnpm does not support version selectors in override keys:
"pkg@^2"does not work. - If the same vulnerable package appears through many transitive paths, a global override may be needed. Be careful that it doesn't affect unrelated consumers on a different major version — use parent-scoped overrides when the package spans multiple major versions across the tree.
- pnpm only honors
overridesin the root workspacepackage.json. Overrides in workspace packages are ignored.
Before adding any override, verify the target version exists:
pnpm view <pkg>@<version> version
3. Present Plan to User
Before applying fixes, present a summary table to the user showing each vulnerability, the proposed fix strategy (direct bump / lockfile update / override), and justification. Get confirmation before proceeding.
4. Apply Fixes
- Edit
package.jsonfiles for direct bumps - Run
pnpm update <pkg> --recursivefor lockfile-only fixes - Edit root
package.jsonpnpm.overridesfor overrides (keep alphabetical) - If a direct bump changes behavior, update consuming code (e.g., adding
allowOverwrite: truewhen an API default changes)
5. Install and Verify
pnpm install
If install fails due to native build errors (e.g., better-sqlite3), fall back to:
pnpm install --ignore-scripts
Then re-run the audit script with the same severity:
./.github/workflows/audit-dependencies.sh $ARGUMENTS
The audit script must exit 0. If vulnerabilities remain, check for additional instances of the same dependency in other workspace packages.
6. Build and Verify
pnpm run build:core
For packages with changed dependencies, also run their specific build:
pnpm run build:<package-name>
7. Look Up CVEs
For each fixed vulnerability, find the GitHub Security Advisory (GHSA):
- Check
https://github.com/<org>/<repo>/security/advisoriesfor each package - Search the web for
<package-name> GHSA <fixed-version> - Record: GHSA ID, CVE ID, severity, one-line description
- Prefer GHSA links (
https://github.com/advisories/GHSA-xxxx-xxxx-xxxx) over NVD links
Parallelize CVE lookups: Dispatch parallel agents to search for CVEs across all packages simultaneously.
8. Commit and Create PR
Commit with conventional commit format:
fix(deps): resolve $ARGUMENTS severity audit vulnerabilities
Create PR using gh pr create with this body structure:
# Overview
[What the PR fixes, mention `pnpm audit --prod`]
## Key Changes
- **[Package name] in [workspace path]**
- [old version] → [new version]. Fixes [GHSA-xxxx-xxxx-xxxx](https://github.com/advisories/GHSA-xxxx-xxxx-xxxx) ([description]).
- [Why this approach: direct bump because X / lockfile update because Y / override because Z]
- [Any code changes required by the bump]
## Design Decisions
[Why direct bumps were preferred, justification for any remaining overrides]
Common Mistakes
| Mistake | Fix |
|---|---|
| Jumping straight to overrides | Check: can you bump the parent? If not, does the semver range already allow the fix (lockfile update)? Only then override. |
Using >= in override ranges | Use ^ to stay within the same major version. >=2.3.2 can resolve to 4.x. |
| Not checking pinned vs ranged | pnpm view <parent> dependencies.<pkg> — if ranged and the fix is in range, just pnpm update. |
Nested override scoping (a>b>c) | pnpm only supports single-level: "parent>pkg". For deeper chains, override the direct parent or use a global override. |
Version selectors in override keys (pkg@^2) | Not supported by pnpm. Use parent-scoped or global overrides instead. |
| Global override affecting multiple major versions | "picomatch": ">=4.0.4" forces all picomatch to 4.x, breaking consumers that need 2.x. Scope overrides to the parent when a package spans multiple majors. |
| Not checking all workspace packages | Same dep may appear in multiple package.json files (e.g., changelogen in both tools/releaser and tools/scripts) |
| Overriding with a nonexistent version | Verify the target version exists with pnpm view before installing |
Not falling back to --ignore-scripts | Pre-existing native build failures block pnpm install; use --ignore-scripts to get lockfile updated |
| Missing code changes for breaking bumps | If a bump changes API defaults, update the calling code |
| Forgetting advisory links in PR | Always look up and include GHSA links for each vulnerability |
| Applying fixes without user confirmation | Present the full plan (strategy per vuln + justification) and get confirmation before making changes |
FAQ
What does the audit-dependencies skill do?
Use when fixing dependency vulnerabilities, running pnpm audit, or when the audit-dependencies CI check fails
How do I install audit-dependencies?
Run npx skills add https://github.com/payloadcms/payload --skill audit-dependencies in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/audit-dependencies/ (personal) or .claude/skills/audit-dependencies/ (project).
Which AI agents can use audit-dependencies?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is audit-dependencies safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains audit-dependencies?
It is published by payloadcms in payloadcms/payload. It has 131 recorded installs.
More from payloadcms/payload
payload
payloadcms/payload
Use when working with Payload projects (payload.config.ts, collections, fields, hooks, access control, Payload API). Use when debugging validation errors, security issues, relationship queries, transactions, or hook behavior.
generate-translations
payloadcms/payload
Use when new translation keys are added to packages to generate new translations strings
triage-ci-flake
payloadcms/payload
Open the skill to read its SKILL.md instructions.
ui4-review
payloadcms/payload
Open the skill to read its SKILL.md instructions.
ui4-convert-tests
payloadcms/payload
Open the skill to read its SKILL.md instructions.
Popular security skills
azure-compliance
microsoft/azure-skills
Run Azure compliance and security audits with azqr plus Key Vault expiration checks. Covers best-practice assessment, resource review, policy/compliance validation, and security posture checks. WHEN: compliance scan, security audit, BEFORE running azqr (compliance cli tool), Azure best practices, Key Vault expiration check, expired certificates, expiring secrets, orphaned resources, compliance assessment.
minimal-run-and-audit
lllllllama/rigorpilot-skills
Rigor Run skill for README-first deep learning repo reproduction. Use when the task is specifically to capture or normalize evidence from the selected smoke test or documented inference or evaluation command and write standardized reprooutputs/ files, including patch notes when repository files changed. Do not use for training execution, initial repo intake, generic environment setup, paper lookup, target selection, hidden scientific-meaning changes, or end-to-end orchestration by itself.
seo-audit
coreyhaines31/marketingskills
When the user wants to audit, review, or diagnose SEO issues on their site. Also use when the user mentions "SEO audit," "technical SEO," "why am I not ranking," "SEO issues," "on-page SEO," "meta tags review," "SEO health check," "my traffic dropped," "lost rankings," "not showing up in Google," "site isn't ranking," "Google update hit me," "page speed," "core web vitals," "crawl errors," "indexing issues," "stuck on page 2," "striking distance keywords," "title tag rewrite," "low CTR," "local SEO," "Google Business Profile," or "map pack." Use this even if the user just says something vague like "my SEO is bad" or "help with SEO" — start with an audit. For building pages at scale to target keywords, see programmatic-seo. For adding structured data, see schema. For AI search optimization, see ai-seo.
firebase-security-rules-auditor
firebase/agent-skills
Audits Firebase (Firestore, Cloud Storage) security rules for vulnerabilities, privilege escalation, role bypasses, create vs update inconsistencies, resource exhaustion, type safety, size limits, and hasOnly ownership checks. Use when auditing/reviewing rules, running red-team rule assessments, or scoring against auditor checklists. Don't use for Firebase CLI (login, deploy), Auth, Crashlytics, Remote Config, or database queries.
audit
pbakaus/impeccable
Run technical quality checks across accessibility, performance, theming, responsive design, and anti-patterns. Generates a scored report with P0-P3 severity ratings and actionable plan. Use when the user wants an accessibility check, performance audit, or technical quality review.
competitors
coreyhaines31/marketingskills
When the user wants to create competitor comparison or alternative pages for SEO and buyer-facing use. Also use when the user mentions 'alternative page,' 'vs page,' 'competitor comparison,' 'comparison page,' '[Product] vs [Product],' '[Product] alternative,' 'competitive landing pages,' 'how do we compare to X,' 'competitor teardown,' 'audit our competitor pages,' 'are our comparison pages out of date,' or 'competitive asset audit.' Use this for any content that positions your product against competitors. Covers four formats: singular alternative, plural alternatives, you vs competitor, and competitor vs competitor. For auditing existing claims (not researching competitors from scratch, which is competitor-profiling; not technical SEO on these pages, which is seo-audit), use the asset audit here. For internal battle cards and sales-specific competitor docs, see sales-enablement.