SLSA Provenance for react-lite-youtube-embed
November 15, 2025 ยท View on GitHub
What is SLSA?
SLSA (Supply chain Levels for Software Artifacts) is a security framework that helps protect against supply chain attacks. It provides verifiable proof about how your software was built and where it came from.
Why SLSA Matters for This Project
This package is distributed via NPM and installed by thousands of developers. SLSA provides:
- ๐ Tamper-proof builds - Cryptographic proof that packages weren't modified after building
- ๐ Build transparency - Verifiable evidence of the build environment and process
- ๐ก๏ธ Attack prevention - Protection against compromised build systems and malicious injections
- โ Trust verification - Users can verify packages came from official GitHub Actions
SLSA Level
This project achieves SLSA Build Level 3:
- โ Build process is fully scripted/automated
- โ Provenance is generated automatically
- โ Build service is hardened (GitHub Actions)
- โ Provenance is non-forgeable (signed by GitHub)
- โ Build isolation (separate runners per build)
How It Works
Every release automatically:
- Builds the package in GitHub Actions
- Generates a cryptographically signed provenance attestation
- Publishes the attestation to the NPM registry alongside the package
- Links the attestation to the GitHub release
What's in the Provenance?
The provenance attestation includes:
- Source repository and commit SHA
- Build workflow and runner details
- Build inputs (branch, tag, environment variables)
- Build outputs (package tarball hash)
- Digital signature from GitHub's Sigstore
Verifying SLSA Provenance
For Package Users
Option 1: Using npm (Recommended)
# Install the package
npm install react-lite-youtube-embed
# Verify the provenance
npm audit signatures
This checks that:
- Package was published from the official GitHub repository
- Build came from a GitHub Actions workflow
- Package tarball matches the attested hash
Option 2: Using slsa-verifier
# Install slsa-verifier
npm install -g @sigstore/cli
# Download the package
npm pack react-lite-youtube-embed
# Verify the package (replace with actual version)
npx @sigstore/cli verify ibrahimcesar-react-lite-youtube-embed-3.0.5.tgz \
--certificate-identity-regexp="^https://github.com/ibrahimcesar/react-lite-youtube-embed" \
--certificate-oidc-issuer=https://token.actions.githubusercontent.com
Option 3: View Provenance on NPM
Visit the package page on npm: https://www.npmjs.com/package/@ibrahimcesar/react-lite-youtube-embed
Look for the "Provenance" badge showing:
- Source repository
- Build workflow
- Commit SHA
For Maintainers
Viewing Generated Attestations
After each release, you can find the provenance:
-
On GitHub Releases
- Go to: https://github.com/ibrahimcesar/react-lite-youtube-embed/releases
- Each release shows "Provenance" section
- Click to view full attestation details
-
In GitHub Actions Artifacts
- Navigate to the workflow run
- Download
provenance-attestationsartifact - Contains
.jsonlfile with full attestation
-
On NPM Registry
- Visit package page
- Click on "Provenance" badge
- Shows verified build information
Implementation Details
Workflows with SLSA
This project generates SLSA provenance in:
-
Automated Release Workflow (
.github/workflows/auto-release.yml)- Manual dispatch workflow
- Generates provenance before NPM publish
- Publishes attestation automatically
-
Manual Release Workflow (
.github/workflows/release.yml)- Triggered on GitHub release creation
- Generates provenance before NPM publish
- Publishes attestation automatically
Technical Implementation
We use the official SLSA generator:
- Generator:
slsa-framework/slsa-github-generator - Version: Latest stable release
- Provenance Level: SLSA Build Level 3
- Attestation Format: In-toto provenance (v1.0)
Permissions Required
The workflows require specific permissions:
permissions:
contents: read # Read repository
actions: read # Read workflow info
id-token: write # Sign attestations
packages: write # Publish to GitHub Packages
attestations: write # Write provenance
Security Considerations
What SLSA Protects Against
โ Build tampering - Detects if build outputs were modified โ Compromised dependencies - Tracks build inputs โ Malicious injections - Verifies build process integrity โ Account compromise - Builds are isolated in GitHub Actions โ Fake packages - Cryptographic proof of authentic builds
What SLSA Does NOT Protect Against
โ Vulnerabilities in source code - Use security scanning โ Compromised dependencies - Use dependency scanning (npm audit) โ Social engineering - Use code review and access controls โ Runtime attacks - Use application security best practices
Troubleshooting
Verification Fails
If npm audit signatures fails:
-
Check npm version - Requires npm 8.x or higher
npm --version npm install -g npm@latest -
Check registry - Provenance only works with official npm registry
npm config get registry # Should be: https://registry.npmjs.org/ -
Check package version - Ensure using a version with provenance (3.0.6+)
Missing Provenance
If a release is missing provenance:
- Check workflow logs - Look for provenance generation step
- Check permissions - Ensure
id-token: writeandattestations: writeare set - Retry release - Re-run the workflow
SLSA Badge Not Showing on NPM
NPM may take a few minutes to process and display the provenance badge after publishing.
Resources
- SLSA Official Site: https://slsa.dev
- GitHub SLSA Generator: https://github.com/slsa-framework/slsa-github-generator
- NPM Provenance: https://docs.npmjs.com/generating-provenance-statements
- Sigstore: https://www.sigstore.dev
- In-toto Provenance: https://in-toto.io/
Questions?
- General SLSA questions: https://slsa.dev/community
- This project: Open an issue at https://github.com/ibrahimcesar/react-lite-youtube-embed/issues
- NPM provenance: https://docs.npmjs.com/about-registry-signatures
Status: โ SLSA Level 3 enabled for all releases starting from v3.0.6
Last Updated: November 15, 2025