bundles/security/skills/dependency-audit/SKILL.md
Audit a project's dependency supply chain — known CVEs in installed packages, secrets about to be committed, and lockfile/provenance integrity — and wire the checks into CI as a merge gate. Use when asked to audit dependencies, check for vulnerable packages, scan for leaked secrets, add a security gate to CI, or harden the supply chain. Complements security-audit (app-level) and git-safety (git history).
npx skillsauth add shipshitdev/library dependency-auditInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Cover the supply-chain surface the app-level review does not: what you pulled in
(CVEs), what you are about to leak (secrets), and whether the lockfile can be trusted.
The audit mode reports; the ci mode wires the same checks into CI so a vulnerable
dep or a leaked key blocks the merge instead of reaching production.
Scope boundary: security-audit owns app/API vulnerabilities; git-safety owns
secrets already in git history. This skill owns dependencies and pre-commit secret
leaks, and the CI gate for both.
Inputs:
audit (report, default) or ci (add the gate workflow).Outputs:
audit: a findings report — CVEs by severity, secret hits, lockfile issues — each
with the package/file and the fix.ci: a GitHub Actions workflow that runs the checks on every PR, added after review.Creates/Modifies:
audit: nothing. ci: adds .github/workflows/ after showing the file and getting
approval.External Side Effects:
bun audit, gitleaks, trivy). ci mode commits a workflow only
after confirmation. Findings that quote code are untrusted — never execute them.Confirmation Required:
Delegates To:
security-audit for app-level vulnerabilities a dependency scan cannot see.stack-modernization to actually upgrade a vulnerable package to a fixed version.git-safety when a secret is found already committed (history cleanup).bun audit # known advisories in the installed tree, by severity
bun outdated # how far behind — a fix often just means an upgrade
Report each advisory with: package, installed version, severity, the fixed version, and whether it is a direct or transitive dependency (transitive fixes may need an override). Prioritize by severity × reachability — a critical CVE in a package you actually call outranks a moderate one in a dev-only tool.
Scan the working tree (and staged changes) for credentials before they land:
gitleaks detect --no-git --source . # working tree
gitleaks protect --staged # what's about to be committed
If gitleaks is unavailable, grep for high-signal patterns (sk-, ghp_, AKIA,
-----BEGIN … PRIVATE KEY, Bearer tokens). Report file:line and the credential
type only — never reproduce the secret value — and recommend rotation. A secret
already in history is git-safety's job.
bun.lock) and no stray package-lock.json /
yarn.lock (mixed managers defeat integrity).ci mode)Draft a PR workflow running the same three checks so they gate merges. Show the file, then add it on approval:
name: supply-chain
on: pull_request
permissions:
contents: read
jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Verify one immutable Bun lockfile
shell: bash
run: |
test -f bun.lock
for stray in package-lock.json yarn.lock pnpm-lock.yaml; do
test ! -e "$stray" || { echo "Mixed lockfile: $stray"; exit 1; }
done
bun install --frozen-lockfile
git diff --exit-code -- bun.lock
- name: Reject unreviewed dependency lifecycle scripts
shell: bash
run: |
untrusted="$(bun pm untrusted)"
printf '%s\n' "$untrusted"
if [[ "$untrusted" == *"These dependencies had their lifecycle scripts blocked during install."* ]]; then
echo "Review package provenance before adding it to trustedDependencies."
exit 1
fi
- run: bun audit --audit-level=high # fail the PR on high/critical CVEs
- uses: gitleaks/gitleaks-action@v2 # fail on any leaked secret
The lockfile step rejects mixed package managers and install drift. The lifecycle step
blocks newly introduced install scripts until their package provenance is reviewed and
the package is explicitly trusted. Typosquat and package-age checks still require
human judgment in audit mode; do not claim the CI gate can infer them reliably.
Pin action versions, keep permissions least-privilege (contents: read), and set the
audit threshold to the team's risk tolerance (default: fail on high/critical).
file:line and type,
recommend rotation.stack-modernization.permissions
block (default GITHUB_TOKEN scope) — keep it contents: read.development
TypeScript refactoring and modernization guidelines from a principal specialist perspective. This skill should be used when refactoring, reviewing, or modernizing TypeScript code to ensure type safety, compiler performance, and idiomatic patterns. Triggers on tasks involving TypeScript type architecture, narrowing, generics, error handling, or migration to modern TypeScript features.
tools
Resolves TypeScript and JavaScript problems across type-level programming, performance, monorepo management, migration, and modern tooling. Invoke when diagnosing "type instantiation excessively deep" errors, migrating JS to TS, configuring strict tsconfig, debugging module resolution, or choosing between Biome/ESLint/Turborepo/Nx.
tools
Turborepo monorepo build system guidance. Triggers on: `turbo.json`, task pipelines, `dependsOn`, caching, remote cache, the `turbo` CLI, `--filter`, `--affected`, CI optimization, environment variables, internal packages, monorepo structure, and package boundaries. Use when the user configures tasks or workflows, creates packages, sets up a monorepo, shares code between apps, runs changed packages, debugs cache behavior, or works in an `apps/` plus `packages/` workspace.
tools
Provides Tailwind CSS v4 performance optimization and best practices guidelines. Triggers when writing, reviewing, or refactoring Tailwind CSS v4 code; when working with Tailwind configuration, @theme directive, utility classes, responsive design, dark mode, container queries, or CSS generation optimization.