Skip to content

Commit e8e013c

Browse files
committed
Enable supply chain security through npm provenance attestation
- Configure GitHub Actions workflow for secure publishing - Enable automatic provenance generation during npm publish - Add integrity verification through Sigstore transparency logs Fixes: #60497
1 parent c043944 commit e8e013c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/insiders.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77

88
permissions:
99
contents: read
10+
id-token: write # Required for provenance
11+
packages: write # Required for publishing
1012

1113
# Ensure scripts are run with pipefail. See:
1214
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
@@ -60,6 +62,6 @@ jobs:
6062
npx hereby configure-insiders
6163
npx hereby LKG
6264
node ./scripts/addPackageJsonGitHead.mjs package.json
63-
npm publish --tag insiders
65+
npm publish --provenance --tag insiders
6466
env:
6567
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.github/workflows/nightly.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88

99
permissions:
1010
contents: read
11+
id-token: write # Required for provenance
12+
packages: write # Required for publishing
1113

1214
# Ensure scripts are run with pipefail. See:
1315
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#exit-codes-and-error-action-preference
@@ -60,6 +62,6 @@ jobs:
6062
npx hereby configure-nightly
6163
npx hereby LKG
6264
node ./scripts/addPackageJsonGitHead.mjs package.json
63-
npm publish --tag next
65+
npm publish --provenance --tag next
6466
env:
6567
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

0 commit comments

Comments
 (0)