ci: route release publish install through Socket Firewall - #119
Merged
Conversation
Wrap the reusable publish workflow's dependency install with the pinned workos/setup-socket-firewall setup and teardown pair so release-time installs are guarded against malicious packages. Teardown restores public npm registry access before build and publish, so no dependency download happens after it. The reusable workflow declares only the PUBLIC_SOCKET_FIREWALL_TOKEN secret and release-please passes it explicitly instead of inheriting all secrets. Publish command, npm registry, and OIDC provenance semantics are unchanged.
peakematt
marked this pull request as ready for review
September 8, 2026 20:46
Contributor
nigel-campbell
approved these changes
Sep 10, 2026
nigel-campbell
approved these changes
Sep 10, 2026
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.
The reusable publish workflow, defined in
release.ymland called byrelease-please.ymlwhen a release is cut, installs dependencies straight from the public npm registry before it publishes the package. That install runs on a runner that holds publish privileges and OIDC trust, so a compromised or malicious transitive dependency could execute duringpnpm installwith access to the release environment. Nothing currently guards that download.This change routes the publish job's dependency download through the WorkOS Socket Firewall using the pinned
workos/setup-socket-firewallcomposite action. Setup runs immediately afteractions/setup-node, which is required becausesetup-nodewrites the registry auth placeholder that the firewall relies on, and it stays active acrosspnpm install. The matchingteardownrestores public npm registry access before the build and publish steps. The only dependency download in the job is that singlepnpm install, so the firewall covers every download and nothing fetches packages after teardown. TheprepublishOnlyhook that runs duringpnpm publishonly invokes already-installed workspace tooling, including the example app'spnpm build, so it downloads nothing.The action is fail-closed: if
PUBLIC_SOCKET_FIREWALL_TOKENis missing the install fails rather than silently reaching the public registry. The token is passed only through the action'stokeninput, never exposed at workflow or job scope. To keep the reusable boundary tight,release.ymlnow declares just thePUBLIC_SOCKET_FIREWALL_TOKENsecret andrelease-please.ymlpasses it explicitly instead of usingsecrets: inherit.The publish command, the
https://registry.npmjs.orgtarget, the--provenanceOIDC trusted publishing, and the release-please flow are all unchanged.You can verify the workflows statically with
actionlint .github/workflows/release.yml .github/workflows/release-please.yml, which passes. Running the release path itself is deliberately not exercised here because it would trigger a real publication.