Skip to content

ci: restore secure tokenless npm publishing - #400

Merged
thomson-t merged 1 commit into
mainfrom
ci/publish-build-node-auth-token
Sep 18, 2026
Merged

thomson-t merged 1 commit into
mainfrom
ci/publish-build-node-auth-token

Conversation

@thomson-t

@thomson-t thomson-t commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Background

The release workflow began failing during Node setup after setup-node v7 stopped exporting a placeholder NODE_AUTH_TOKEN. Yarn then attempted to expand the missing token from the generated npm configuration before npm could publish through OIDC.

What Has Changed

  • Remove token-style registry configuration and dependency caching from the privileged publish job.
  • Scope write and OIDC permissions to the publish job only.
  • Pin release workflow actions to immutable commit SHAs and disable checkout credential persistence.
  • Use the Node 24 bundled npm version and the runner-provided GitHub CLI.
  • Preserve npm provenance and the existing GitHub release contents and target commit.

Screenshots/Video

N/A — no visual changes.

Checklist

  • Self-review completed
  • Tests added or updated
  • Tested locally

Remove token-based registry setup that breaks Yarn caching with
setup-node v7.

Scope release permissions, pin actions, and disable persisted
credentials so OIDC publishing remains secure.

#agentic
Copilot AI lite review requested due to automatic review settings September 18, 2026 16:26
@thomson-t
thomson-t requested a review from a team as a code owner September 18, 2026 16:26
@cursor

cursor Bot commented Sep 18, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Changes are confined to CI release workflow configuration and permissions with no impact on application runtime code.

Overview
Hardens the release publishing workflow by scoping elevated permissions (contents: write and id-token: write) exclusively to the publish job and reducing top-level permissions to contents: read.

Also pins workflow actions (actions/checkout and actions/setup-node) to specific commit SHAs with persist-credentials: false, simplifies Node setup for OIDC npm publishing, and replaces ncipollo/release-action with native GitHub CLI (gh release create).

Reviewed by Cursor Bugbot for commit 1779089. Bugbot is set up for automated code reviews on this repo. Configure here.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No unresolved review issues were identified.

Pull request overview

Restores secure tokenless npm publishing via OIDC while tightening release workflow security.

Changes:

  • Removes token-based registry configuration and dependency caching.
  • Scopes write and OIDC permissions to the publish job.
  • Pins actions and disables persisted checkout credentials.
  • Uses Node 24’s npm and runner-provided GitHub CLI.
File summaries
File Summary
.github/workflows/release-publish.yml Implements secure npm publishing and GitHub release creation.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@thomson-t
thomson-t merged commit 622758f into main Sep 18, 2026
20 of 21 checks passed
@thomson-t
thomson-t deleted the ci/publish-build-node-auth-token branch September 18, 2026 17:25
@rokt-releases rokt-releases Bot mentioned this pull request Sep 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants