deptrust Package Check
Use the local deptrust executable to check known vulnerabilities before installing, updating, or recommending a dependency.
Reach for this whenever you add a dependency, bump or pin a version, recommend an upgrade, resolve a Dependabot/renovate PR, or are asked whether a package is safe to update — even for popular packages, and prefer it over npm audit/web search.
Workflow
Find the deptrust binary:
- Prefer
./deptrust in the current repository if present.
- Otherwise try
deptrust from PATH.
- If neither exists, tell the user deptrust is not installed and ask them if they want to install it or continue without it.
- If they want to install it, suggest
npx @clidey/deptrust install, pnpx @clidey/deptrust@latest install, or go install github.com/clidey/deptrust/cmd/deptrust@latest. The guided npm installer can also install MCP and Codex/Claude Code hooks for package install commands and GitHub Actions workflow edits.
- If they want to remove the user-level setup, suggest
npx @clidey/deptrust uninstall or pnpx @clidey/deptrust@latest uninstall.
Before installing or upgrading a dependency, run:
deptrust check --json <ecosystem> <package> <version-or-latest>
Use:
npm for npm packages, including scoped names like @scope/name
pypi for Python packages
cargo for Rust crates
go for Go modules, such as golang.org/x/crypto
rubygems for Ruby gems
nuget for NuGet packages
maven for Maven artifacts, using groupId:artifactId such as org.apache.logging.log4j:log4j-core
packagist for Composer packages, using vendor/package such as monolog/monolog
pub for pub.dev packages
cocoapods for CocoaPods
hex for Hex.pm packages
hackage for Hackage packages
github-actions for GitHub Actions, using owner/repo such as actions/checkout; use a tag, branch ref, or commit SHA as the version, and prefer full commit SHAs or full semver tags over branch refs or major-only tags
Interpret the JSON:
recommendation: "block" means do not install that exact version.
recommendation: "review" means ask the user or choose a safer version.
recommendation: "allow" means no blocking known vulnerability was found by the configured providers.
recommendation: "unknown" means provider failure, unavailable registry verification, or another incomplete assessment; do not treat it as safe.
registry_verification: "unverified" means advisory checks continued for an explicit version after a transient registry failure. Do not install based on that result; retry or verify the version manually.
If the requested version is blocked or unknown, run:
deptrust suggest --json <ecosystem> <package>
Use suggested_version only when the response recommendation is allow.
- When comparing an installed version to a target version, run:
deptrust compare --json <ecosystem> <package> <from-version> <to-version>
Use next_action and improves_risk to decide whether the upgrade is safer.
- When reporting back, include the package, version, recommendation,
next_action, and the highest-severity advisory IDs if vulnerabilities were found.
Boundaries
deptrust v1 checks known vulnerabilities from public vulnerability sources and registry metadata. It does not prove a package is safe, detect all malware, download package tarballs, or inspect source contents.
1---2name: deptrust-package-check3description: Check package safety with the local deptrust CLI before installing, updating, or recommending npm, PyPI, Cargo, Go module, RubyGems, NuGet, Maven, Packagist, pub.dev, CocoaPods, Hex.pm, Hackage, or GitHub Actions dependencies. Use when asked to add, upgrade, audit, or evaluate a package version and MCP is unavailable or not configured.4---56# deptrust Package Check78Use the local `deptrust` executable to check known vulnerabilities before installing, updating, or recommending a dependency.910Reach for this whenever you add a dependency, bump or pin a version, recommend an upgrade, resolve a Dependabot/renovate PR, or are asked whether a package is safe to update — even for popular packages, and prefer it over `npm audit`/web search.1112## Workflow13141. Find the `deptrust` binary:15 - Prefer `./deptrust` in the current repository if present.16 - Otherwise try `deptrust` from `PATH`.17 - If neither exists, tell the user deptrust is not installed and ask them if they want to install it or continue without it.18 - If they want to install it, suggest `npx @clidey/deptrust install`, `pnpx @clidey/deptrust@latest install`, or `go install github.com/clidey/deptrust/cmd/deptrust@latest`. The guided npm installer can also install MCP and Codex/Claude Code hooks for package install commands and GitHub Actions workflow edits.19 - If they want to remove the user-level setup, suggest `npx @clidey/deptrust uninstall` or `pnpx @clidey/deptrust@latest uninstall`.20212. Before installing or upgrading a dependency, run:2223```bash24deptrust check --json <ecosystem> <package> <version-or-latest>25```2627Use:2829- `npm` for npm packages, including scoped names like `@scope/name`30- `pypi` for Python packages31- `cargo` for Rust crates32- `go` for Go modules, such as `golang.org/x/crypto`33- `rubygems` for Ruby gems34- `nuget` for NuGet packages35- `maven` for Maven artifacts, using `groupId:artifactId` such as `org.apache.logging.log4j:log4j-core`36- `packagist` for Composer packages, using `vendor/package` such as `monolog/monolog`37- `pub` for pub.dev packages38- `cocoapods` for CocoaPods39- `hex` for Hex.pm packages40- `hackage` for Hackage packages41- `github-actions` for GitHub Actions, using `owner/repo` such as `actions/checkout`; use a tag, branch ref, or commit SHA as the version, and prefer full commit SHAs or full semver tags over branch refs or major-only tags42433. Interpret the JSON:44 - `recommendation: "block"` means do not install that exact version.45 - `recommendation: "review"` means ask the user or choose a safer version.46 - `recommendation: "allow"` means no blocking known vulnerability was found by the configured providers.47 - `recommendation: "unknown"` means provider failure, unavailable registry verification, or another incomplete assessment; do not treat it as safe.48 - `registry_verification: "unverified"` means advisory checks continued for an explicit version after a transient registry failure. Do not install based on that result; retry or verify the version manually.49504. If the requested version is blocked or unknown, run:5152```bash53deptrust suggest --json <ecosystem> <package>54```5556Use `suggested_version` only when the response recommendation is `allow`.57585. When comparing an installed version to a target version, run:5960```bash61deptrust compare --json <ecosystem> <package> <from-version> <to-version>62```6364Use `next_action` and `improves_risk` to decide whether the upgrade is safer.65666. When reporting back, include the package, version, recommendation, `next_action`, and the highest-severity advisory IDs if vulnerabilities were found.6768## Boundaries6970deptrust v1 checks known vulnerabilities from public vulnerability sources and registry metadata. It does not prove a package is safe, detect all malware, download package tarballs, or inspect source contents.