Easily publish npm packages with provenance (SLSA attestations) and verify them.
Provenance (SLSA) ensures your npm package was built and published securely from the source you expect, reducing supply chain risks. It helps users trust that your published code matches your repository and build process.
- π Easy GitHub Actions workflow scaffolding for provenance-enabled publishing
- π One-command verification of provenance for any npm package
- π Monorepo dashboard to check provenance status across all packages
- π¦ Optional SBOM generation (CycloneDX) for enhanced security
- π― Strict verification mode to check SBOM and security metadata
- π GitHub release automation with changelogs
- βοΈ Config file support for custom workflows and badges
- π Self-update checking to keep CLI current
- π¨ Beautiful UI with spinners, colors, and interactive menus
- π Shell completion for bash, zsh, and fish
- π First-run onboarding for new users
npm i -D npm-provenance-easyOr use directly with npx:
npx npm-provenance-easy --helpRun the CLI for an interactive setup experience:
npx npm-provenance-easynpx npm-provenance-easy initFeatures:
- Creates
.github/workflows/release.ymlfor provenance-enabled publishing - Optional SBOM generation - choose whether to include CycloneDX SBOM
- Monorepo detection - automatically detects pnpm/yarn workspaces
- GitHub release automation - optional automatic releases with changelogs
- Custom configuration - supports
.provenancerc.jsonfor advanced options - Generates a badge for your README
β
GitHub Actions workflow created at .github/workflows/release.yml
π§© Monorepo detected (pnpm). Scaffolding monorepo-aware workflow.
π¦ SBOM generation included.
π GitHub release automation included.
Add this badge to your README:

Commit and push your code, then push a tag:
git add .
git commit -m "Release: provenance-enabled publish"
git tag v1.0.0
git push --tagsThe workflow will:
- Build your project
- Generate SBOM (if enabled)
- Run
npm publish --provenance --access public - Create GitHub release (if enabled)
Check if a published npm package has provenance:
npx npm-provenance-easy verify <package>@<version>Strict mode (check SBOM and security metadata):
npx npm-provenance-easy verify <package>@<version> --strictExamples:
npx npm-provenance-easy verify react@18.2.0
npx npm-provenance-easy verify mylib@1.0.0 --strictCheck provenance status for all packages in your monorepo:
npx npm-provenance-easy dashboardShows:
- β Provenance status for each package
- π¦ SBOM attachment status
- π Summary statistics
- π‘ Recommendations for missing features
Keep your CLI up to date:
npx npm-provenance-easy updateSetup autocomplete for your shell:
# Show setup instructions
npx npm-provenance-easy completion
# Generate completion script
npx npm-provenance-easy completion bash
npx npm-provenance-easy completion zsh
npx npm-provenance-easy completion fishCreate .provenancerc.json for custom settings:
{
"workflow": {
"nodeVersion": "20",
"includeReleases": true,
"customSteps": [
"- name: Custom step",
" run: echo 'Custom action'"
]
},
"badge": {
"style": "flat-square",
"color": "brightgreen",
"label": "provenance",
"message": "enabled"
},
"sbom": {
"enabled": true,
"format": "xml",
"includeDevDeps": false
},
"monorepo": {
"packages": ["@myorg/core", "@myorg/ui"],
"publishStrategy": "all"
}
}Standard Package (.github/workflows/release.yml)
name: Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '20'
- run: npm ci
- run: npm run build
- name: Generate SBOM (CycloneDX)
run: npx @cyclonedx/cyclonedx-npm --output-format xml --output-file sbom.xml
- name: Publish with provenance and attach SBOM
run: npm publish --provenance --access public --sbom=sbom.xml || npm publish --provenance --access public
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref_name }}
body: |
## What's Changed
This release includes provenance-enabled packages with SBOM attachments.
### Security Features
- β
SLSA Level 3+ provenance
- π¦ CycloneDX SBOM attached
- π Supply chain security verified
draft: false
prerelease: falseMonorepo Package (.github/workflows/release.yml)
name: Monorepo Release
on:
push:
tags:
- 'v*.*.*'
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
package: ["@myorg/core", "@myorg/ui"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: '20'
- run: npm ci
- name: Build all packages
run: npm run build --workspaces
- name: Generate SBOM (CycloneDX)
run: npx @cyclonedx/cyclonedx-npm --output-format xml --output-file sbom.xml
- name: Publish with provenance and attach SBOM
run: npm publish --provenance --access public --workspaces --sbom=sbom.xml || npm publish --provenance --access public --workspaces
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref_name }}
body: |
## What's Changed
This release includes provenance-enabled packages with SBOM attachments.
### Security Features
- β
SLSA Level 3+ provenance
- π¦ CycloneDX SBOM attached
- π Supply chain security verified
draft: false
prerelease: falseAdd this to your README to show provenance support:
Run without arguments for a beautiful interactive experience:
npx npm-provenance-easyFeatures:
- π¨ Colorful ASCII banner
- π Interactive menu with all commands
- π― Guided setup process
- π‘ Helpful suggestions and tips
- npm login required: Make sure you are logged in to npm before publishing.
- Workflow not running?: Ensure you push a tag (e.g.,
v1.0.0). - Provenance not detected?: Check that your workflow uses
npm publish --provenance. - SBOM not attaching?: Ensure you have
@cyclonedx/cyclonedx-npminstalled. - Monorepo issues?: Verify your workspace configuration (pnpm-workspace.yaml or package.json workspaces).
npx npm-provenance-easy verify mylib@1.0.0 --strictChecks for:
- β Provenance attestation
- π¦ SBOM attachment
- π Security audit metadata
npx npm-provenance-easy dashboardProvides:
- π Status overview for all packages
- π― Actionable recommendations
- π Progress tracking
Use .provenancerc.json to customize:
- Workflow templates
- Badge styles
- SBOM settings
- Monorepo strategies
PRs and issues welcome! See LICENSE.
MIT