---
url: https://void.cloud/reference/cli/platform-security.md
description: >-
  Turn security audits on, choose a scan mode and model, set monthly spending
  caps, and handle findings and public requests from an administrator session.
---

# Platform Security Audits {#operator-security}

Use your administrator session for these commands. See [Platform Management](./platform.md#operator-commands) for platform selection, previews, and confirmation. Projects are named by id; `--project` filters also accept a slug.

## Turn security audits on {#enable}

Security audits need Cloudflare Containers and Workers AI on the platform's Cloudflare account. Allow them when you install or upgrade:

```sh
void platform install --security-audits [options]
void platform upgrade [id] --security-audits
void platform repair [id] --security-audits
```

Install with a runtime token that has the [Containers permissions](../../guide/platform/installation/credentials.md) listed for security audits. Once the scanner is installed, choose which projects to scan. Uninstall removes the scanner, container applications, scan copies, and copied scanner images.

Then check the account and choose a mode:

```sh
void platform security probe
void platform security policy <disabled|public|all> [--plan] [--yes]
void platform security policy --project <project-id> <inherit|always|never> [--plan] [--yes]
void platform security status
```

`probe` checks that the account can run scans and reports each missing requirement. `policy` selects which projects are scanned, and `--plan` shows how many projects the change reaches. Turning the mode on runs the probe first and refuses when it fails.

To scan a protected project on every deployment while the rest of your platform scans public projects, set its rule to `always`. To use the platform mode again, set it to `inherit`.

```sh
void platform security policy --project <project-id> always
```

The `never` rule skips deploy scans, rescans, sweeps, backfill, and local checks. A [scan before going public](/guide/platform/administration/security-audits#scan-before-public) still applies. Project rules take effect while the platform scan mode is on. Use `status` to see overrides or `rescan` to scan a project immediately.

## Models, limits, and spending {#models-limits-budget}

```sh
void platform security models [--default <id>] [--block <id,...>] [--unblock <id,...>] [--accept-provider-notice] [--plan] [--yes]
void platform security models --provider <openai|anthropic> (--key-stdin | --remove-key) [--plan] [--yes]
void platform security limits [--concurrency <n>] [--scan-timeout <minutes>] [--plan] [--yes]
void platform security budget [--platform-usd <n> | --platform-off] [--project-default-usd <n> | --project-caps <on|off>] [--plan] [--yes]
void platform security budget --project <project-id> (--usd <n> | --clear) [--plan] [--yes]
void platform security model <project-id> <model-id|--default> [--accept-provider-notice] [--plan] [--yes]
```

**Models.** Accept the provider notice with `--accept-provider-notice` when choosing a third-party model. To bill your own OpenAI or Anthropic account, pipe the key from your password manager to `models --provider <name> --key-stdin --yes`. Void saves it after a successful test call. Use `--remove-key` to switch back. See [Use your own provider key](/guide/platform/administration/security-audits#own-provider-key).

**Scan limits.** Set `--concurrency` to the number of scans the platform can run at once. Each Cloudflare model runs one scan at a time, so additional slots can serve different models. Set `--scan-timeout` in minutes.

**Budget.** Run `void platform security budget` to see this month’s spend and caps. Use `--platform-usd` to enable a platform cap or `--project-default-usd` to enable default project caps. Turn off the default with `--project-caps off`.

To set the most a project admin can budget for one project, pass `--project <id> --usd <n>`. A lower cap chosen by the project admin still applies. Use `--clear` to remove the project-specific limit. Void then uses the [owner’s plan cap](./platform-config.md#plans), followed by the platform’s default project cap.

## Findings and scans {#findings-scans}

```sh
void platform security findings [--project <id-or-slug>] [--urgent] [--state <open|resolved|all>] [--severity <level>] [--format sarif]
void platform security show <project-id> <finding-id,...>
void platform security resolve <project-id> <finding-id,...> --reason <fixed|false-positive|accepted-risk> --comment "<text>" [--yes]
void platform security reopen <project-id> <finding-id,...> --comment "<text>" [--yes]
void platform security comment <project-id> <finding-id,...> "<text>" [--yes]
void platform security scans [--project <id-or-slug>] [--status <status>] [--trigger gate]
void platform security rescan <project-id> [--client-assets] [--yes]
void platform security backfill [--plan] [--yes]
void platform security sweeps <on|off> [--every-days <n>] [--plan] [--yes]
void platform security fallback <on|off> [--plan] [--yes]
void platform security cancel <scan-id> [--yes]
```

Use `--page` and `--limit` (up to 100) to page through findings, oldest first. For code scanning tools, `findings --format sarif` exports up to 10,000 matching findings across projects in a single SARIF 2.1.0 file. Omit pagination flags for this export.

To update several findings together, separate their IDs with commas. Void checks every ID before applying the change.

`rescan` runs a full scan of the live deployment. It tells you which model it uses and the most it can cost, then asks before it starts. Monthly caps apply to rescans too. `--client-assets` also reviews the sources of the project's client bundles from the source maps deployed with them. Project admins can start the same scan with `void project security scan`.

Turning security audits on scans nothing that is already live. `backfill` scans each live deployment in scope that has never been scanned, up to 50 projects at a time; run it again for the rest. `--plan` shows how many projects it reaches and the most the scans can cost. A deployment whose code is no longer stored cannot be scanned; the preview counts these, and the next deploy of each project scans it.

`sweeps on` reviews every live app in full on a schedule, with a deeper review than a deploy scan: a project is swept when it has had no full scan for `--every-days` days (7 to 90, default 30). A few sweeps start each hour, so deploy scans keep moving. Projects whose live code is no longer stored are not swept until they deploy again. Sweeps are off by default; each one costs more than a deploy scan, and the monthly caps apply.

`fallback on` scans a deployment once more on the `@cf` default model when a scan on a third-party model is refused, returns output that cannot be read, or times out. That scan keeps the code on Cloudflare and covers the same changes. It never switches from a `@cf` model to a third-party one. Fallback is off by default; each fallback scan costs one more scan, and the monthly caps apply.

## Alerts, summary, and webhook {#alerts}

```sh
void platform security digest <on|off> [--plan] [--yes]
void platform security webhook <https-url|off> [--plan] [--yes]
```

When three scans of a project in a row do not succeed for a project reason (refused, unreadable output, timed out, or incomplete), the project owner, its admins, and every installation admin get one email for that run of failures. When more than 20% of the scans in the last 24 hours fail for a platform reason (no AI credits, a scanner error, or a long queue), installation admins get one email that day.

`digest on` sends installation admins a weekly email each Monday with the counts for the week before: scans, new and resolved findings, urgent findings still open, and public requests. It is off by default.

Register an HTTPS endpoint with `webhook` and save the signing secret printed by the CLI. Setting the URL again rotates the secret. Each event has a JSON body with IDs and counts. Void delivers webhooks even if platform email is off.

| Header             | How to use it                                                                              |
| ------------------ | ------------------------------------------------------------------------------------------ |
| `X-Void-Event`     | Identify the event, such as `security.findings`.                                           |
| `X-Void-Delivery`  | Recognize a retry of the same delivery.                                                    |
| `X-Void-Signature` | Verify `t=<seconds>,v1=<hex>` using HMAC-SHA256 over `<t>.<body>` with the signing secret. |

Return a 2xx response within 10 seconds. Void retries a failed delivery twice.

## Scan before a project goes public {#public-gate}

With [project Zero Trust](./platform-zero-trust.md) on, you can hold a project's change from protected to public until a scan passes:

```sh
void platform security public-gate <on|off> [--plan] [--yes]
void platform security public-requests [--project <id-or-slug>] [--state <open|closed|all>]
void platform security bypass <project-id> --reason "<text>" [--yes]
void platform security bypasses [--project <id-or-slug>]
```

`public-gate on` is refused while platform Zero Trust is off. A bypass skips the scan, never an open urgent finding, and is recorded with its reason.
