Sentinel · security scanner
supply-chain-sentinel
One supply-chain gate for npm projects.
npm i -D @mrlouiswright/supply-chain-sentinelPublished to GitHub Packages: add @mrlouiswright:registry=https://npm.pkg.github.com to .npmrc first (installing needs a token with read:packages).
What it checks
tripwireLockfile changes since--base: new install scripts, typosquats, publisher/maintainer changes, integrity changes, very fresh releases, git/tarball sources, deprecated packageslicenseDependency licenses against your policy (presets, allow/deny lists, exceptions with expiry)sbomCycloneDX SBOM of--basevs now: new OSV vulnerabilities (with VEX), licence changes, hash changes, downgrades, too many changes. Licence *policy* stays with license-sentinelworkflowsGitHub Actions: unpinned actions, script injection,pull_request_targetcheckouts, broad permissions, persisted credentials…
Quick usage
CLI
npm i -D supply-chain-sentinel
npx supply-chain-sentinel # all checks, compared with HEAD
npx supply-chain-sentinel --base origin/main --fail-on medium
npx supply-chain-sentinel --only workflows,license --offline
npx supply-chain-sentinel --format sarif > supply-chain.sarif
API
import { check, exitCode } from 'supply-chain-sentinel';
const report = await check('.', { base: 'origin/main', checks: ['tripwire', 'workflows'], baseline: '.supply-chain-baseline.json' });
console.log(report.score.overall, report.score.grade);
process.exitCode = exitCode(report, 'high');
Every option is documented in the supply-chain-sentinel docs.
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 }