Commit f2129b1
authored
fix(ci): inline CI setup, add Node 24 support, harden workflows (#1176)
* fix(ci): inline CI setup, add Node 24 support, harden workflows
Previously our CI workflows depended on a shared composite action from
the socket-registry repo (setup-and-install). That action was pinned to
an October 2025 SHA that predated Node 24 support, and updating it meant
tracking SHA cascades across multiple layers of nested actions.
This commit replaces that dependency by inlining every setup step
directly into each workflow file. Now each workflow is self-contained
and easy to read top-to-bottom:
1. actions/checkout — clone the repo
2. pnpm/action-setup — install pnpm (version from package.json)
3. actions/setup-node — install the right Node.js version
4. Download sfw-free — fetch the Socket Firewall binary
5. Create sfw shims — wrap npm/yarn/pnpm through the firewall
6. pnpm install — install dependencies (through the firewall)
All three actions are pinned to full commit SHAs (not version tags) so
the exact code that runs is deterministic and auditable.
Binary downloads (sfw-free v1.6.1) are verified against SHA-256
checksums baked into the workflow. If someone tampers with a release
asset, CI will fail immediately instead of running untrusted code.
The sfw shim scripts handle both Linux/macOS and Windows:
- On Windows, MSYS-style paths (/c/Users/...) are converted to native
format (C:\Users\...) so sfw-free can resolve them correctly.
- .cmd wrapper files are generated alongside bash shims for Windows.
- Each shim strips its own directory from PATH before exec to prevent
infinite recursion (shim calling itself instead of the real binary).
Other changes:
- Node 24 is now tested in the CI matrix alongside Node 20 and 22.
Provenance publishes with Node 24.
- The lint job now runs zizmor (a GitHub Actions security auditor) on
every push/PR. It downloads a pinned, checksum-verified native binary
— no Docker, Python, or pip needed. It scans .github/ for template
injection, unpinned actions, cache poisoning, and other issues.
- Removed three dead workflow files that referenced shared workflows
which no longer exist upstream: claude-auto-review.yml, claude.yml,
and socket-auto-pr.yml.
- Fixed template injection in provenance.yml: inputs.dist-tag was
interpolated directly into run blocks (attackable via workflow
dispatch). Now passed through an environment variable instead.
- Removed the push/tag trigger from e2e-tests.yml to eliminate a
cache-poisoning vector flagged by zizmor (PR + tag triggers combined
with action caching).
- Removed the old npm install -g npm@latest hack from provenance.yml
since Node 24 ships with a modern npm.
* fix(ci): replace pnpm/action-setup with inline binary download
Replace the pnpm/action-setup third-party action with a direct download
of the pnpm standalone binary from GitHub releases, matching the same
pattern used for sfw-free and zizmor.
The pnpm binary (v10.33.0) is downloaded, checksum-verified against a
SHA-256 hash, and symlinked as "pnpm" on PATH. This removes the last
third-party action dependency beyond actions/checkout and
actions/setup-node.
* chore: add packageManager field for pnpm 10.33.0
Aligns socket-cli with all other Socket repos which already declare
packageManager in package.json. This lets corepack and tooling auto-
detect the correct pnpm version.
* fix(ci): allow zizmor warnings (exit 13) in audit step
Zizmor exits 13 for warnings-only and 14 for errors. The
secrets-outside-env warnings are expected (requires GitHub environment
configuration) so we allow exit code 13 while still failing on actual
errors.
* chore: use Node 25.9.0 for lint, typecheck, and provenance
* chore: add sfw-free ecosystem docs link to shim loops
* fix(ci): work around sfw-free missing GIT_SSL_CAINFO
* fix(ci): use sha256sum with shasum fallback for Windows compatibility
* fix(ci): strip backslash prefix from sha256sum output on Windows
* fix(ci): copy pnpm binary as pnpm.exe on Windows instead of symlink1 parent f732aa8 commit f2129b1
7 files changed
Lines changed: 643 additions & 87 deletions
File tree
- .github/workflows
Large diffs are not rendered by default.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | 4 | | |
8 | 5 | | |
9 | 6 | | |
| |||
22 | 19 | | |
23 | 20 | | |
24 | 21 | | |
25 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
26 | 64 | | |
27 | 65 | | |
28 | 66 | | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
29 | 140 | | |
30 | 141 | | |
31 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | | - | |
| 28 | + | |
30 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
31 | 74 | | |
32 | | - | |
33 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
34 | 149 | | |
35 | | - | |
| 150 | + | |
36 | 151 | | |
37 | 152 | | |
| 153 | + | |
38 | 154 | | |
39 | 155 | | |
40 | 156 | | |
41 | 157 | | |
42 | 158 | | |
43 | | - | |
| 159 | + | |
44 | 160 | | |
45 | 161 | | |
| 162 | + | |
46 | 163 | | |
47 | 164 | | |
48 | 165 | | |
49 | 166 | | |
50 | 167 | | |
51 | | - | |
| 168 | + | |
52 | 169 | | |
53 | 170 | | |
| 171 | + | |
54 | 172 | | |
55 | 173 | | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| 199 | + | |
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
| |||
0 commit comments