tripwire
Lockfile changes since --base: new install scripts, typosquats, publisher/maintainer changes, integrity changes, very fresh releases, git/tarball sources, deprecated packages
GitHub Packages · MIT · Node ≥ 18
One supply-chain gate for npm projects: risky dependency changes, license policy, new vulnerabilities and SBOM drift, and GitHub Actions hardening, with one config, one report and one exit code.
1 Point the @mrlouiswright scope at GitHub Packages in .npmrc
@mrlouiswright:registry=https://npm.pkg.github.com2 Install
npm i -D @mrlouiswright/supply-chain-sentinelPublished to GitHub Packages, not npmjs.com. GitHub Packages needs a GitHub token with read:packages to install, even for public packages: add //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN} to .npmrc or run npm login --registry=https://npm.pkg.github.com.
$ npx supply-chain-sentinel --offlinesupply-chain-sentinel — 4 target(s) tripwire status: ran lockfile: package-lock.json base: 4 head: 4 added: 0 updated: 0 removed: 0 ✔ no findings license... 1 info✔ Passing (fail-on: high).
supply-chain-sentinel runs four focused tools and merges their results:
| Check | Tool | What it catches | |---|---|---| | tripwire | package-tripwire | Lockfile changes since --base: new install scripts, typosquats, publisher/maintainer changes, integrity changes, very fresh releases, git/tarball sources, deprecated packages | | license | license-sentinel | Dependency licenses against your policy (presets, allow/deny lists, exceptions with expiry) | | sbom | sbom-diff-sentinel | CycloneDX SBOM of --base vs now: new OSV vulnerabilities, copyleft additions, hash changes, downgrades, too many changes | | workflows | workflow-sentinel | GitHub Actions: unpinned actions, script injection, pull_request_target checkouts, broad permissions, persisted credentials… |
Lockfile changes since --base: new install scripts, typosquats, publisher/maintainer changes, integrity changes, very fresh releases, git/tarball sources, deprecated packages
Dependency licenses against your policy (presets, allow/deny lists, exceptions with expiry)
CycloneDX SBOM of --base vs now: new OSV vulnerabilities, copyleft additions, hash changes, downgrades, too many changes
GitHub Actions: unpinned actions, script injection, pull_request_target checkouts, broad permissions, persisted credentials…
# all checks, compared with HEAD
npx supply-chain-sentinel# Example
npx supply-chain-sentinel --base origin/main --fail-on medium# Example
npx supply-chain-sentinel --only workflows,license --offline# Example
npx supply-chain-sentinel --format sarif > supply-chain.sarifon: pull_request
permissions:
contents: read
security-events: write # only for the SARIF upload
jobs:
supply-chain:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4
with: { persist-credentials: false, fetch-depth: 0 }
- uses: MrLouisWright/supply-chain-sentinel@v1
with:
fail-on: high
sarif: supply-chain.sarif
- uses: github/codeql-action/upload-sarif@v3
if: always()
with: { sarif_file: supply-chain.sarif }
| Flag | Description |
|---|---|
--only <list> | Run only these checks (comma-separated) |
--skip <list> | Skip these checks |
--base <ref> | Git ref to compare against (default: origin/$GITHUB_BASE_REF in PRs, else HEAD) |
--offline | No registry or OSV lookups |
| Policy and output | |
-c, --config <file> | JSON config (default .supply-chain-sentinel.json if present) |
-f, --format <fmt> | text (default) | json | sarif | markdown |
--json/--sarif/--markdown <file> | Also write that format to a file |
--fail-on <sev> | critical | high | medium | low | info | none (default high) |
--list-rules | Print rules and default severities |
--no-color | Disable colours |
Full reference, config file format and API in the README.
Support this project
I build free, open-source tools that help developers ship safer websites. Every coffee helps keep them maintained, documented and free for everyone.
Buy me a coffee (opens Stripe in a new tab)Secure checkout by Stripe