Skip to content

fix(ci): point workflows at the org-level SOCKET_API_TOKEN_FOR_CLI_AND_SFW secret - #1490

Merged
Martin Torp (mtorp) merged 1 commit into
v1.xfrom
fix/ci-org-level-secret-names
Aug 10, 2026
Merged

fix(ci): point workflows at the org-level SOCKET_API_TOKEN_FOR_CLI_AND_SFW secret#1490
Martin Torp (mtorp) merged 1 commit into
v1.xfrom
fix/ci-org-level-secret-names

Conversation

@mtorp

@mtorp Martin Torp (mtorp) commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

The repo-level SOCKET_API_TOKEN and SOCKET_API_KEY secrets were removed when these moved to the organization level, where the token is now named SOCKET_API_TOKEN_FOR_CLI_AND_SFW. Both old names silently resolved to an empty string.

Two symptoms:

  • e2e-tests failed outright. SOCKET_CLI_API_TOKEN arrived empty, so cmd-scan-reach.e2e.test.mts threw SOCKET_CLI_API_TOKEN environment variable not set and cmd-fix.e2e.test.mts collected zero tests.
  • Every CI job silently downgraded to sfw-free. The Download sfw step picks its tier with [ -n "$SOCKET_API_KEY" ] && USE_ENTERPRISE=true, so an empty value quietly took the free path. Lint / Type Check / Test Matrix stayed green while no longer exercising sfw-enterprise.

Changes

Six references, all to the same org-level secret:

File Env var Count
e2e-tests.yml SOCKET_CLI_API_TOKEN 2
ci.yml SOCKET_API_KEY 3
npm-publish.yml SOCKET_API_KEY 1

SOCKET_RELEASE_APP_PRIVATE_KEY and SOCKET_RELEASE_CLIENT_ID kept their names at the org level, so those references are deliberately untouched.

Verifying the fix

SOCKET_CLI_API_TOKEN now arrives masked (***) instead of blank, the suite runs for ~3m instead of aborting after 42s, and cmd-fix.e2e.test.mts passes where it previously collected zero tests. Both sfw repos (SocketDev/firewall-release, SocketDev/sfw-free) are public, so the enterprise download path works with the workflow's own github.token.

⚠️ e2e is still red, for an unrelated pre-existing reason

Restoring the token uncovered three reach tests that were already failing on v1.x and were previously masked by the missing token:

Test Failure
multi-ecosystem filtering › --reach-ecosystems pypi exit 1, expected 0
npm-test-workspace-mono › reachability on workspace mono exit 1, expected 0
target and cwd flags › --cwd sets working directory expected [ '.', '.', '.' ] to include 'packages/package-a'

This PR changes only secret names, and it sits on v1.x with Coana 15.10.9, so this run is a clean baseline for them. A separate dispatch on 15.10.10 produced the identical three failures (3 failed | 15 passed), confirming the pending Coana bump neither causes nor worsens them.

Worth noting separately: the Probe tier1 legacy_mode (DIAGNOSTIC - REMOVE AFTER USE) step can no longer work regardless of the token — api.socket.dev returns a Cloudflare interstitial to its plain curl, so the JSON parse always fails. It challenges on request shape, not auth; the same HTML comes back with a valid token. It should probably just be removed.

…D_SFW secret

The repo-level SOCKET_API_TOKEN and SOCKET_API_KEY secrets were removed when
these moved to the organization level, where the token is now named
SOCKET_API_TOKEN_FOR_CLI_AND_SFW. Both old names resolved to an empty string,
which failed the e2e suite outright and silently downgraded every CI job from
sfw-enterprise to sfw-free.

SOCKET_RELEASE_APP_PRIVATE_KEY and SOCKET_RELEASE_CLIENT_ID kept their names at
the org level, so those references are left alone.
@mtorp
Martin Torp (mtorp) merged commit 2f31006 into v1.x Aug 10, 2026
9 of 11 checks passed
@mtorp
Martin Torp (mtorp) deleted the fix/ci-org-level-secret-names branch August 10, 2026 07:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant