Security Audits
Security audits run an AI review of the code that changed in each deploy, and report serious problems to the people who own the project. The scan starts after the deploy is live. A scan or a finding never blocks, delays, or fails a deploy.
AI review can be wrong. "No findings" means nothing was found, not that the code is safe. Treat it as a second pair of eyes next to human review.
This feature is off until you turn it on. Projects deployed directly to Cloudflare are not affected.
Requirements
- A platform installed or upgraded with
--security-audits. See Turn security audits on. - Workers Paid on the platform's Cloudflare account, with Cloudflare Containers.
- Workers AI access for the default model: Workers Paid or prepaid AI credits.
- For the optional scan before a project goes public, project Zero Trust must be on and not public-only.
The scanner runs in its own container with no internet access. It reaches models only through the platform. Uninstalling the platform removes the scanner Worker, its container applications, the scanner images it copied, and any leftover scan copies. See Disable and Uninstall.
Roll forward after you upgrade
The upgrade that adds security audits includes a database migration for the scan scheduler. Cloudflare does not roll a Worker back past such a migration, so after you upgrade, fix a bad release by deploying a newer one.
Turn it on
void platform upgrade --security-audits
void platform security probe
void platform security budget --platform-usd 500
void platform security policy publicThe probe checks that the account can run scans and names anything missing. Spending caps are off by default, so set a platform cap before you choose a mode. Turning a scan mode on runs the probe first and refuses when it fails. The probe runs again each day while scans are on. If it starts failing, the policy stays on, new deploys are not scanned, and the admin pages show a banner.
Choose a scan mode:
| Mode | Scans |
|---|---|
| Off (default) | Nothing |
| Public projects only | Projects that are public, or that have no Zero Trust protection |
| All projects | Every project |
Turning a mode on scans nothing right away. Each project is scanned at its next deploy, and the first scan of a project reviews the whole deployment. Later scans review what changed since the last good scan. Use --plan to preview how many projects a change reaches. To scan apps that are already live, see Scan live apps again.
A platform admin can also give one project its own rule, from the project's Security section in the administrator UI or with the CLI:
void platform security policy --project <project-id> <inherit|always|never>| Rule | Scans |
|---|---|
| inherit (default) | What the scan mode says |
| always | Every deploy, also while Zero Trust protects the project |
| never | Nothing, except the scan before the project goes public when that is on |
A project's rule has no effect while the mode is Off. Its project page and void project security status say why the project is or is not scanned.
Platform administrators can also manage all of this from Security in the administrator UI.
What is scanned
A scan starts when a deploy goes live. Rollbacks, failed deploys, and preview-* projects are not scanned. A newer deploy replaces a scan that is still queued. A redeploy with no code change is recorded as "no changes" and costs nothing.
Void reviews the source that changed when it can see it, and otherwise the built output mapped back to source. Third-party package code, lockfiles, binaries, and secret-like files are left out, and stored secret values are replaced before any model sees the code. Void tells registry packages from your own code by the project's pnpm-lock.yaml or package-lock.json; without one of those, package code is reviewed too and the result notes third-party-unverified. A full rescan can also review the sources of the client bundles, from the source maps deployed with them: void project security scan --client-assets. Each result states what it covered, such as Changes since dpl_7c20 · source diff · 14 files · complete. Large changes are scanned in parts, and the page shows the files still waiting.
Check code before you deploy
Developers who can deploy a project can scan their code before it goes out:
void project security checkIt sends the git-tracked files of the current folder, as they are on disk, to the platform, and the scan runs on the project's model. Untracked files, secret-like files, lockfiles, and binaries stay on the developer's machine. The command shows what it sends, which model reviews it, and the most it can cost, then asks before it uploads anything. The check needs the policy to apply to the project, and is refused while a platform admin has set the project's rule to never. It waits in the queue like any scan and counts toward the monthly caps. Its result is shown in the terminal and kept for 30 days. It is not saved as project findings, sends no email, and does not affect a request to go public. See void project security check.
Models and the provider notice
| Model | Run by |
|---|---|
@cf/deepseek-ai/deepseek-v4.1-flash-1017 (default) | Cloudflare |
@cf/zai-org/glm-5.3 | Cloudflare |
openai/gpt-6.1-terra, openai/gpt-6.1-sol | OpenAI |
anthropic/claude-sonnet-5.5 | Anthropic |
anthropic/claude-opus-5.5 | Anthropic |
A model run by a third party sees the project's changed code, the files it uses, and past findings and comments. The provider may keep request data for a limited time and may refuse security-looking code. A refused scan shows as refused, never as passed. For that reason code does not go to a third party until someone has accepted the notice: you accept it once for a third-party platform default, and a project owner or administrator accepts it once per project. Until then the project uses a Cloudflare model. To keep all code in Cloudflare, block the third-party models.
A project that picks a third-party model also needs an AI permission on the platform's runtime token, unless you saved your own key for that provider. See Permissions to select for each token. The probe names a missing permission and lists models that cannot be picked yet. For these models the probe also copies a scanner image into the account's container registry. The first copy can take more than one probe run; until it is done, those models cannot be picked. When you block every model of one provider, the probe does not copy that provider's image.
Project owners and administrators pick their project's model from the same list with void project security model.
Use your own provider key
By default, OpenAI and Anthropic models are paid from the platform account's AI Gateway Unified Billing credits. To use your own API key and your own agreement with the provider instead, save the key:
printf "%s" "$ANTHROPIC_API_KEY" | void platform security models --provider anthropic --key-stdin --yes
void platform security probeVoid makes a 1-token test call with the key and saves it only if the call works. The key is stored encrypted and never reaches the scanner; the platform adds it to each model call. Scans with that provider then bill to your key, still through AI Gateway. They are still metered at list price and count toward the spending caps. The provider notice and model blocking work the same way.
Run the probe after saving a key if that provider's models could not be picked before. Saving a new key replaces the old one right away. void platform security models --provider anthropic --remove-key deletes it: that provider's scans go back to Unified Billing credits, and its models cannot be picked until the probe passes again. void platform security status shows which keys are saved and when, never the key itself.
Findings
Only a human closes a finding. A scan can add one, confirm it again, or reopen it, but never close it. Resolve a finding as fixed, false positive, or accepted risk, with a comment of up to 4,000 characters. The comment and the resolution feed the next scan, so the same false alarm does not come back. Comments never hide anything; only a false-positive resolution does.
A finding is urgent when it is confirmed, critical or high, and still open. Weaker or unconfirmed findings are listed as leads or lower severity and are never urgent.
A project admin or the owner can change the severity of an open finding, with a comment: void project security severity F-12 medium --comment "Only reachable by admins". The new severity sticks across scans. Lowering a critical or high finding takes it out of the urgent count, as a resolve does. See void project security.
When the value of a project secret appears in the deployed Worker code or in a static text file (.js, .html, .json, .css, .txt, up to 8 MB), as is or encoded, the platform reports it itself as a secret-in-output finding that names the secret but never shows its value. There is one finding per secret for static files and one for Worker code, whatever files it is in. In a static file it is high and urgent, since anyone can download the file once the project is public: rotate the secret and keep it on the server. In Worker code it is medium: read it from env instead of writing it into the code. If the value is meant to be public, such as a publishable key, resolve the finding as accepted risk; it stays resolved when later deploys change the bundle.
When a project uses a Cloudflare model, a scan can also test a possible finding on a throwaway copy of the deployment: the same code with empty databases, fake secrets, and no internet access. Only the scanner can reach the copy, and it is deleted when the scan ends. A finding proven this way shows as confirmed (runtime) in void project security show. The copy is part of the scan cost.
| Who sees what | Reader | Collaborator and up |
|---|---|---|
| Urgent count and finding ids | Yes | Yes |
| Titles, files, and details | No | Yes |
| Scans, cost, and bypass reasons | No | Yes |
Open urgent findings show:
- at the end of each
void deployto a Void platform, with titles only for a signed-in user who can deploy. CI runs and readers see counts and ids, - in
void project security status, and as aSecurityline invoid project status, - on the project's security page, opened with
void project security open, where collaborators and up can comment, and the owner and project admins can also resolve, pick the model, set the budget, and bypass a held public request. A platform with the user dashboard has the same page behind Security on its Projects list, - on GitHub, for deploys built from a connected repository,
- in the administrator UI, with an Urgent filter.
To use findings in a code scanning tool, export them as SARIF with void project security list --format sarif (or void platform security findings --format sarif for every project).
Every scan that does not succeed says what happened, and the next scan covers those changes. A refused, timed-out, or failed scan is never counted as clean.
Scan live apps again
Deploy scans review what changed. These scans review more. Each one costs money and counts toward the spending caps:
| To | Run | Who |
|---|---|---|
| Scan one project's live deployment in full now | void project security scan, or void platform security rescan <project-id> | Project owner or admin, or a platform administrator |
| Scan live apps deployed before security audits were on | void platform security backfill | Platform administrators |
| Review every live app in full on a schedule | void platform security sweeps on --every-days 30 | Platform administrators |
| Scan again on Cloudflare when a third-party model fails | void platform security fallback on | Platform administrators |
A full scan names its model and the most it can cost, then asks first. Backfill handles up to 50 projects at a time; run it again for the rest. A sweep is a deeper review than a deploy scan, and only a few start each hour, so deploy scans keep moving. Fallback scans the same changes once more on the default @cf model when a third-party model refuses, times out, or returns output that cannot be read. It never sends code from a @cf scan to a third party. Sweeps and fallback are off by default. A deployment whose code is no longer stored cannot be scanned again until the project deploys. See Findings and scans.
GitHub checks
Each scan of a deploy built from a repository connected with void github connect adds a Void Security Audit check to the commit. This works with either executor, container or github_actions. A void deploy from a terminal, or from a CI job that is not a connected build, gets no check. The check is always neutral, so it never blocks a merge. It shows only the number of urgent findings and a link to the project's security page, never titles or files, because anyone who can see the repository can read it. A scan that did not finish says so, and is never shown as clean.
While an urgent finding is open, each open pull request for that commit (up to five) also gets one comment with the same counts, which later scans update in place. The comment needs the GitHub App's Pull requests: Read and write permission. With read-only access, only the check is posted.
Re-run on the check starts a full rescan of the live deployment when the person who clicks it signs in to the platform with that GitHub account and is the project's owner or an admin. For anyone else, or on a check of an older deployment, it does nothing. Re-run all reruns the build instead.
Spending caps
The platform pays for scans, and they do not count against the plan's AI limits. Two monthly caps, both off by default, use the calendar month in UTC:
- A platform cap that stops all scans when it is used up.
- A project cap, with a default amount for every project. A project owner or administrator can set a lower cap for their own project. The most they can set is the limit you give that project, else the cap of the owner's plan, else the default when project caps are on.
A scan starts only if its worst case fits under both caps. The Scans page in the administrator UI shows the metered cost next to what AI Gateway reports, which arrives about an hour after a scan ends. A used-up cap skips scans, never deploys, and the first scan after the reset or a raise covers what was skipped. Rescans and scans before public count too. At 80% and 100% of a cap, the owner and project administrators (project cap) or platform administrators (platform cap) get one email per month.
void platform security budget --platform-usd 500 --project-default-usd 50
void platform config plans set pro --security-cap 200A plan cap applies to each project whose owner is on that plan, even with project caps off. --security-cap none gives the plan's projects no cap, and inherit returns it to the default. See Security scan cap.
Emails
| Sent to | |
|---|---|
| New findings, one per scan | Owner, project admins, and the people who deployed |
| A human reopens an urgent finding | Owner and project admins |
| Project cap at 80% and 100% | Owner and project admins |
| Platform cap at 80% and 100% | Platform administrators |
| Public request held, now public, or canceled | Who asked, the owner, and project admins |
| Scan bypassed | Every platform administrator, with the reason |
| Three scans of a project in a row failed | Owner, project admins, and platform administrators |
| Many scans failed for a platform reason, at most once a day | Platform administrators |
Weekly summary, when turned on with void platform security digest on | Platform administrators |
Emails carry titles, severity, and file paths, never code. A scan that finishes after the scan mode was set to Off sends no email. Without a configured email domain the same information is in the CLI and on the project page, and bypasses still show in the admin pages. A void project security check sends no email.
To send these events to your own system, set a webhook with void platform security webhook <https-url>. Its signed body holds ids and counts only, and it is sent even without an email domain. See Alerts, summary, and webhook.
Scan before a project goes public
With project Zero Trust on, you can hold a project's change from protected to public until a scan of the live deployment finds nothing urgent:
void platform security public-gate onThe gate needs a scan mode of Public or All, a recent probe pass, and platform Zero Trust on and not public-only. While it is on, platform Zero Trust cannot be disabled or switched to public-only. Turn the gate off first. Turning it off, or setting the scan mode to Off, cancels open requests. Those projects stay protected.
When someone runs void project zero-trust public, the project stays protected and the request waits for a scan. Deploys keep working. The request is in one of these states:
| State | Meaning | What to do |
|---|---|---|
| Waiting | The scan is queued or running | Wait, or bypass |
| Held by findings | An urgent finding is open | Resolve it. There is no bypass |
| No result | The scan failed, was refused, timed out, or hit a cap | Run public again, deploy again, or bypass |
| Needs a deploy | The live code cannot prove it, or a fix needs a newer deploy | Deploy again, or bypass |
A finding resolved as false positive or accepted risk lets the request go on at once. A finding resolved as fixed only counts after a clean scan of a newer deploy. A rescan of the same deployment proves nothing. An unchanged Worker redeploy is enough to prove a fix. A static site needs a changed deploy.
The gate covers only the change from protected to public for an existing project. Projects that start public, and preview-* projects, are not covered. After a project is public, a later finding never makes it private again.
Bypass the scan
An owner or a project administrator can skip the scan with a reason:
void project zero-trust bypass --reason "Scanner down since 09:00; launch today."Platform administrators use the platform command with the project ID:
void platform security bypass <project-id> --reason "Scanner down since 09:00; launch today."A bypass skips the scan, never an open urgent finding. With one open, it is refused and nothing is recorded. Every bypass is recorded with its reason, and every platform administrator gets an email. Platform administrators can list them with void platform security bypasses. Later findings follow the normal flow.
What users see
Project members use these commands. See Projects.
void project security status
void project security list --urgent
void project security check
void project zero-trust statusA new CLI talking to a platform without security audits says so and asks the user to contact a platform administrator. Older CLIs print nothing extra after a deploy, and they never report a held request as public.