Skip to content

Commit

Permalink
chore: Enable supply chain security through npm provenance attestation (
Browse files Browse the repository at this point in the history
#8911)

## Description

- Configure GitHub Actions workflow for secure publishing
- Enable automatic provenance generation during npm publish
- Add integrity verification through Sigstore transparency logs

Following the recent Lottie-Player supply chain attack, it's crucial to
enhance package security. NPM provenance provides cryptographic proof
that this package was built from this repository using GitHub Actions,
making supply chain attacks significantly harder. More info in my blog
post
https://medium.com/exaforce/npm-provenance-the-missing-security-layer-in-popular-javascript-libraries-b50107927008

## Specific Changes proposed
Changes the workflow github to publish provenance attestation on
https://www.npmjs.com/package/video.js

## Requirements Checklist
- [x] Feature implemented in CI/CD
- [ ] If necessary, more likely in a feature request than a bug fix
- [ ] Change has been verified in an actual browser (Chrome, Firefox,
IE)
  - [x] Unit Tests updated or fixed
  - [ ] Docs/guides updated
- [ ] Example created ([starter template on
JSBin](https://codepen.io/gkatsev/pen/GwZegv?editors=1000#0))
- [ x Has no DOM changes which impact accessiblilty or trigger warnings
(e.g. Chrome issues tab)
  - [x] Has no changes to JSDoc which cause `npm run docs:api` to error
- [ ] Reviewed by Two Core Contributors
  • Loading branch information
pupapaik authored Feb 5, 2025
1 parent f2311c8 commit c1a8cbf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ jobs:
env:
NETLIFY_BASE: 'videojs-preview.netlify.app'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # Required for provenance
packages: write # Required for publishing
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -37,7 +41,7 @@ jobs:

# publish runs build for us via a prepublishOnly script
- name: npm release
run: npm publish --tag next
run: npm publish --provenance --tag next
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

Expand Down

0 comments on commit c1a8cbf

Please sign in to comment.