Repository navigation
chore(deps): update oxc apps - #154
Closed
renovate[bot] wants to merge 1 commit into
Closed
renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
auto-merge was automatically disabled
April 24, 2026 04:33
Pull request was closed
cpojer
pushed a commit
that referenced
this pull request
Sep 11, 2026
…om domains (#154) * fix: Require Cloudflare ownership verification before activating custom domains. The custom-domain provisioning previously called Cloudflare with `ssl: { method: 'http', type: 'dv' }`. HTTP DCV is hijackable when a victim has a wildcard CNAME pointing at `cname.void.app`: an attacker can bind any subdomain of the victim because CF validates DCV through the wildcard. The flaw was confirmed end-to-end on production. Switches the SSL DCV method to TXT and uses CF `ownership_verification` as a separate pre-validation gate. The platform now writes the `domain:<host>` routing entry to KV only when CF reports both `status === 'active'` AND `ownership_verification.status === 'verified'`. Adds `custom_metadata: { project_id, user_id, created_at }` to every Custom Hostname for forensic attribution. Persists a snapshot of the CF verification records to a new nullable `verification_data` jsonb column so the dashboard and CLI can re-display the required TXT records without a CF round trip on every status check. Bumps the framework submodule for the matching CLI display change in #201. Migration `0015_verified_phoenix.sql` is purely additive (single ALTER TABLE adding a nullable jsonb column). Already-active domains are unaffected. In-flight pending HTTP-DCV custom hostnames will never activate under the new gate; they need to be deleted and re-added via the new CLI flow. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix: Replace nonexistent ownership_verification.status check with SSL gate. The activation gate compared `cfHostname.ownership_verification?.status` against `'verified'`, but Cloudflare does not return a `status` field inside `ownership_verification` (the API returns `{ name, type, value }` only). In production the second clause was always falsy, so domains could never flip from `pending` to `active`. Tests passed only because the mock fixtures invented the field. Use Cloudflare's documented signals instead: top-level `status === 'active'` plus `ssl.status === 'active'`. Per the CF for SaaS docs, CF only flips a custom hostname to `active` after both ownership and SSL DV complete; the `ssl.status` check is defense-in-depth against the rare re-validation state where the hostname is active but SSL is renewing. Removes the invented `status?: string` from the local type, redesigns the hijack regression test to assert the reachable defense-in-depth path (active hostname with SSL still validating), and bumps the framework submodule for the matching CLI fix in #201. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: Bump framework submodule for CLI domain tests. Pulls in #201 follow-up commit that adds 20 unit tests for the void domain CLI commands. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: Bump framework submodule for SSL record filter fix. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix: Harden custom-domain activation gate. Three independent fixes flagged on the rebased PR: 1. Block legacy HTTP-DCV hostnames from activating. Any pre-existing custom hostname created with `ssl.method: 'http'` remains vulnerable to the wildcard-CNAME hijack this PR closes for new hostnames. The gate now also requires `ssl.method === 'txt'`. 2. Keep the DB row in sync with KV routing. If `ROUTING.get(slug)` returns null (e.g. project never deployed), writing the DB row to active without writing the `domain:<hostname>` KV entry leaves traffic 404ing forever — `domain.status === 'pending'` would no longer fire on subsequent polls. Write KV first; only update the DB on success. 3. Bump migration 0016's `when` so it is monotonic after 0015. Drizzle migrators skip a migration whose `folderMillis` is less than the `created_at` of the last applied migration, so any environment that already applied 0015 (e.g. staging) would silently skip 0016. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
cpojer
pushed a commit
that referenced
this pull request
Sep 11, 2026
…in add. (#156) PR #154 added custom_metadata { project_id, user_id, created_at } to every Create Custom Hostname call for forensic attribution. That field requires the Enterprise SSL-for-SaaS custom-metadata paid add-on, which our prod CF account is not provisioned for, so every create now fails with "No custom metadata access has been allocated for this zone or account" and surfaces to users as a blanket 500 from void domain add. The same attribution data is already persisted server-side in the domains table keyed by cf_hostname_id, so dropping the field on the wire loses nothing operational. The TXT-DCV switch and the activation gate from PR #154 stay intact; only the metadata field is removed. Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
cpojer
pushed a commit
that referenced
this pull request
Sep 11, 2026
* docs: RFC 0072 — custom domain verification UX improvements Captures the design for fixing two papercuts in the custom-domain flow surfaced by Alex Lichter on 2026-05-17: 1. domain add output omits the SSL validation TXT records that CF populates asynchronously; user only discovers them on a later domain status call. 2. domain status shows Status: pending alongside SSL Status: active when the project has no live deployment yet, with no diagnostic explaining the gap (the activation gate at routes/domains.ts:142 intentionally blocks until KV routing is in place, but the user is never told). Fix is purely UX: - Short-poll CF for ssl.validation_records before returning from domainAdd so all records appear in one stage. - Status rollup spanning CF's full pre-active state machine plus our internal awaiting_deployment gate, with per-state diagnostic guidance (including the new "run void deploy" hint). - Additive API fields (cf_status, awaiting_deployment) so dashboard consumers stay backward compatible. Rejects an earlier draft that proposed per-project CNAME targets + HTTP-DCV to reach Vercel-style 1-record UX. PR #154's commit message empirically confirms that Cloudflare for SaaS validates HTTP-DCV at the zone level rather than the CNAME-chain endpoint, so per-project targets do not close the wildcard hijack vector. Documented in the Rejected Alternatives section so the question doesn't get re-litigated. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * feat(api): short-poll for SSL records on domain add and expose CF status POST /:id/domains now short-polls Cloudflare's custom-hostname endpoint until ssl.validation_records populate (default 8s deadline, 500ms initial interval with 1.5x backoff) so the create response carries the full TXT-DCV record set. The CLI's `void domain add` can then show all three records in one screen instead of forcing the user to re-run `void domain status` to discover the `_acme-challenge` TXT records. Both unhappy paths in the polling phase are non-fatal: deadline-miss and transient CF errors mid-poll fall through with the original create response, log a warning, and still insert the DB row, so a flaky GET cannot orphan a CF hostname. GET /:id/domains/:domainId gains two additive fields: - cf_status: raw cfHostname.status pass-through - awaiting_deployment: true iff the CF activation gate is satisfied but ROUTING.get(project.slug) is null (project never deployed) Both are additive; existing dashboard consumers stay green. CF_HOSTNAME_POLL_DEADLINE_MS / CF_HOSTNAME_POLL_INITIAL_INTERVAL_MS env overrides mirror the DEPLOY_HEARTBEAT_INTERVAL_MS pattern so tests can exercise the polling and deadline paths at sub-100ms wall-clock. Refs: meta/design-docs/0072-custom-domain-verification-ux-improvements.md Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore: bump framework pointer for domain UX improvements (Task 2) Pulls in framework commit 9d3d9ba which implements the CLI side of design doc 0072: rolled-up domain status with one-line diagnostic, --verbose escape hatch, deterministic domain add section ordering, and the SSL deadline-miss "records will appear shortly" hint. Pairs with platform commit 64252f0a (API short-poll + cf_status and awaiting_deployment additive fields). Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * fix(api): always fetch at least once in pollCustomHostnameUntilSslRecords The deadline check ran before the first fetch, so a tiny CF_HOSTNAME_POLL_DEADLINE_MS (allowed by the env validation that only enforces > 0) plus a 1ms clock tick between Date.now() calls could exit the loop with `last` undefined. The non-null `last!` assertion then returned undefined to the caller, whose try/catch does not catch a non-throwing undefined return — the next `.ssl.validation_records` access threw TypeError outside the catch, 500-ing the request after the CF hostname was created but before the DB row was inserted (the exact orphan path the catch was written to prevent). Restructure the loop so the fetch is the first thing each iteration does and the deadline is only checked between iterations. `last` is now provably assigned on every return path; the ! assertion is gone. Resolves bot review comments on voidzero-dev/void-platform#162. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * style: apply oxfmt formatting to design doc and domains.ts Resolves CI `vp fmt --check` failure — oxfmt rewrites markdown emphasis to underscores and pads tables, and unwraps a short console.warn call. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
cpojer
pushed a commit
that referenced
this pull request
Sep 11, 2026
* feat(api): migrate custom-domain cert validation to HTTP-DCV (bump framework) Switches Cloudflare-for-SaaS custom-hostname certificate DCV from TXT to HTTP, so users no longer publish rotating `_acme-challenge` TXT records. Adding a custom domain now needs just two records: the traffic CNAME and the non-rotating `_cf-custom-hostname` ownership TXT. The anti-hijack lever stays the DNS-based ownership proof (the security fix from #154), not the cert-DCV method. The activation gate now keys on hostname ownership instead of `ssl.method === 'txt'`: cfHostname.status === 'active' && cfHostname.ssl.status === 'active' && !cfHostname.ownership_verification && !cfHostname.ownership_verification_http A wildcard CNAME cannot forge a per-host `_cf-custom-hostname` TXT value, so ownership stays unsatisfied and `status` never reaches `active`. The gate is method-agnostic by construction, which keeps legacy `txt`-method pending domains activatable with no migration. - cloudflare-api.ts: create body `ssl: { method: 'http', type: 'dv' }`; model `ownership_verification_http`; drop the SSL-record poll helper. - domains.ts: ownership-driven activation gate; remove the create-time short-poll and persist `ownership_verification` synchronously; best- effort CF + KV cleanup on delete. - index.ts: 7-day stale-pending janitor — re-checks CF live (skips if active, drops orphan rows on 404), claims the row before deleting the CF hostname (tolerates 404) and the `domain:` KV entry. - db.ts: `getPendingDomainsOlderThan` + `deleteDomainIfPending`. - env.ts: drop the now-dead `CF_HOSTNAME_POLL_*` knobs. - scripts/dcv-http-spike.ts: oxnode staging spike (HARD ship gate before deploy) reproducing the pre-#154 hijack — must pass with --window=86400. - design-doc 0073 supersedes 0072 (records the two-axis ownership/cert-DCV distinction and the wildcard-incompatibility limitation). Bumps the framework submodule for the matching CLI display change (#214). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(api): extract tryActivateDomain helper + add pending-domain queries Pulls the custom-hostname activation gate, KV routing copy, and verification-data persistence out of the GET /:id/domains/:domainId handler into a reusable tryActivateDomain() so the upcoming cron reconciliation can reuse the exact same security gate. Adds getPendingDomains() and getPendingDomainsNewerThan() for the cron's hourly (all-pending) and 30-min fast (young-only) tiers. No behavior change — existing api-domains tests cover the route 1:1. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(api): auto-activate pending custom domains via cron reconciliation Adds a reconciliation pass to the scheduled() cron so a custom domain comes online after the user configures DNS without re-running \`void domain status\`. Reuses the shared tryActivateDomain gate. Two tiers via a second cron trigger: the :30 fire reconciles only pending domains created within RECENT_PENDING_WINDOW_MS (24h) for fast feedback, while the hourly :00 fire reconciles ALL pending domains — before the stale-cleanup janitor, so a just-validated domain near the 7-day cutoff is activated rather than garbage-collected. Per-domain failures are isolated so one bad CF poll never aborts the batch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * refactor(api): address review on cron reconciliation - reconcilePendingDomains: replace the per-id getProject loop with a single getProjectsByIds(inArray) batch query. - extract exported FAST_CRON constant shared by the scheduled() branch and the tests; log activated/total count. - hoist the duplicated scheduled() test bindings/ctx into one shared definition used by both the janitor and reconciliation describe blocks. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * docs: record cron-driven custom-domain auto-activation Adds an addendum to design-doc 0073 and updates meta/operations.md to document the tiered cron reconciliation (30-min fast tier for recently added pending domains, hourly fallback that reconciles all pending before the stale-cleanup janitor) that auto-activates custom domains after DNS is configured without manual `void domain status` polling. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(api): harden cron domain activation (adversarial-review remediation) - skip admin-suspended owners in cron reconciliation, matching the 403 the authenticated status route already returns (usage-suspended owners are still reconciled). - make activation delete-race-safe: tryActivateDomain now claims the row via a conditional activateDomainIfPending (UPDATE ... WHERE pending) before writing the `domain:` KV entry, and rolls back to pending if the KV write fails — so a concurrent `void domain delete` can no longer leave an orphan routing entry that resurrects a removed hostname. - bound CF polling: getPendingDomains/getPendingDomainsNewerThan now take a required limit and order oldest-first; the cron caps reconciliation at MAX_PENDING_RECONCILE_PER_RUN per run and logs when truncated. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(api): revert to self-healing KV-first activation; cap stale cleanup Per review: the DB-first conditional-claim activation introduced a worse, non-self-healing failure mode (a crash between the DB flip and the KV write strands an active row with no route). Revert tryActivateDomain to the original KV-first order, where a crash leaves the row pending so the next poll/cron repairs it. The rare delete/activate orphan is accepted and documented in design-doc 0073 (reconciler + creation quota deferred). Removes the now-unused activateDomainIfPending helper. Also caps the stale-pending cleanup janitor (getPendingDomainsOlderThan now takes a required limit, oldest-first) so a large backlog cannot starve later hourly maintenance. Keeps the admin-suspended-owner skip and reconcile cap. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * feat(api): retune fast tier to every-2-min burst for first 30 min Custom-domain auto-activation now polls a freshly added domain every 2 minutes for its first 30 minutes, then falls back to hourly — replacing the prior once-per-30-min cadence over a 24h window. FAST_CRON becomes \`*/2 * * * *\` and RECENT_PENDING_WINDOW_MS becomes 30 minutes; the hourly tier, caps, ordering, suspended-owner skip, and janitor are unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(api): re-trigger HTTP DCV via PATCH; activate verified-stale domains (bump framework) Addresses inline PR review (Cursor Bugbot + Codex) on the cron auto-activation work. - HTTP-DCV re-trigger (load-bearing): Void's flow is add-domain-first, so the CF custom hostname is created with ssl.method:'http' before the CNAME points at the managed target. Per CF's Create Custom Hostname API, a PATCH is then required to complete HTTP validation; GET-only polling could leave such a domain pending until CF deletes it at 7 days. tryActivateDomain() now issues a best-effort no-change PATCH (new patchCustomHostname()) that re-triggers DCV and resets CF's backoff, gated three ways: * options.retriggerDcv — only the HOURLY reconcile tier opts in (not the every-2-min fast tier, not the user status route), bounding CF API load so a pending burst can't 429 other tenants' hostname ops. * wasPending && !gateOk — never PATCH an already-validated/active domain. * cf.ssl.method === 'http' — never mutate a legacy txt-DCV pending hostname (would discard the user's in-progress validation; breaks no-migration). - Janitor now activates verified-but-pending stale domains (CF active) instead of just skipping, preserving the admin-suspended-owner skip parity and never deleting a verified host. - Stale-cleanup: retry deleteCustomHostname once on a non-404 error after the race-safe claim-first delete, then log an explicit ORPHANED warning. Claim- first ordering kept; the suggested reorder was declined (reopens a worse race). - Declined surfacing ownership_verification_http: CF always returns the _cf-custom-hostname TXT alongside it, so the user always has an actionable challenge; the gate's dual-field check is correct. Documents the PATCH re-trigger, the hourly-only throttle, the legacy-txt guard, and the carried-forward >200-backlog forward-progress limitation in 0073. Bumps framework to #214 (domain add DNS-summary wording fix). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * fix(api): return cname_target from domain status endpoint (bump framework) Addresses deep-reviewed inline PR comments (codex) on the new commits. - GET /:id/domains/:domainId now returns `cname_target` (the cname.void.app constant, mirroring the add route) so `void domain status` can surface the traffic CNAME while the cert is still validating. Additive, backward-compatible (no schema change). Bumps framework to #214 for the matching CLI display. - Docs (0073): name the 7-day stale-cleanup janitor as a second actor in the already-accepted KV-first activation race (same low-severity, self-healing class as the documented `void domain delete` race — the domain is pending/not serving, heals via 404 -> re-add). The complete fix remains the deferred lock-free reconciler + transition state; a cheap conditional-flip-with-KV- rollback was considered and rejected (two-concurrent-activator footgun: it could delete a valid route when another activator legitimately won). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore: bump framework submodule to merged #214 (2263964) Points the framework submodule at the squash-merged #214 on main (HTTP-DCV custom-domain CLI: simplified domain add/status output, issuing_cert CNAME-hint gating, docs CNAME-target fix). Identical tree to the prior branch tip; pins a commit reachable from main rather than the now-merged feature branch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
This PR contains the following updates:
^0.45.0→^0.46.01.60.0→1.61.0Release Notes
oxc-project/oxc (oxfmt)
v0.46.0Compare Source
oxc-project/oxc (oxlint)
v1.61.0Compare Source
🚀 Features
38d8090linter/jest: Implemented jestversionsettings in config file. (#21522) (Said Atrahouch)Configuration
📅 Schedule: (in timezone Asia/Shanghai)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.
This PR was generated by Mend Renovate. View the repository job log.