depaudit-npm is a cross-platform Go CLI that scans npm-related evidence sources to detect configured packages across repositories, lockfiles, installed packages, and optional npm cache logs.
You can scan for arbitrary packages through targets.txt or --targets-file.
Version 1.1.0 is the current stable release.
This tool was built in response to the 2026 npm supply chain attacks involving axios and plain-crypto-js.
At the time, sample code creation and package builds were happening during the affected window, so there was a real possibility that the local environment had been exposed. It was difficult to quickly determine whether that had actually happened because of a few practical gaps:
- There was no easy way to confirm not only direct dependencies but also transitive ones.
- A lockfile alone does not prove whether the package contents actually existed locally.
- Cross-checking
node_modulesand cache artifacts still required manual investigation.
Existing tools such as Trivy, npm audit, and osv-scanner are effective for vulnerability detection, but they are not designed for the narrower incident-response question of whether a specific package existed somewhere in the environment by any path.
depaudit-npm was created for that use case: incident-driven, evidence-based confirmation of package presence.
The goal of this tool is not to identify a specific vulnerability, but to confirm the fact of whether a package existed in the environment.
The default target definition file bundled with this tool already includes settings that can detect the axios / plain-crypto-js supply chain incident. You can use it as-is to immediately check whether your environment shows evidence related to that incident.
You can also modify the definition file to run the same style of investigation for any npm package.
The repository includes test data that corresponds to the axios / plain-crypto-js supply chain incident so the scan behavior can be validated. This does not affect normal use, but it is worth keeping in mind when reading the source tree.
The primary distribution model is a platform-specific release archive that
already contains the binary, targets.txt, the bundled documentation, and
THIRD-PARTY-NOTICES.md.
Each archive also includes a Syft-generated SBOM as SBOM.spdx.json.
- Cross-platform support for Windows, Linux, and macOS
- Structured parsing for
package-lock.json,npm-shrinkwrap.json,pnpm-lock.yaml,yarn.lock,bun.lock, andpackage.json - Optional
node_modulespackage checks - Optional npm cache log checks
- Findings, coverage, and project summaries written as separate output files
- Default bundled target list via
targets.txt
- Download the
v1.1.0release archive for your platform. - Extract the archive to a local folder.
- Edit the bundled
targets.txtif you want to change the default package list. - Run the binary from the extracted folder, or point it at another scan root.
Windows:
.\depaudit-npm.exeLinux:
./depaudit-npmmacOS:
./depaudit-npmExamples:
Run in the current directory with the default target file:
.\depaudit-npm.exeRun against a specific path:
.\depaudit-npm.exe --roots D:\src\myrepoRun with an explicit target file:
.\depaudit-npm.exe --targets-file .\custom-targets.txt --roots .The default target file name is targets.txt.
If --targets-file is omitted, the tool looks for targets.txt beside the executable first, and then in the current working directory.
In release archives, targets.txt is bundled next to the binary so the default configuration works immediately after extraction.
Each line contains one package spec:
plain-crypto-js@4.2.1
axios@1.14.1
axios@0.30.4
@scope/pkg
Lines starting with # are ignored.
Supported evidence sources:
package-lock.jsonnpm-shrinkwrap.jsonpnpm-lock.yamlyarn.lockbun.lockpackage.jsonnode_modules/<package>/package.jsonwhen--include-node-modules-folder-checkis enabled- npm cache logs when
--include-npm-cache-logsis enabled
bun.lockb is detected as unsupported evidence and reported as NeedsReview.
Each run writes:
npm_dependency_scan_<timestamp>.csvnpm_dependency_scan_<timestamp>.findings.jsonnpm_dependency_scan_<timestamp>.coverage.jsonnpm_dependency_scan_<timestamp>.projects.json
Start with the console summary:
Overall assessment: Problemmeans the scan found evidence that should be treated as a concrete hit.Overall assessment: NeedsReviewmeans the scan found unsupported evidence, parsing/read failures, cache-log references, or other signals that require manual review.Overall assessment: NoIssuemeans no configured target package evidence was found in supported and successfully parsed sources.
Recommended reading order:
- Check the terminal output for
Overall assessmentand the per-result summary counts. - Open
npm_dependency_scan_<timestamp>.findings.jsonto inspect each finding in detail. - Open
npm_dependency_scan_<timestamp>.coverage.jsonto confirm what was scanned, and whether any paths were skipped or unsupported. - Open
npm_dependency_scan_<timestamp>.projects.jsonif you need a project-by-project view in a monorepo or multi-root scan. - Use
npm_dependency_scan_<timestamp>.csvfor spreadsheets, filtering, or handoff to non-JSON consumers.
How to interpret each file:
*.findings.jsonis the primary output. Reviewcategory,indicator,assessmentDetail,path, andresult.*.coverage.jsonexplains scan coverage. IfskippedPathCountsorunsupportedEvidenceSourceCountsis not empty, treat the run as incomplete and review those entries.*.projects.jsongroups findings by detected project root and shows the worst result for each project.*.csvcontains the same findings as the JSON file in a flat table.
Important interpretation notes:
Problemis the highest-severity result and takes precedence over all other results.NeedsReviewdoes not always mean the target package was confirmed. It means the scan found something that should not be ignored without manual inspection.NoIssueonly applies to supported evidence that was successfully parsed. It is not the same as "proven absent everywhere".--strictpromotes otherwise cleanNoIssuefindings toNeedsReviewwhen the run has coverage gaps or unsupported evidence sources.
go build -o .\bin\depaudit-npm.exe .go test ./...If you only want to run the tool, use the release archive. Building from source is only needed for development or custom packaging.
This project is licensed under the MIT License. See LICENSE.
Third-party license notices for bundled dependencies are listed in
THIRD-PARTY-NOTICES.md.
A Syft-generated SPDX JSON SBOM is distributed as
SBOM.spdx.json in each release archive.