ci: switch release workflow to npm Trusted Publishing (OIDC)#4
Conversation
Security enabled a Trusted Publisher for this repo + release.yml, so publish keylessly via GitHub OIDC instead of the NPM_PUBLISH_TOKEN secret. Adds id-token: write, drops the token, upgrades npm to a Trusted-Publishing-capable version.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe release workflow for Changesnpm OIDC Trusted Publishing Migration
Repository Metadata Update
Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
npm Trusted Publishing validates package.json repository.url against the provenance (the building repo). It still pointed at DylanVann/react-native-fast-image, which fails provenance with E422. Update homepage/bugs/repository to phantom/react-native-fast-image.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/release.yml (1)
40-42: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winConsider adding
--provenancefor supply chain attestations.npm Trusted Publishing supports generating provenance attestations that cryptographically link the published package to this GitHub repository and workflow. This is a recommended supply chain security practice.
# No NODE_AUTH_TOKEN: npm exchanges the GitHub OIDC token via the Trusted Publisher. - name: Publish - run: npm publish --access public + run: npm publish --access public --provenance🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/release.yml around lines 40 - 42, The npm publish command in the Publish step is missing the `--provenance` flag which generates cryptographic supply chain attestations. Modify the run command that contains `npm publish --access public` to add the `--provenance` flag to the npm publish command, enabling provenance attestations that link the published package to the GitHub repository and workflow for enhanced supply chain security.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/release.yml:
- Around line 40-42: The npm publish command in the Publish step is missing the
`--provenance` flag which generates cryptographic supply chain attestations.
Modify the run command that contains `npm publish --access public` to add the
`--provenance` flag to the npm publish command, enabling provenance attestations
that link the published package to the GitHub repository and workflow for
enhanced supply chain security.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 97bae626-9f89-4594-a8e8-862b13e711c4
📒 Files selected for processing (1)
.github/workflows/release.yml
dv-scripts build rewrites package.json repository.url to the upstream repo, failing Trusted Publishing provenance (E422). Re-set it on the built package.json right before publish.
Security enabled a Trusted Publisher for
phantom/react-native-fast-image+release.yml(keyless OIDC). This switches the workflow to use it: addsid-token: write, removes theNPM_PUBLISH_TOKENenv, and upgrades npm to a Trusted-Publishing-capable version (>= 11.5.1). Unblocks publishing8.6.6.Summary by CodeRabbit
Chores / CI-CD
Documentation