Skip to content

ci(sdk): require approved npm publishing environment - #3797

Draft
eloi010 wants to merge 2 commits into
mainfrom
fix/npm-publish-environment
Draft

ci(sdk): require approved npm publishing environment#3797
eloi010 wants to merge 2 commits into
mainfrom
fix/npm-publish-environment

Conversation

@eloi010

@eloi010 eloi010 commented Aug 14, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • require the protected npm-publish environment for real SDK releases while keeping dry-run preflight checks approval-free
  • default workflow permissions to none and grant each job only its required scopes
  • validate a full commit SHA on origin/main and use the verified commit for checkout, tags, and GitHub Releases
  • preserve existing package and legacy publishing behavior

Validation

  • actionlint .github/workflows/sdk-publish.yml
  • git diff --check
  • verified all publish, tag, and GitHub Release steps remain disabled during dry runs
  • verified external actions remain pinned to commit SHAs

The workflow was not dispatched and no package was published.

@eloi010
eloi010 requested a review from VGau August 14, 2026 15:46
Signed-off-by: Eloi Manuel <eloi.manuel@consensys.net>
@eloi010
eloi010 force-pushed the fix/npm-publish-environment branch from 9b4e76a to 1266891 Compare August 14, 2026 15:47
@eloi010
eloi010 marked this pull request as draft August 14, 2026 15:54
@eloi010
eloi010 requested a balanced review from Copilot August 14, 2026 15:56

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.

Pull request overview

Hardens SDK publishing with protected-environment approval, least-privilege permissions, and verified release commits.

Changes:

  • Gates real npm releases behind npm-publish.
  • Verifies and consistently uses a commit from origin/main.
  • Scopes permissions per job while keeping dry runs approval-free.

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

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.

2 participants