agentleFS
imtiazrayhanimtiazrayhan/agentscamp-library/skills/dependency-audit/SKILL.md

dependency-audit

Skill1 starsChanged 5 days agoMITView on GitHub

Audit project dependencies for known vulnerabilities and turn the raw scanner output into a triaged, prioritized upgrade plan. Use when an audit is noisy, a CVE was reported, or you need to know which advisories actually matter.

47 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

  • 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

  • OpenAISkill

    threat-model

    Use when Codex is already in the threat-modeling phase of a security scan, the user explicitly invokes $threat-model, or the user explicitly asks to create, update, or persist a repository threat model. Do not use as the primary trigger for full PR, commit, branch, patch, or repository scans.

    Also in 4 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

  • OpenAISkill

    security-scan

    Use for a standard, single-pass security audit of an entire repository or a scoped path, package, folder, or submodule with no diff to review. This is the default repository scan. Do not use for PR, commit, branch, or working-tree diffs, or for deep, multi-pass scans.

    Also in 4 projects that use this

The file

We split this skill into the rules it gives an agent

1 rule. 0 are common, 1 is distinctive, and 0 are very specific to this project.

  • 0

    Common

    Most of the 43 edited versions we read keep these.

  • 1

    Distinctive

    This author's own choices. Worth a look.

  • 0

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    After tracing usage, the triaged summary downgrades the unreachable one and prioritizes the reachable one:

    line 43

“Common” is measured: kept by at least 6 in 10 of the 43 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

Run the ecosystem's vulnerability audit, then do the part the scanner won't: separate exploitable, reachable advisories from transitive noise and propose the minimal upgrade that closes the real risk. The skill reads the actual lockfile, runs the native audit tool, traces each flagged package to how it's used in the codebase, and rewrites the severity in context — so a critical-rated advisory in a build-only dependency you never call doesn't outrank a moderate one on the request path.

When to use this skill

  • An audit (npm audit, pip-audit, cargo audit, …) prints a wall of advisories and you need to know which ones to act on first.
  • A specific CVE or GitHub advisory landed and you want to confirm whether your usage is actually reachable.
  • You want the smallest safe set of version bumps — not a blanket npm audit fix --force that breaks the build.
  • A security gate is failing CI and you need to justify a documented downgrade or suppression.

[!WARNING] A vulnerability's CVSS score rates the flaw in the abstract, not your exposure to it. Never act on severity alone — an unreachable "critical" is lower priority than a reachable "moderate" on your request path. This skill exists to make that distinction explicit.

Instructions

  1. Locate the manifest and lockfile. Find the dependency files (package.json + package-lock.json/pnpm-lock.yaml/yarn.lock, requirements.txt/poetry.lock/Pipfile.lock, Cargo.lock, go.mod/go.sum, Gemfile.lock). The lockfile is the source of truth for resolved versions — audit that, not the loose ranges in the manifest.
  2. Detect the audit tool — do not guess. Match the ecosystem and run its native auditor: npm audit --json (or pnpm audit --json / yarn npm audit), pip-audit -r requirements.txt -f json (or poetry/uv equivalents), cargo audit --json, govulncheck ./..., bundle audit. Prefer the JSON output so you can parse advisories programmatically.
  3. Classify each advisory by reachability. For every flagged package, determine: is it a direct or transitive dependency? Is it a runtime, dev, build, or test-only dependency? Then grep/Glob the codebase for actual imports and calls of the vulnerable API. A package present in the tree but never imported — or imported only in tooling that never runs in production — is not reachable and should be downgraded in priority.
  4. Rewrite severity in context. State the original score, then the contextual priority with a one-line reason: the affected code path, whether attacker-controlled input can reach it, and the deployment surface (public endpoint vs. local CLI vs. CI-only). govulncheck does call-graph reachability natively — trust it over a flat npm audit when available.
  5. Compute the minimal safe upgrade. For each issue worth fixing, find the lowest patched version that resolves it. Prefer in-range patch/minor bumps; flag major bumps and transitive-only fixes (which may need an overrides/resolutions pin or a dependency-tree update) separately as higher-effort. Never blanket-run --force fixes.
  6. Verify the fix. Apply the proposed bumps in a scratch step, re-run the audit, and run the build/test command to confirm nothing broke (npm ci && npm test, pytest, cargo build, …). Re-running the auditor must show the targeted advisories cleared.
  7. Report and flag gaps. Produce a triaged summary: act now (reachable, fixable), monitor (unreachable or no patch yet), and suppressed (false positive / accepted risk, with reason). Call out any advisory with no fix available and any transitive issue you couldn't resolve without a major upgrade.

[!TIP] If an advisory is genuinely not applicable, record it in the tool's ignore file (.npmrc audit overrides, pip-audit --ignore-vuln, cargo audit's audit.toml, .trivyignore) with a dated justification comment — don't silently suppress it, and don't leave it failing CI for the next person to re-triage.

Examples

Input — raw npm audit reports two advisories at face value:

# npm audit report
minimatch  <3.0.5   high     ReDoS via brace expansion   (transitive, via glob → eslint)
axios      <1.6.0   medium   XSRF-TOKEN leak to cross-origin hosts  (direct, used in src/api/client.ts)

After tracing usage, the triaged summary downgrades the unreachable one and prioritizes the reachable one:

Dependency audit — 2 advisories, 1 actionable

[ACT NOW]  axios  0.27.2 → 1.6.0   (medium, contextually HIGH)
  CSRF / XSRF-TOKEN leak to cross-origin hosts (CVE-2023-45857). axios is
  on the live request path in src/api/client.ts and forwards a user-supplied
  `targetUrl` — the XSRF-TOKEN cookie can leak to attacker-controlled hosts.
  In-range minor bump; no breaking API changes used.

[MONITOR]  minimatch  3.0.4 → 3.0.5   (high, contextually LOW)
  ReDoS via brace expansion. Pulled in transitively by eslint (dev only);
  never bundled or executed in production, and no untrusted pattern reaches
  it. Patched by `npm dedupe` or an override — fix opportunistically, not
  blocking. Original "high" score reflects the flaw, not our exposure.

Verification: applied axios bump, `npm ci && npm test` green,
re-ran `npm audit` → axios advisory cleared.
Gap: minimatch fix requires an eslint transitive bump; left for the next
dep-update PR.

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.