Commands
Packages are npm by default. Use
pypi:name, name==1.2.3 or --pypi for PyPI.
Install packages safely
custoden install checks each package first. If one is malicious, suspicious or does not exist, nothing is installed. Otherwise it installs the exact versions that were checked, so a release published in between cannot slip in.
--pm.
Scan a project
custoden scan reads lockfiles and manifests locally and sends only package names and versions. Workflows and CI files (package manifests, build and test setup, Makefiles, shell scripts) are sent for analysis.
Check a whole lockfile
custoden lockfile sends each lockfile in the project (or the files you name) to Scan a lockfile, which checks every package, including transitive dependencies, for known malware and vulnerabilities. It costs 5 units per file instead of 1 per package. Unlike scan, it sends the whole file, including any registry URLs in it.
Pre-commit hooks
With pre-commit, add the hook to.pre-commit-config.yaml:
Exit codes
--fail-on sets the package threshold (malicious, suspicious, review, never; default suspicious). --fail-on-severity sets the threshold for findings (critical, high, medium, low, never; default high). --json prints the API results.