|
23 | 23 | node-version: '20' |
24 | 24 | registry-url: 'https://registry.npmjs.org/' |
25 | 25 |
|
26 | | - - name: Pin npm for OIDC trusted publishing |
27 | | - # Tokenless OIDC trusted publishing needs npm >= 11.5.1; Node 20 ships npm ~10. |
28 | | - # Pinned to a specific version (not @latest) to avoid a mutable supply-chain step. |
| 26 | + # ────────────────────────────────────────────────────────────────────── |
| 27 | + # ⚠️ DO NOT REMOVE / DO NOT "SIMPLIFY" THIS STEP. It is load-bearing. |
| 28 | + # |
| 29 | + # Tokenless OIDC "trusted publishing" (used below — `npm publish --provenance` |
| 30 | + # with NO NODE_AUTH_TOKEN) requires npm >= 11.5.1, but the GitHub-hosted |
| 31 | + # Node 20 runner ships npm ~10. Without this upgrade the publish fails with: |
| 32 | + # npm error 404 'mcp-searxng@<version>' is not in this registry |
| 33 | + # This exact regression shipped in v1.6.0 — see SEC-015 in TODO-done.md. |
| 34 | + # |
| 35 | + # It is pinned to an EXACT version (NOT `@latest`), so the "mutable npm |
| 36 | + # command" / supply-chain finding that previously prompted its removal does |
| 37 | + # NOT apply here. Ignore that warning for this step and leave it in place. |
| 38 | + # To update it, change ONLY the pinned version — and it must stay >= 11.5.1. |
| 39 | + # ────────────────────────────────────────────────────────────────────── |
| 40 | + - name: Pin npm for OIDC trusted publishing (REQUIRED — do not remove) |
29 | 41 | run: npm install -g npm@11.17.0 |
30 | 42 |
|
31 | 43 | - name: Verify npm provenance support |
|
39 | 51 | } |
40 | 52 | const [major, minor] = version; |
41 | 53 | if (major < 11 || (major === 11 && minor < 5)) { |
42 | | - throw new Error('npm >= 11.5.1 is required for OIDC trusted publishing'); |
| 54 | + // If this throws, the pinned npm upgrade step above was removed or downgraded. |
| 55 | + throw new Error('npm >= 11.5.1 is required for OIDC trusted publishing. Restore the pinned (npm install -g npm@11.17.0) step above — do not remove it. See SEC-015 in TODO-done.md.'); |
43 | 56 | } |
44 | 57 | " |
45 | 58 |
|
|
0 commit comments