GitHub Packages · MIT · Node ≥ 18

supply-chain-sentinel

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. 1 Point the @mrlouiswright scope at GitHub Packages in .npmrc

    @mrlouiswright:registry=https://npm.pkg.github.com
  2. 2 Install

    npm i -D @mrlouiswright/supply-chain-sentinel
Installing from GitHub Packages needs a token

Published 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.

~/project — zsh
$ 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).
Real output from running supply-chain-sentinel locally on a test fixture.

Why it exists

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… |

Features

tripwire

Lockfile changes since --base: new install scripts, typosquats, publisher/maintainer changes, integrity changes, very fresh releases, git/tarball sources, deprecated packages

license

Dependency licenses against your policy (presets, allow/deny lists, exceptions with expiry)

sbom

CycloneDX SBOM of --base vs now: new OSV vulnerabilities, copyleft additions, hash changes, downgrades, too many changes

workflows

GitHub Actions: unpinned actions, script injection, pull_request_target checkouts, broad permissions, persisted credentials…

Usage

# 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.sarif

CI / GitHub Action

on: 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 }

Options & flags

FlagDescription
--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)
--offlineNo 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-rulesPrint rules and default severities
--no-colorDisable colours

Full reference, config file format and API in the README.

Support this project

Support open-source security tools

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

Portrait of Louis Wright

About the author

Louis Wright

Cyber security researcher and software engineer based in the UK.

More tools by Louis Wright

58 tools

Sentinels security scanners & CI gates · 19