
Dependencies Audit
Automatically find and fix npm/pnpm dependency vulnerabilities, outdated packages, deprecations, and license risks in a Flows app and produce the required review-packages.md artifact.
Install
npx skills add https://github.com/cognitedata/builder-skills --skill dependencies-auditWhat is this skill?
- MUST-run skill for dependency issues in Flows apps—finds and fixes, not report-only
- Step 1 inventories all dependencies and devDependencies with version listing
- Step 2 pulls npm metadata and drives outdated package updates
- Produces review-packages.md required by the Flows app review process
- Triggers on npm audit fix, pnpm audit fix, CVE, deprecated packages, and supply-chain keywords
Adoption & trust: 1k installs on skills.sh; 4 GitHub stars; 1/3 security scanners passed (skills.sh audits); trending (+100% hot-view momentum).
Recommended Skills
Journey fit
Ship is the canonical shelf because the skill closes supply-chain and CVE gaps immediately before or during app review, not merely during initial feature coding. Security subphase fits npm audit fixes, CVE remediation, license compliance, and deprecated dependency removal called out in the skill triggers.
Common Questions / FAQ
Is Dependencies Audit safe to install?
skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.
SKILL.md
READMESKILL.md - Dependencies Audit
# Dependencies Fix Find and fix all dependency issues in **$ARGUMENTS** (or the root `package.json` if no argument is given) — vulnerabilities, outdated packages, deprecated dependencies, license problems, and supply-chain risks. This skill produces the `review-packages.md` artifact required by the Flows app review process. --- ## Step 1 — Read and list all dependencies ```bash # List all dependencies and devDependencies node -e " const pkg = require('./package.json'); console.log('=== Dependencies ==='); Object.entries(pkg.dependencies || {}).forEach(([name, ver]) => console.log(name + ' @ ' + ver)); console.log('\\n=== Dev Dependencies ==='); Object.entries(pkg.devDependencies || {}).forEach(([name, ver]) => console.log(name + ' @ ' + ver)); " ``` Record the total count of dependencies and devDependencies. --- ## Step 2 — Look up npm metadata and update outdated packages For each package, gather: - **Latest version** on npm - **Weekly downloads** - **Last publish date** - **Deprecated** flag ```bash # Batch lookup — run for each package (example for a single package) npm view <package-name> --json 2>/dev/null | node -e " const data = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); console.log(JSON.stringify({ name: data.name, latest: data['dist-tags']?.latest, modified: data.time?.modified, deprecated: data.deprecated || false, })); " # For weekly downloads, use the npm API curl -s "https://api.npmjs.org/downloads/point/last-week/<package-name>" | node -e " const data = JSON.parse(require('fs').readFileSync('/dev/stdin','utf8')); console.log(data.downloads); " ``` For efficiency, batch multiple lookups. If the project has many dependencies, use a script: ```bash node -e " const { execSync } = require('child_process'); const pkg = require('./package.json'); const allDeps = { ...pkg.dependencies, ...pkg.devDependencies }; for (const [name, usedVersion] of Object.entries(allDeps)) { try { const info = JSON.parse(execSync('npm view ' + name + ' --json 2>/dev/null', { encoding: 'utf8' })); const latest = info['dist-tags']?.latest || 'unknown'; const modified = info.time?.modified || 'unknown'; const deprecated = info.deprecated ? 'YES' : 'No'; console.log([name, usedVersion, latest, modified, deprecated].join(' | ')); } catch { console.log(name + ' | ' + usedVersion + ' | LOOKUP FAILED'); } } " ``` ### Fix: Update outdated packages For each package that is >1 major version behind, update it: ```bash pnpm update <package>@latest ``` For packages that are 1+ minor versions behind, update to latest minor: ```bash pnpm update <package> ``` After updating, run `pnpm install` and `pnpm run build` to verify nothing breaks. If a major update breaks the build, revert that specific update and note it as a manual-fix item. --- ## Step 3 — Run security audit and fix vulnerabilities ```bash # Run audit with the project's package manager pnpm audit --json 2>/dev/null || npm audit --json 2>/dev/null # Also run production-only audit (what ships to users) pnpm audit --prod --json 2>/dev/null || npm audit --production --json 2>/dev/null ``` Parse the JSON output for: - Severity counts (critical, high, moderate, low) - Per-vulnerability details (package, severity, title, patched version, advisory URL) Any package with a known CVE is an automatic **Fail** in t