fix(preview): remove public health endpoint - #103
Merged
Conversation
Reject preview health requests through the normal host and token validation path. Deployment status stays in Cloudflare metadata without exposing release details.
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
iamjr15
added a commit
that referenced
this pull request
Jul 31, 2026
## Summary Closes the last finding from the public-surface sweep that followed #103: `webhooks.trycheatcode.com/health` answered publicly (200, unauthenticated, unrate-limited) with `releaseSha`/`versionId`, while its only real consumer — the gateway's release aggregation — reaches it through the WEBHOOKS service binding as `https://webhooks.internal/health`. The route now gates on the internal hostname and returns Hono's plain `notFound()` on any other host, indistinguishable from a route that does not exist. Same rule as #103: every public route must have a named external consumer. The four provider webhook POST endpoints (signature-verified) are untouched. ## Deploy safety Gateway is unchanged; its binding fetch already carries the `webhooks.internal` hostname, so the gate passes for old and new gateway alike — no deploy-order coupling, no skew window. Roll-forward as usual. ## Verification - Gates: lint, typecheck, full `turbo build --force` (19 packages incl. web), knip, dependency-cruiser (844 modules, 0 violations), skills bundle — all green - Post-deploy: public `GET webhooks.trycheatcode.com/health` → 404; gateway `/health/release` still 200 with the webhooks leg (proves the internal path intact)
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.
Summary
GET /healthshortcut from the preview proxy.Decision
Preview deployment status remains available through Cloudflare deployment/version metadata. No replacement internal binding is added because no runtime consumer needs preview-proxy release aggregation. Existing gateway liveness and release-convergence endpoints remain unchanged.
Validation
pnpm turbo lint typecheck build(55/55 tasks)pnpm typecheck:scriptspnpm architecture:checkpnpm deadcodepnpm devstarted the complete local stack/health/livereturned 200/healthreturned normal 401 token validation instead of release metadata