Repository navigation
Conversation
Publish on release:published from release.yml instead of on every push to master, so the npm trusted publisher can be keyed on the filename and a person creating the GitHub release is what publishes; 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. The post-publish gh release create step, which fails with 403 under the read-only job token, goes away with the trigger. GitHub pre-releases go to the beta dist-tag. .nvmrc pinned to 24. 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. |
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused workflow changes correctly implement the stated trusted-publishing requirements without identified defects.
Review effort: Balanced
Findings: None
What changed in this PR
Updates npm publishing to use GitHub release-triggered OIDC trusted publishing.
Changes:
- Targets Node.js 24 locally and in CI.
- Replaces token-based publishing with npm OIDC authentication.
- Publishes prereleases under
betaand stable releases underlatest.
| File | Description |
|---|---|
.nvmrc |
Sets Node.js 24 as the development runtime. |
.github/workflows/release.yml |
Implements release-triggered trusted npm publishing. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Refuse to publish when the release tag is not "v" + the package.json version, so a tag cut on the wrong commit cannot publish an older version under a newer tag. The tag reaches the check through an env variable, never through a shell line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lock file regenerated (fixed 6 on its own: handlebars critical, brace-expansion, browserslist, js-yaml high, baseline-browser-mapping moderate, @babel/core low; all dev-only transitive). Direct upgrades: none Overrides: none .talismanrc: package-lock.json checksum replaced by a filecontent/base64content ignore so the regen does not trip Talisman. Vuln count: snyk 0 → 0, npm audit 13 → 7. Build verified passing. Remaining 7 moderate need majors (jest 30, node-notifier 11) or a cross-major uuid; left for a separate change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
1 similar comment
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
Problem
release.ymlpublishes@contentstack/datasync-content-store-mongodbto npm on every push tomaster, with a long-livedNPM_TOKENthroughJS-DevTools/npm-publish@v2.2.0, then tries to create the GitHub release — a step that fails with403on every run because the job token is read-only.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:pushtomasterrelease: published— merging a version bump tomasterno longer publishes; creating the GitHub release doesNPM_TOKENviaJS-DevTools/npm-publish@v2.2.0id-token: write, no token, plainnpm publishnpm publish --access public; pre-releases go to thebetadist-tag, releases tolatestgh release createnpm installnpm cinpm run build-tspersist-credentials: falsecheckout@v4,setup-node@v4@v7.nvmrclts/*24— same Node as the publish jobVerification
Node 22 and Node 24: install, build, unit tests and
npm packall pass.