Skip to content

ci(ui-preview): drop prod custom-domain route from the preview deploy config - #645

Merged
JSONbored merged 1 commit into
mainfrom
ci/preview-drop-prod-routes
Jun 13, 2026
Merged

ci(ui-preview): drop prod custom-domain route from the preview deploy config#645
JSONbored merged 1 commit into
mainfrom
ci/preview-drop-prod-routes

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

What

Removes the production custom-domain routes block from the preview Wrangler config written in ui-preview-deploy.yml:

   "vars": {
     "VITE_GITTENSORY_API_ORIGIN": "https://gittensory-api.aethereal.dev"
   },
-  "routes": [
-    { "pattern": "gittensory.aethereal.dev", "custom_domain": true }
-  ],
   "main": "index.mjs",

Why (defense-in-depth)

Follow-up to the fork-safe preview pipeline (#643), flagged by an adversarial security audit of that pipeline.

The preview deploy uses wrangler versions upload, which creates a 0%-traffic preview version (a workers.dev URL) and applies no routes — so the production custom domain in the config was already inert. But it was a latent footgun: if anyone ever changed that command to wrangler deploy (or added wrangler triggers deploy), the fork-built bundle would immediately seize gittensory.aethereal.dev at 100% traffic, since custom domains are single-owner/account-scoped.

Removing the route from the preview config eliminates that path entirely (a workers.dev preview neither needs nor uses it), and a comment now warns against re-adding it. No behavior change to the preview pipeline.

Validation

  • npm run actionlint — clean
  • Preview Wrangler JSON remains valid (varsmain); no other keys touched.

Notes

  • Not a fix for an exploitable issue today — purely reduces future blast radius. The audit otherwise found the pipeline clean (no secret exposure, correct trust boundary, fail-closed artifact validation).

… config

The trusted preview config embedded the production custom domain
(routes: gittensory.aethereal.dev, custom_domain: true). It is inert under
`wrangler versions upload` (a 0%-traffic preview version applies no routes),
but it was a latent footgun: if that command were ever changed to
`wrangler deploy`, fork-built code would immediately seize the production
domain at 100% traffic. A workers.dev preview neither needs nor uses the
route, so removing it eliminates that path; a comment now warns against
re-adding it.

Defense-in-depth follow-up to the fork-safe preview pipeline (#643), flagged
by an adversarial security audit of that pipeline.
@ghost

ghost commented Jun 13, 2026

Copy link
Copy Markdown

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 · gpt-oss-120b — recommends ✅ merge
This PR removes the production custom‑domain route from the preview Wrangler config and adds explanatory comments to prevent accidental inclusion. The change is limited to CI workflow configuration, aligns with security best practices, and does not affect application code.

Suggestions

  • Verify that the Wrangler config generation tolerates the absence of a routes field (it should be optional).
  • Consider updating any internal documentation that mentions the preview config including a routes block.

Worth double-checking

  • If any downstream step in the workflow expects a routes array, the removal could cause a runtime error.
  • Ensure that the omission does not unintentionally affect other environments that might rely on the same config template.

Reviewer B · nemotron-3-120b-a12b — recommends ✅ merge
The PR removes the production custom-domain route from the UI preview deploy Wrangler config to prevent forked PRs from potentially deploying to the production domain. The change is a safety improvement: it eliminates a redundant routes block (since wrangler versions upload ignores routes) and adds a defense-in-depth measure against future config changes. The modification is small, well-documented, and aligns with the project's security principles.

No blocking issues spotted.

@ghost ghost added the gittensory-review label Jun 13, 2026
@ghost

ghost commented Jun 13, 2026

Copy link
Copy Markdown

Note

Gittensory Gate skipped

PR closed before full evaluation. No late first comment was created.

Signal Result Evidence Action
Gate result ⚠️ Skipped #645 is no longer open. No action.

💰 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.

@ghost ghost added the gittensory:reviewed label Jun 13, 2026
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@JSONbored JSONbored self-assigned this Jun 13, 2026
@JSONbored
JSONbored merged commit 67df348 into main Jun 13, 2026
10 checks passed
@JSONbored
JSONbored deleted the ci/preview-drop-prod-routes branch June 13, 2026 09:29
@github-project-automation github-project-automation Bot moved this from Todo to Done in gittensory - v1 roadmap Jun 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant