Who can reach your Cloudflare Workers, and around what?
Works with Cloudflare GitHub Actions Node.js
Dawnfix Flare audits your Cloudflare accounts and your wrangler files with a read-only API token: Workers answering on workers.dev around their custom domain, hostnames with no sign-in in front, rate-limit namespaces two Workers share, routes and DNS pointing at nothing, tokens that can do too much. The scan is free and source available and runs on your machine; so does the daily audit in your CI.
What it checks
| Check | What it finds |
|---|---|
workers.dev exposureworkers-dev-enabled | a Worker answers on <script>.<subdomain>.workers.dev, outside the zone’s WAF, rate-limiting rules and Access. High when it also has a custom domain; low behind Access or without a fetch handler; in a wrangler file, caught before the next deploy turns it on. |
Preview URLspreview-urls-enabled | every uploaded version gets its own public preview hostname on workers.dev. |
Hostname without authhostname-without-auth | a custom domain or route with no Access application in front and no sign-in found in the repo (public on purpose: say so in publicHostnames). |
Rate-limit namespace clashratelimit-namespace-shared | two Workers (or two bindings) name the same rate-limit namespace_id, so they spend each other’s limit; suggests the next free block. |
Route to missing Workerroute-to-missing-script | a zone route or Workers custom domain bound to a script that no longer exists. |
Dangling DNSdangling-dns | a CNAME into workers.dev for a missing or disabled script, into another account’s subdomain, to a sibling-zone name that has no record, or a placeholder record no route serves. |
Dead scriptdead-script | no route, domain, workers.dev, cron, queue or service binding reaches it, or it has not been deployed for months: secrets and bindings stay live. |
Old compatibility datecompat-date-old | a compatibility_date more than a year old. |
Secrets changedsecrets-changed | secret names added or removed since the last run (values are never read). |
Over-scoped tokentoken-over-scoped | an API token with write access on every account or zone, or eight or more write permission groups. |
Token never expirestoken-no-expiry | an API token that never expires. |
Unused tokentoken-unused | an API token not used for 90 days. |
Zone TLS / HSTSzone-tls | minimum TLS below 1.2, Always Use HTTPS off, HSTS off or short. |
Every finding comes with the fix: the wrangler key, the dashboard path or the command. A part the token cannot read is listed under “Not checked” with the reason, never guessed.
Free scan and daily audit, hosted alerts
| One-shot scan (free) | Daily audit in CI (free) | With an Enterprise key | |
|---|---|---|---|
| Where it runs | Your machine, your token in your terminal | Your GitHub Actions, your token as a GitHub secret (FLARE_CLOUDFLARE_API_TOKEN) | The same daily run, which also sends its counts |
| Every check above | Yes, once, when you run it | Yes, every day | Yes, every day |
| Report | One HTML file and a terminal table | The run’s job summary, in your GitHub. The names stay there | The same. Names never reach us |
| New exposure | — | In the job summary | An email the same day the critical, high or medium count rises against the run before, with the link to the run |
| Status page and digest | — | — | Last run, counts by severity and the trend per repo; a section in the daily digest |
| Set up by | You | You: a short dawnfix-flare.yml that calls the reusable workflow, or paste prompts/flare-ci.md into your coding agent | The same, plus DAWNFIX_ENTERPRISE_KEY |
The token it needs
A custom API token with these permissions, all at Read (Cloudflare dashboard > My Profile > API Tokens > Create Token > Create Custom Token). Resources: the account and its zones. Nothing with Edit or Write. The CLI also refuses any request but GET in code, so a broader token still could not change anything; do not give it one.
| Permission | Used for |
|---|---|
Account > Workers Scripts > Read | scripts, workers.dev / preview flags, bindings, secret names, deployments, cron schedules, custom domains, account workers.dev subdomain |
Account > Access: Apps and Policies > Read | which hostnames and workers.dev URLs Access protects |
Account > Account Settings > Read | account list and names |
Account > Account API Tokens > Read (optional) | account-owned tokens and their permission group names (optional) |
User > API Tokens > Read (optional) | user-owned tokens (optional; only on a user-owned token) |
Zone > Zone > Read | zone list |
Zone > Workers Routes > Read | zone Workers routes |
Zone > DNS > Read | DNS records |
Zone > Zone Settings > Read | min TLS, Always Use HTTPS, HSTS |
7 required, 2 optional. A missing permission does not stop the audit: the checks it feeds say “not checked”.
Privacy
- The free scan uploads nothing. The token is read from an environment variable you set in your own terminal; it is never typed into a chat, a file or a command line. No telemetry, no account.
- The daily audit runs in your CI. Your Cloudflare token is a GitHub secret and stays one: it goes from the runner to api.cloudflare.com and nowhere else. Dawnfix Flare’s service never holds a Cloudflare token.
- Names stay in your GitHub: hostnames, Worker, zone, token and secret names are in the run’s job summary (run it in a private repo), and the secret-name baseline in your repo’s Actions cache. Secret values are never read.
- Only counts reach us, and only with an Enterprise key: per check and severity, how many accounts, and a salted hash per account id (to enforce the account limit). The service rejects anything else, and the workflow prints the document before it sends it. This is exactly what leaves, for the sample account:
{
"schema": "dawnfix.flare/1",
"generated_at": "2026-10-27T12:00:00Z",
"accounts": 1,
"account_ids": [
"4e2de339928e0b36"
],
"local_files": 3,
"gaps": 1,
"summary": {
"critical": 0,
"high": 6,
"medium": 14,
"low": 4,
"info": 1
},
"findings": {
"workers-dev-enabled": {
"critical": 0,
"high": 1,
"medium": 1,
"low": 0,
"info": 0
},
"preview-urls-enabled": {
"critical": 0,
"high": 0,
"medium": 1,
"low": 0,
"info": 0
},
"hostname-without-auth": {
"critical": 0,
"high": 0,
"medium": 2,
"low": 1,
"info": 1
},
"ratelimit-namespace-shared": {
"critical": 0,
"high": 1,
"medium": 1,
"low": 0,
"info": 0
},
"route-to-missing-script": {
"critical": 0,
"high": 2,
"medium": 0,
"low": 0,
"info": 0
},
"dangling-dns": {
"critical": 0,
"high": 1,
"medium": 3,
"low": 0,
"info": 0
},
"dead-script": {
"critical": 0,
"high": 0,
"medium": 1,
"low": 0,
"info": 0
},
"compat-date-old": {
"critical": 0,
"high": 0,
"medium": 2,
"low": 1,
"info": 0
},
"secrets-changed": {
"critical": 0,
"high": 0,
"medium": 0,
"low": 0,
"info": 0
},
"token-over-scoped": {
"critical": 0,
"high": 1,
"medium": 0,
"low": 0,
"info": 0
},
"token-no-expiry": {
"critical": 0,
"high": 0,
"medium": 1,
"low": 0,
"info": 0
},
"token-unused": {
"critical": 0,
"high": 0,
"medium": 0,
"low": 1,
"info": 0
},
"zone-tls": {
"critical": 0,
"high": 0,
"medium": 2,
"low": 1,
"info": 0
}
}
}
Sample report
Made from Dawnfix Flare’s own demo account (made-up names, one planted problem per check). Open the sample report: the same single HTML file the scan writes for you.
How to run it
- Run it with
npx dawnfix flare: the npm packagedawnfix, version 0.5.0, one file with no dependencies, on Node.js 20 or later. From a clone of dawnfix/dawnfix,node flare/dist/cli.jstakes the same flags. - In your own terminal, set the read-only token without it showing:
read -rs CF_API_TOKEN && export CF_API_TOKEN - Run the audit. It writes the HTML report and changes nothing in Cloudflare:
npx dawnfix@0.5.0 flare --repos ~/dev/* --html flare-report.html npx dawnfix@0.5.0 flare --no-api --repos ~/dev/* # wrangler files only - Or use it from your coding agent: paste
prompts/flare.md. Set the token in your own terminal first, never in the chat. The agent runs the audit and explains the top findings.
The daily audit and the alert
Free. Add .github/workflows/dawnfix-flare.yml that calls the reusable workflow dawnfix/dawnfix/.github/workflows/flare.yml@v0 and set your read-only token as the FLARE_CLOUDFLARE_API_TOKEN secret, or paste prompts/flare-ci.md into your coding agent:
name: dawnfix-flare
on:
schedule: [{ cron: "17 5 * * *" }] # daily, before the 06:30 UTC digest
workflow_dispatch:
permissions: { contents: read }
jobs:
flare:
uses: dawnfix/dawnfix/.github/workflows/flare.yml@v0
secrets:
FLARE_CLOUDFLARE_API_TOKEN: ${{ secrets.FLARE_CLOUDFLARE_API_TOKEN }}
DAWNFIX_ENTERPRISE_KEY: ${{ secrets.DAWNFIX_ENTERPRISE_KEY }} # optional
Every morning it runs the same audit with your token, writes the findings to the run’s job summary and keeps the secret-name baseline in your Actions cache.
Pin @v0.5.0 or a commit SHA instead of @v0 to freeze it. Rather keep the whole job in your repo? Copy templates/github/workflows/dawnfix-flare.yml: the same job, reading repo variables instead of inputs.
With an Enterprise key as the DAWNFIX_ENTERPRISE_KEY secret, it also sends the counts. When the critical, high or medium count goes up against the day before, everyone in the workspace gets an email that day, with the link to the run where the names are. Without a key it sends nothing. Contact us for Enterprise.
Set up Dawnfix (https://github.com/dawnfix/dawnfix), the source-available AI SRE, in this GitHub repo and try it once. Follow prompts/setup.md in that repo, step by step. In short: npx dawnfix init writes .dawnfix.yml and a 15-line workflow that calls dawnfix/dawnfix/.github/workflows/dawnfix.yml@v0. Then comes a read-only cloud role, then two repo settings set by name. For the local CLI, run pip install dawnfix==0.5.0. Rules: - Before you change anything (a file, a cloud role, a repo variable, a commit, a PR), tell me exactly what you will change and wait for my yes. - Least privilege: the AWS role or GCP identity must be read-only. Check the AWS role with infra/aws/verify_readonly.py from the Dawnfix repo, and stop if it fails. Never widen a policy to make it pass. - Never ask me to paste a secret into this chat, and never print one. I set my AI API key (Claude today) myself with gh secret set DAWNFIX_AI_API_KEY, and DAWNFIX_ENTERPRISE_KEY only if I have Enterprise. - Start with autonomy: diagnose in .dawnfix.yml (issues only, no code changes). Never push to the default branch; everything goes through a PR I review. - Tell me what it costs me: my own Claude tokens (on my AI API key), GitHub Actions minutes and small CloudWatch API charges. No Dawnfix key is needed. To try it, run this with my read-only credentials and show me the JSON it prints: dawnfix tick --config .dawnfix.yml --state "$(mktemp -d)/state.json" --baseline --dry-run Then open the setup PR.