fix(ci): allow .zip in the preview-deploy artifact allowlist (unblock UI previews) - #653
Conversation
The UI build emits a served static asset, client/downloads/gittensory-extension.zip
(generated by scripts/build-extension.mjs; linked from the extension route; asserted 200
by smoke-production.mjs). The "Validate downloaded artifact" step's extension allowlist
omitted `zip`, so it rejected the bundle and EVERY UI Preview Deploy failed at validation:
##[error]Artifact contains unexpected file types — refusing to deploy:
./client/downloads/gittensory-extension.zip
Because the deploy aborted before createDeployment, no preview Deployment/environment_url
was ever recorded, so Reviewbot's before/after table stayed stuck on "Rendering preview…"
for every UI PR (e.g. #635).
A .zip here is a passive download asset wrangler only uploads (never executes), so adding
it to the allowlist doesn't weaken the fork-PR defense — same risk class as the wasm/font
binaries already permitted.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Note Gittensory Gate skippedPR closed before full evaluation. No late first comment was created.
💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers. |
|
gittensory · advisory review Reviewed 1 changed file(s) — two independent AI reviewers. Suggested action: ✅ Safe to merge — both reviewers found no blocking issues. Reviewer A · Suggestions
Worth double-checking
Reviewer B · No blocking issues spotted. |
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Why
Every UI Preview Deploy run has been failing — all recent runs
failure— at the "Validate downloaded artifact" step:The UI build emits a legitimately-served static asset,
client/downloads/gittensory-extension.zip:scripts/build-extension.mjsapps/gittensory-ui/src/routes/extension.tsx(/downloads/gittensory-extension.zip)200 application/zipbyscripts/smoke-production.mjs…but
zipwas missing from the validation step's extension allowlist, so validation rejected the bundle and the deploy aborted beforecreateDeployment. With no preview Deployment /environment_urlever recorded, Reviewbot's before/after table stays stuck on "Rendering preview…" for every UI PR (e.g. #635) — the after screenshot can never fill in.What
Add
zipto the allowlist regex in the validate step. One line.Security
The allowlist is the fork-PR defense (the build runs possibly-fork code; the deploy must not smuggle executables in). A
.ziphere is a passive download asset —wrangler versions uploadonly uploads it as a static asset; it is never executed by the worker (fork code only ever runs inside the isolatedworkers.devpreview when the URL is visited). So allowing.zipis the same risk class as the.wasm/ binary fonts already permitted — no meaningful change to the boundary.Effect
Once merged, UI preview deploys succeed again, the
deployment_status→ Reviewbot re-review path records theenvironment_url, and the stuck "after" screenshots fill in automatically. No Reviewbot change is required for this part (a companion Reviewbot PR separately makes a failed deploy show a terminal card instead of an eternal spinner).