Repository navigation
ci: protect npm installs with Socket Firewall - #91
Merged
Merged
Conversation
peakematt
marked this pull request as ready for review
September 8, 2026 20:24
|
nigel-campbell
approved these changes
Sep 10, 2026
nigel-campbell
approved these changes
Sep 10, 2026
peakematt
force-pushed
the
ci/socket-firewall-npm
branch
from
September 11, 2026 17:30
465cb99 to
999f7f0
Compare
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.
authkit-remixdownloads public npm packages during continuous integration and again inside the release job before it publishes directly to npm. Today those downloads reach the public registry without passing through the WorkOS Socket Firewall, so a compromised or typosquatted transitive dependency could be installed on a runner that later builds and publishes the package.This change routes every
npm installthrough the pinned Socket Firewall setup actionca93dd8aa351f54f4729fe3377a9be23c631c25dand pairs it with the matching teardown at the same release. The organizationPUBLIC_SOCKET_FIREWALL_TOKENsecret is handed only to the setup action'stokeninput; it never appears in a job or step environment. In continuous integration the checkout no longer persists credentials, the workflow runs with read-onlycontentspermission, and public fork pull requests fall back to the action's validated public-registry mode while same-repository and default-branch runs stay fail-closed.The release job keeps npm trusted publishing intact. Socket Firewall is configured after
setup-nodehas pointed npm athttps://registry.npmjs.org, dependencies install through the firewall, and teardown restores the public registry before the build and either publish step runs. No dependency download happens after teardown, so the firewall credential and proxy never reachnpm publish, and the existing--provenancepublication with itslatestandnexttag selection is unchanged.Verify the workflow structure with:
Continuous integration runs against this branch and exercises the token-backed install and teardown on every supported Node version. The release workflow only runs for a published release or a manual dispatch, so this pull request publishes nothing.
Before merge,
PUBLIC_SOCKET_FIREWALL_TOKENmust also be reachable from the separate Dependabot secret store so that dependency-update pull requests stay fail-closed and green.