Skip to content

Commit 9ee178e

Browse files
committed
feat(ci): expand enterprise sfw shims to all wrapper-mode ecosystems
Enterprise wrapper mode supports additional ecosystems beyond sfw-free: gem, bundler, nuget, go. These are now shimmed when SOCKET_API_KEY is provided.
1 parent e04a233 commit 9ee178e

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

.github/actions/setup/action.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,10 +119,16 @@ runs:
119119
run: | # zizmor: ignore[github-env]
120120
# Shim supported package managers so their commands route through sfw.
121121
#
122-
# Supported ecosystems:
122+
# sfw-free ecosystems:
123123
# JavaScript/TypeScript: npm, yarn, pnpm
124124
# Python: pip, uv
125125
# Rust: cargo
126+
#
127+
# sfw-enterprise adds (wrapper mode):
128+
# Ruby: gem, bundler
129+
# .NET: nuget
130+
# Go: go (Linux only)
131+
# https://github.com/SocketDev/firewall-release/wiki#support-matrix
126132
SHIM_DIR="${RUNNER_TEMP:-/tmp}/sfw-shim"
127133
rm -rf "$SHIM_DIR"
128134
mkdir -p "$SHIM_DIR"
@@ -139,10 +145,13 @@ runs:
139145
CLEAN_PATH="$(strip_shim_dir)"
140146
# https://docs.socket.dev/docs/socket-firewall-free#what-ecosystems-and-package-managers-are-supported
141147
SSL_WORKAROUND=""
142-
if [ "$SFW_IS_ENTERPRISE" != "true" ]; then
148+
SHIM_CMDS="npm yarn pnpm pip uv cargo"
149+
if [ "$SFW_IS_ENTERPRISE" = "true" ]; then
150+
SHIM_CMDS="npm yarn pnpm pip uv cargo gem bundler nuget go"
151+
else
143152
SSL_WORKAROUND='export GIT_SSL_NO_VERIFY=true # Workaround: sfw-free does not yet set GIT_SSL_CAINFO.'
144153
fi
145-
for CMD in npm yarn pnpm pip uv cargo; do
154+
for CMD in $SHIM_CMDS; do
146155
REAL="$(PATH="$CLEAN_PATH" command -v "$CMD" 2>/dev/null || true)"
147156
[ -z "$REAL" ] && continue
148157
REAL="$(msys_to_win_path "$REAL")"

0 commit comments

Comments
 (0)