ci: enforce wix gateway proxy, with npm cooldown + OIDC in publish - #248
Merged
Conversation
Routes every npm-registry fetch in this repo's CI through the Wix npm embargo gateway, ported from base44-dev/vite-plugin#105. All jobs run on ubuntu-latest; the action is byte-identical to the vite-plugin/apper copy. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Ports base44/cli#597 (596104f) to this repo. The Wix gateway cannot carry `npm publish` — it rejects `PUT /<package>` — so the two publish workflows were the one place the embargo rollout had to cheat, deleting the /etc/hosts pin mid-job right before publishing. Per secplatform's interim policy for OSS repos, publish workflows are exempt from the gateway and protected by the lockfile plus a release cooldown instead: - .npmrc gets `min-release-age=14`, matching the gateway's 14-day window, so a freshly published version cannot enter package-lock.json. - Both publish workflows drop the gateway action and the `sed -i /etc/hosts` unpin hack. check_wix_proxy_steps.py records the exemption explicitly in PUBLISH_WORKFLOWS, so every other workflow — present and future — still fails CI without the proxy. - preview-publish.yml installs with `npm ci` instead of `npm install`: with no gateway in front of the job, a resolving install was the only step that could still pull a fresh release. Both publish jobs now resolve nothing. - Both bump to Node 24 and drop `npm install -g npm@11`, which fetched a floating npm release outside the cooldown. Node 24's bundled npm (>= 11.17) already covers trusted publishing (>= 11.5.1) and min-release-age (>= 11.10.0). - Publish steps keep authenticating via npm trusted publishing (OIDC), and `permissions` moves to the job with a note on why each scope is there. `packages: write` goes away — nothing here publishes to GHCR. Verified: `check_wix_proxy_steps.py` passes at 8 of 8 jobs across 8 non-exempt workflows, and its 11 tests pass, including three new ones covering the exemption.
dorraba
approved these changes
Aug 12, 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.
What
Supersedes #247 — it carries Dor's gateway commit unchanged (0142b34) plus one follow-up commit that ports base44/cli#597 (
596104f) to this repo. Landing them together avoids merging a state whose publish workflows still rely on thesed -i /etc/hostsunpin hack.Commit 1 —
ci: enforce wix gateway proxy in all workflows(Dor, unchanged): routes every npm-registry fetch through the Wix npm embargo gateway, pluscheck_wix_proxy_steps.py+ tests that fail CI if any job skips the proxy.Commit 2 —
ci: npm cooldown for installs, no gateway in publish, OIDC: the gateway cannot carrynpm publish(it rejectsPUT /<package>), which is why commit 1 had to delete the/etc/hostspin mid-job in both publish workflows. Per secplatform's interim policy for OSS repos, publish workflows are exempt from the gateway and protected by the lockfile plus a release cooldown instead:.npmrcgetsmin-release-age=14— aligned with the gateway's 14-day window (per Dima), so a freshly published version cannot enterpackage-lock.json. npm's directive is in days and needs npm >= 11.10.0.sed -i /etc/hostsunpin. The exemption is recorded explicitly inPUBLISH_WORKFLOWSincheck_wix_proxy_steps.py, so every other workflow — present and future — still fails CI without the proxy. Adding a file to that list is a reviewable security decision, not a config tweak.preview-publish.ymlinstalls withnpm ci, notnpm install. With no gateway in front of the job, a resolving install was the only remaining step that could pull a fresh release. Both publish jobs now resolve nothing from the registry.npm install -g npm@11, which fetched a floating npm release outside the cooldown. Node 24's bundled npm (>= 11.17) already covers trusted publishing (needs >= 11.5.1) and readsmin-release-age(needs >= 11.10.0).NPM_TOKENreaches the build.permissionsmoves to the job with a note on why each scope is there;packages: writegoes away, since nothing here publishes to GHCR.Verification
Run locally against this branch:
check_wix_proxy_steps.py→verified 8 of 8 jobs across 8 workflows, plusPublish workflows exempt by policy: manual-publish.yml, preview-publish.ymlpython -m unittest test_check_wix_proxy_steps→ 11 tests pass, including three new ones: a listed publish workflow may omit the proxy, exempt jobs are not counted as verified, and a workflow not on the list still fails without itpackage-lock.jsonis in sync withpackage.json, so thenpm install→npm ciswitch inpreview-publish.ymlis safeNeeds CI (and a couple of manual steps) to confirm:
lint,unit-tests,security-audit,Check Wix Gateway Proxypass on this PRpreview-publishpublishes@base44-preview/sdkon Node 24 via OIDC — needs a trusted publisher registered on npmjs.com for@base44-preview/sdkagainst this repo +preview-publish.yml. The registry keys on the workflow filename, so this is a separate entry frommanual-publish.ymldry_run=truenpm auditPOSTs to the registry's bulk-advisory endpoint through the pinned gateway — if the gateway doesn't proxy it, the weekly audit fails loudly)Not in scope
The org's new SHA-lock policy for third-party actions (cli#600) applies here too —
peter-evans/repository-dispatch@v4,actions/create-release@v1and friends are still floating tags. Separate PR.The Node 20 jobs (
lint,unit-tests,security-audit) will each print onenpm warn Unknown project config "min-release-age"line. They're gatewayed, so the cooldown is enforced for them regardless.🤖 Generated with Claude Code