Repository navigation
Conversation
Publish on release:published from release.yml so the npm trusted publisher can be keyed on the filename, drop the NPM_TOKEN passed to JS-DevTools/npm-publish in favour of id-token: write (OIDC), run on Node 24 with npm@latest (trusted publishing needs npm >= 11.5.1), check out the release tag without persisted credentials, and keep contents: write only on the job that needs it. The tarball is attached to the release from a separate job with gh release upload instead of the archived upload-release-asset action. GitHub pre-releases go to the beta dist-tag. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
Release-tag shell injection remains unresolved, and external trusted-publishing prerequisites require verification.
Review effort: Balanced
Findings: 1
What changed in this PR
Migrates DataSync’s npm release workflow from token authentication to OIDC trusted publishing.
Changes:
- Publishes released versions using Node 24 and release-specific npm tags.
- Separates tarball uploads into a job with write permissions.
- Uses clean installs and checks out release tags without persisted credentials.
| File | Description |
|---|---|
.github/workflows/release.yml |
Replaces token-based publishing and modernizes release asset uploads. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| - name: Pack | ||
| run: npm pack | ||
| - name: Attach the tarball to the release | ||
| run: gh release upload "${{ github.event.release.tag_name }}" ./*.tgz --clobber |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Problem
release.ymlpublishes@contentstack/datasync-managerto npm with a long-livedNPM_TOKENthroughJS-DevTools/npm-publish@v3, and attaches the tarball to the release with the archivedactions/upload-release-asset@v1.The SE1 publishing policy requires OIDC trusted publishing instead: no token, a
release.ymlworkflow that runs when a release is published, Node 24.Fix
release.ymlis rewritten in place. What changes inside it:release: createdrelease: publishedNPM_TOKENviaJS-DevTools/npm-publish@v3id-token: write, no token, plainnpm publishnpm publish --access public; pre-releases go to thebetadist-tag, releases tolatestcontents: writeon the whole jobcontents: readon the publish job;contents: writeonly on the upload jobactions/upload-release-asset@v1(archived) inside the publish jobupload-release-assetjob, runs after a successful publish:npm pack+gh release upload --clobberwith the job tokennpm installnpm cinpm run build-tspersist-credentials: falsecheckout@v4,setup-node@v4@v7Verification
Node 22 and Node 24: install, build and
npm packall pass.