feat(ci): add sfw-enterprise support and publish-without-sfw escape hatch#1181
Merged
John-David Dalton (jdalton) merged 5 commits intov1.xfrom Apr 9, 2026
Merged
Conversation
…atch When SOCKET_API_KEY is set, downloads sfw-enterprise from SocketDev/firewall-release instead of sfw-free. Enterprise shims include additional ecosystems (gem, bundler, nuget, go on Linux). SSL workaround only applies to sfw-free. Adds publish-without-sfw input to provenance workflow to bypass firewall shims during publishing.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: PATH stripping via GITHUB_ENV cannot override GITHUB_PATH
- Replaced the ineffective GITHUB_ENV PATH override with renaming the shim directory on disk (mv to .disabled), which reliably removes shims from PATH resolution regardless of GITHUB_PATH precedence.
Or push these changes by commenting:
@cursor push fa4f89be6d
Preview (fa4f89be6d)
diff --git a/.github/workflows/provenance.yml b/.github/workflows/provenance.yml
--- a/.github/workflows/provenance.yml
+++ b/.github/workflows/provenance.yml
@@ -190,12 +190,10 @@
- name: Strip sfw shims for publishing
if: inputs.publish-without-sfw == true
- run: | # zizmor: ignore[github-env]
+ run: |
echo "Bypassing Socket firewall shims for publishing"
- echo "SFW_ORIGINAL_PATH=$PATH" >> "${GITHUB_ENV:-/dev/null}"
- if [ -n "$SFW_SHIM_DIR" ]; then
- CLEAN_PATH="$(echo "$PATH" | tr ':' '\n' | grep -vxF "$SFW_SHIM_DIR" | paste -sd: -)"
- echo "PATH=$CLEAN_PATH" >> "${GITHUB_ENV:-/dev/null}"
+ if [ -n "$SFW_SHIM_DIR" ] && [ -d "$SFW_SHIM_DIR" ]; then
+ mv "$SFW_SHIM_DIR" "${SFW_SHIM_DIR}.disabled"
fi
- run: INLINED_SOCKET_CLI_PUBLISHED_BUILD=1 pnpm run build:dist
@@ -225,7 +223,7 @@
SOCKET_CLI_DEBUG: ${{ inputs.debug }}
- name: Restore sfw shims after publishing
if: inputs.publish-without-sfw == true && always()
- run: | # zizmor: ignore[github-env]
- if [ -n "$SFW_ORIGINAL_PATH" ]; then
- echo "PATH=$SFW_ORIGINAL_PATH" >> "${GITHUB_ENV:-/dev/null}"
+ run: |
+ if [ -n "$SFW_SHIM_DIR" ] && [ -d "${SFW_SHIM_DIR}.disabled" ]; then
+ mv "${SFW_SHIM_DIR}.disabled" "$SFW_SHIM_DIR"
fiYou can send follow-ups to the cloud agent here.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 976cb5d. Configure here.
Writing PATH to GITHUB_ENV doesn't work because GITHUB_PATH entries are always prepended by the runner after GITHUB_ENV is applied (actions/toolkit#655). Rename shim files to .disabled instead so real binaries resolve from PATH naturally.
Bill Li (billxinli)
approved these changes
Apr 9, 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.


Summary
Backport of sfw-enterprise support to v1.x inline workflows.
SOCKET_API_KEYsecret is set, downloads sfw-enterprise fromSocketDev/firewall-releaseinstead of sfw-freeGIT_SSL_NO_VERIFY) only applied for sfw-freepublish-without-sfwescape hatch to provenance workflow — strips shims before publish, restores afterTest plan
SOCKET_API_KEYset (sfw-free path, current behavior)SOCKET_API_KEYrepo secret is configuredpublish-without-sfwcheckbox bypasses shims during publishNote
Medium Risk
Modifies CI and release workflows to conditionally download and run different firewall binaries based on a repository secret and to optionally bypass shims during npm publishing; mistakes could break builds/publishes or change supply-chain scanning coverage.
Overview
Updates GitHub Actions workflows to download
sfwfrom eitherSocketDev/sfw-freeorSocketDev/firewall-releasedepending on whetherSOCKET_API_KEYis present, and exportsSFW_IS_ENTERPRISEto drive behavior.In CI, shim generation now expands the wrapped commands for enterprise (adds
gem,bundler,nuget, andgoon Linux) and only applies theGIT_SSL_NO_VERIFYworkaround for the free variant.In
provenance.yml, adds apublish-without-sfwinput that temporarily strips thesfwshim directory fromPATHfornpm publish, then restores the originalPATHafterward.Reviewed by Cursor Bugbot for commit 976cb5d. Configure here.