/dependency-vetting:dependency-vettingfrom dependency-vetting
Vets npm and PyPI packages for malware and name attacks before install. Fetches without running install code, scans with GuardDog and OSV, reads lifecycle scripts and build hooks, checks typosquatting and dependency confusion. Use before adding an unfamiliar dependency, when a lockfile pulls new packages, or when an advisory names a bad version.
Ships in dependency-vetting. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Decide whether a package version is safe to install, with evidence, without executing it. Work through the steps in order and stop as soon as one gives a clear verdict. Detonation is the last resort, never the first.
Covers npm (and pnpm, yarn, bun lockfiles) and PyPI (pip, uv, poetry). Not for known-CVE triage across a whole project (security-scan if installed), license review, or choosing between libraries on features.
npm install / pnpm install / yarn / bun install without scripts disabled, pip install or pip download of an sdist, uv add / uv sync, importing the module, or running its CLI. Each can run attacker code with the user's credentials.Copy this checklist and tick items as you go:
- [ ] 1. Target: ecosystem, exact name, exact version, how it will be installed
- [ ] 2. Name check: typosquat and dependency-confusion signals
- [ ] 3. Known-malicious lookup (OSV MAL- advisories)
- [ ] 4. Metadata and provenance
- [ ] 5. Fetch the artifact without executing it
- [ ] 6. GuardDog scan
- [ ] 7. Read install-time code by hand
- [ ] 8. Sandboxed detonation (only if 3-7 are inconclusive and the user agrees)
- [ ] 9. Verdict and report
Record the ecosystem, the normalized name (PyPI: lowercase, runs of -_. collapse to -), the exact version, and the source it resolves from (public registry, private index, git URL, tarball URL). For a lockfile change, list only the added or changed name@version pairs and vet those.
Read references/name-attacks.md and check:
python-, -js, 2) away from a popular package or one the project already uses? Did the user mistype it?A strong name signal plus a young, low-download package is enough to stop and report without downloading anything.
curl -s https://api.osv.dev/v1/query \
-d '{"package":{"name":"<name>","ecosystem":"npm"},"version":"<version>"}' # ecosystem "PyPI" for Python
osv-scanner scan -L <lockfile> # package-lock.json, pnpm-lock.yaml, yarn.lock, bun.lock, uv.lock, poetry.lock, pylock.toml
Any MAL- advisory is a malicious verdict. Stop and report. Also check whether the registry has removed the version (npm replaces a removed malicious package with a "security holding package" placeholder, usually 0.0.1-security; PyPI returns 404 or marks the release yanked) and any advisory the user cited.
Pull registry metadata without downloading code. Commands are in references/npm.md and references/pypi.md. Look for:
npm pack <name>@<version> --ignore-scripts --pack-destination <empty-dir>, or curl the dist.tarball URL.pip download --no-deps --only-binary=:all: <name>==<version> -d <empty-dir> for a wheel. For an sdist, curl the URL from the JSON API and check its sha256. Plain pip download of an sdist runs the build backend, which is code execution.Extract with tar -xzf or unzip into the empty directory and list the contents before reading anything.
uvx [email protected] npm scan <name> --version <version> --output-format=json
uvx [email protected] pypi scan <name> --version <version> --output-format=json
uvx [email protected] pypi scan <extracted-dir-or-archive> # local artifact
uvx [email protected] npm verify package.json # every dependency in a manifest
uvx [email protected] pypi verify requirements.txt # uv: uv export --format requirements.txt --no-hashes first
GuardDog runs its analysis in a kernel sandbox and fails when none is available. Run it through Docker (docker run --rm ghcr.io/datadog/guarddog ...) rather than passing --no-sandbox. GuardDog's rules are heuristics: a hit means read that code in step 7, not a verdict on its own. Rule meanings are in the ecosystem references.
Read what runs at install or first import before anything else:
preinstall, install, postinstall and prepare in package.json, any binding.gyp (triggers a node-gyp build), and files those scripts call.setup.py, the [build-system] table (an unexpected backend or backend-path pointing inside the package runs local code), and any custom build hooks.*.pth files (lines starting with import run at every interpreter start), *.data/scripts, and entry_points.txt.__init__.py / index.js.Then grep for exfiltration and execution primitives (patterns in the ecosystem references): reading env vars, ~/.npmrc, ~/.pypirc, SSH keys or cloud credential files, network calls to hard-coded hosts or IPs, eval/exec of decoded base64 or hex, child processes, writes outside the package directory, and minified or obfuscated code in a package that has no reason for it.
Only when static analysis is inconclusive and the user agrees. Read references/detonation.md. Never on the user's workstation or a CI runner with secrets.
Give one verdict per name@version:
| Verdict | Meaning | Action |
|---|---|---|
| Malicious | MAL- advisory, or code that exfiltrates, downloads and runs payloads, or opens shells | Don't install. Remove it from manifests and lockfiles, treat any machine that installed it as compromised (rotate its credentials), report to the registry |
| Suspicious | Strong name or metadata signals, or unexplained install-time code, without proof of harm | Don't install without the user's explicit decision. Suggest the legitimate package or a pinned older version |
| No indicators | Every step clean | Install, pinned to the vetted version, from a lockfile |
Report the evidence for each step (command, result, file and line for code findings), any indicators (URLs, IPs, file hashes), and what you did not check. Report a malicious package to npm (the package page's malware report link, or [email protected]) or PyPI (the project page's "Report project as malware") only when the user asks.
Offer these when the project lacks them, without changing config unasked:
npm ci, uv sync --locked).npm approve-scripts writes the allowScripts field in package.json); on npm 11 set ignore-scripts=true in .npmrc; pnpm 10+ blocks them by default (pnpm approve-builds), and bun runs them only for trustedDependencies and its built-in allowlist.min-release-age=<days>, pnpm minimumReleaseAge (minutes; pnpm 11 defaults to 1440), uv exclude-newer = "1 week".--ignore-scripts doesn't make a git dependency safe on npm 11 and older: the dependency's own .npmrc can swap the git executable. Vet git and tarball URL dependencies by cloning or downloading them yourself into an empty directory.pip download and pip install --no-deps still build sdists, which runs setup.py or the build backend. Use --only-binary=:all: or fetch the file directly..pth file in it runs on every Python start once installed.What SKILL.md sets; muted values are Claude Code's defaults
Other plugins' skills for the same job
npx claudepluginhub adminhead/claude-plugins --plugin dependency-vetting