Skip to content

feat(platform): turn on security audits for Void Cloud - #984

Merged
Brooooooklyn merged 3 commits into
mainfrom
feat/security-audits-hosted
Nov 30, 2026
Merged

Brooooooklyn merged 3 commits into
mainfrom
feat/security-audits-hosted

Conversation

@Brooooooklyn

Copy link
Copy Markdown
Member

Makes security audits usable on Void Cloud. Until now, hosted had the feature switched off in code, so the admin Security page was hidden and nobody could turn scans on.

before                                   after
──────                                   ─────
HOSTED securityAudits: false             HOSTED securityAudits: true
no AI binding on void-api                "ai": { "binding": "AI" } in all 3 API envs
Security page hidden                     Security page shown, Scan = Off (the default)
Engine A/C images: digest null           pinned (published from main 556e0dd47)
release smoke test: not written          platform/scripts/security-smoke-test.ts

What changes for hosted

  • After deploy nothing scans. With no saved policy, the mode reads as disabled, and an admin turns scanning on from Admin → Security → Scan.
  • The first move away from Off runs the probe. The probe creates the scanner itself (controller Worker, gate, copy namespace, container apps, image copies), so this PR adds no new resources to the deploy config.
  • Hourly job: with the capability on, the hourly sweep of runtime copies listed the account's dispatch scripts, D1, KV and R2 even when no scan had ever run. It now skips until the first probe has set up the scanner (policy.entitlement), because a copy can't exist without one. This works even after the last scan row is gone: scan rows are deleted with their project, so "no scan row" was not safe.
  • Admin "off" text: no change. Hosted can no longer be off, and the self-hosted hint (void platform upgrade --security-audits) is still right for self-hosted.

Scanner images

I ran "Publish Security Scanner Images" on main (run 46373075151). Both images pull without credentials from ghcr, and each digest is a single linux/amd64 image manifest whose sha256 matches:

Engine Digest
A (agent_sdk) sha256:1a8de2bbcc745fb68b91d20b2c2fbef2cff001b83e0208911932997574eb6cbb
C (codex_sdk) sha256:363b46158a2becba2c53243e16af655d43f2205342227ba122d03167dc58e1fc

Release smoke test

node platform/scripts/security-smoke-test.ts deploys a copy of playground/spa with one planted SQL injection route to a test platform, then waits for the deploy scan and requires a finding in that file. See platform/scripts/security-smoke-test.md.

  • Target safety:
    • The origin must be set explicitly and typed again in SECURITY_SMOKE_CONFIRM.
    • api.void.cloud, void.cloud, other *.void.cloud hosts (except staging) and host names ending in a dot are refused before any network call.
    • A hosted platform that isn't staging is refused right after login.
  • Undo always runs:
    • Deletes the scratch project, also when the create answer was lost (found again by slug).
    • Sets the policy back to Off only if this run turned it on and no admin setting changed meanwhile.
    • Logs out the operator session.
    • Ctrl-C or SIGTERM stops the run and still cleans up; a second signal quits and prints the manual steps.
  • No secrets in output: tokens are passed in env only and redacted from all output, and API errors print METHOD path -> HTTP status only.
  • Offline tests: target guards (the real entry spawned with fetch made to throw), the flow with a fake platform and clock (order, restore rules, failures, deadline, signal, lost create), the API client's error text, and the fixture.

Docs

platform/meta/operations.md now has:

  • a hosted "Security audits on Void Cloud" section (Scan default, first turn-on, runtime CF_API_TOKEN permissions, credits or BYOK keys for Engines A/C)
  • the release steps: publish images, pin digests, run the smoke test on staging before advancing prod

Design doc 0095's open items are updated.

Not covered here (needs a person)

  • Engines A/C on hosted also need Unified Billing credits or BYOK keys on the VoidZero account, and sign-off on the S12 legal checklist in design doc 0095. Engine B (Workers AI) works without either.
  • Runtime token permissions in operations.md come from the code paths and haven't been checked against the hosted token. The first probe on staging checks them.
  • First live smoke run: run it on staging after this deploys. I can't run it against Void Cloud from here.
  • Image copy time: a full-size copy (largest layer 171 MB) within the 45 s probe budget hasn't been measured yet, so the first probes may report the image as still being copied.

Verification

  • vp check
  • vp run test
  • vpr test:all
  • The whole API suite with a temporary fetch logger: the switch adds no live outside calls. The 12 calls it logged happen with the switch off too.

🤖 Generated with Claude Code

- Hosted capability on, with the AI binding in all API envs. Scan
  still defaults to Off, so nothing scans until an admin turns it on.
- The hourly copy sweep waits until the first probe set up the scanner.
- Pin the Engine A/C scanner image digests.
- Add a release smoke test for a test platform, with offline tests
  and docs.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Brooooooklyn
Brooooooklyn requested a review from a team as a code owner November 30, 2026 09:26
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T09:29:33.588797Z efbdb98 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-security-audits-hosted-void-cloud.voidzero-docs.workers.dev (commit 780a7a2)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://580daa0c-void-cloud.voidzero-docs.workers.dev 6cdad0b 2026-11-30T09:44:40.249Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2604c6f1-void-cloud.voidzero-docs.workers.dev 780a7a2 2026-11-30T09:34:47.680Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://de38d4ff-void-cloud.voidzero-docs.workers.dev efbdb98 2026-11-30T09:28:12.665Z Visit the dashboard ↗

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: efbdb982a5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread platform/scripts/security-smoke-flow.ts Resolved
Comment thread platform/scripts/security-smoke-flow.ts Resolved
- Turn the policy back Off with the revision just read, so an admin
  change after that read fails with a conflict and is checked again.
- Skip expired operator sessions at logout, and take a 401 as already
  logged out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Comment thread platform/scripts/security-smoke-flow.ts Resolved
Node's fetch stops waiting for headers after 300 seconds, but turning
scanning on runs a probe that can take longer. Send the smoke test's
calls through an undici agent with no header wait; each call still
ends by its own timeout signal.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Brooooooklyn
Brooooooklyn merged commit cb6864d into main Nov 30, 2026
22 checks passed
@Brooooooklyn
Brooooooklyn deleted the feat/security-audits-hosted branch November 30, 2026 09:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant