Cloudflare
43 items · source
Authentication & Authorization
- Verify an app behind Cloudflare Access validates
Cf-Access-Jwt-Assertion(signature against the team certs,audtag, expiry) on every request instead of trusting that the request arrived through Access.
Object Storage & File Handling
- Verify the
r2.devpublic development URL is disabled on every bucket served through a custom domain — WAF, Access and token-auth rules apply only on the custom domain, andr2.devserves the same objects without them.
Secrets Management & Cryptography
- Identify Cloudflare tokens.
- Search
wrangler.tomlandwrangler.jsoncvarsblocks, everyenv.*.varsblock included, for keys, tokens and connection strings, and confirm.dev.varsis gitignored —varsare plaintext in the repo and the dashboard; secrets go throughwrangler secret put. - Verify
wrangler,miniflareand@cloudflare/vite-pluginare past their dev-server advisories and that local development listens on127.0.0.1— older dev servers served.dev.vars,.envor arbitrary files to the network. - Inventory every Cloudflare Tunnel token (
cloudflared ... --token) in compose files, systemd units and CI, and confirm a rotation has been rehearsed — whoever holds it can run a connector for that tunnel.
Common Web Attack Classes
- Search Cloudflare logs.
DNS, CDN, Edge & WAF
- Verify Cloudflare is authoritative for intended zones.
- Verify the origin is not directly reachable from the public internet when it should be Cloudflare-only.
- Verify Authenticated Origin Pulls uses a zone-level or per-hostname certificate you uploaded, not the global Cloudflare certificate — the shared one only proves the request crossed some Cloudflare account.
- Verify Cloudflare proxying is enabled for intended web/API hosts.
- Set Cloudflare SSL/TLS to Full (strict) where appropriate.
- Verify no zone, Configuration Rule or Page Rule sets SSL/TLS to
FlexibleorOfffor any path — Flexible fetches from the origin over plain HTTP while the browser still shows a padlock. - Verify Cache Deception Armor is on in every Cache Rule that marks responses
Eligible for cache, and that no Edge TTL or originCache-Controlcovered by the same rule overrides it. - Inventory all Cloudflare API tokens.
- Verify resource/zone restrictions.
- Verify Cloudflare Transform Rules do not modify security-sensitive values unexpectedly.
- Verify
workers_dev = falseis set in the Wrangler config of every Worker served on a route or custom domain, and that version and preview URLs are disabled or behind Access — turning offworkers.devin the dashboard is undone by the nextwrangler deploy. - Search Workers for
passThroughOnException()and confirm none sits in front of an auth, payment or rate-limit check — an exception then forwards the request to the origin unchecked. - Verify no session revocation, ban list, kill switch or rate-limit counter relies on Workers KV for immediate effect — KV reads can be 60 seconds or more stale in other locations, so a revoked token keeps working there.
- Verify rate-limiting thresholds assume per-data-center counters (
cf.colo.idis always a characteristic) — a distributed client gets the limit once per location, so per-account limits belong in the application. - Audit every WAF custom rule with the
skipaction and confirm its expression matches only something the client cannot set (IP list, verified bot, mTLS certificate), never a User-Agent, path prefix or custom header.
Monitoring, Detection & Incident Response
- Monitor Cloudflare DNS changes.
- Monitor Cloudflare token changes.
- Document how to rotate Cloudflare tokens.
Pre-Release Gates
- Any exposed Cloudflare/API/cloud credential with production privileges.
- Cloudflare API key
- Cloudflare API token
- Verify production Cloudflare configuration.
- Cloudflare DNS audit complete.
- Cloudflare WAF/rate-limit audit complete.
Abuse & Availability
- Search production config and build output for
1x0000000000000000000000000000000AAand the other Turnstile test keys — the test secret passes every token, so a shipped test key silently turns the challenge off.
AI Security Architecture & Identity
- AI does not receive Cloudflare administrator credentials.
Tool Calling & Excessive Agency
- Cloudflare DNS changes
AI Data Access & Privacy
- AI cannot bypass Cloudflare/WAF intentionally.
AI Output Handling
- Never directly use model output as a Cloudflare rule.
AI Testing & Red-Team Pack
Test whether an attacker can cause an agent to reveal:
- Cloudflare tokens
AI-Generated Crypto, Dependency & Config Bugs
Review every AI-generated:
- Cloudflare rules
Review Blind Spots
- Verify outdated Cloudflare configuration is not copied.
- Compare Cloudflare behavior.
Agent Prompts & PR Review
- Identify DNS/Cloudflare changes.
Can an attacker reach the same operation another way?
- Cloudflare API.
Vibe-Coding Release Gate
- AI changed Cloudflare.
# Cloudflare ## Authentication & Authorization * [ ] Verify an app behind Cloudflare Access validates `Cf-Access-Jwt-Assertion` (signature against the team certs, `aud` tag, expiry) on every request instead of trusting that the request arrived through Access. ## Object Storage & File Handling * [ ] Verify the `r2.dev` public development URL is disabled on every bucket served through a custom domain — WAF, Access and token-auth rules apply only on the custom domain, and `r2.dev` serves the same objects without them. ## Secrets Management & Cryptography * [ ] Identify Cloudflare tokens. * [ ] Search `wrangler.toml` and `wrangler.jsonc` `vars` blocks, every `env.*.vars` block included, for keys, tokens and connection strings, and confirm `.dev.vars` is gitignored — `vars` are plaintext in the repo and the dashboard; secrets go through `wrangler secret put`. * [ ] Verify `wrangler`, `miniflare` and `@cloudflare/vite-plugin` are past their dev-server advisories and that local development listens on `127.0.0.1` — older dev servers served `.dev.vars`, `.env` or arbitrary files to the network. * [ ] Inventory every Cloudflare Tunnel token (`cloudflared ... --token`) in compose files, systemd units and CI, and confirm a rotation has been rehearsed — whoever holds it can run a connector for that tunnel. ## Common Web Attack Classes * [ ] Search Cloudflare logs. ## DNS, CDN, Edge & WAF * [ ] Verify Cloudflare is authoritative for intended zones. * [ ] Verify the origin is not directly reachable from the public internet when it should be Cloudflare-only. * [ ] Verify Authenticated Origin Pulls uses a zone-level or per-hostname certificate you uploaded, not the global Cloudflare certificate — the shared one only proves the request crossed some Cloudflare account. * [ ] Verify Cloudflare proxying is enabled for intended web/API hosts. * [ ] Set Cloudflare SSL/TLS to Full (strict) where appropriate. * [ ] Verify no zone, Configuration Rule or Page Rule sets SSL/TLS to `Flexible` or `Off` for any path — Flexible fetches from the origin over plain HTTP while the browser still shows a padlock. * [ ] Verify Cache Deception Armor is on in every Cache Rule that marks responses `Eligible for cache`, and that no Edge TTL or origin `Cache-Control` covered by the same rule overrides it. * [ ] Inventory all Cloudflare API tokens. * [ ] Verify resource/zone restrictions. * [ ] Verify Cloudflare Transform Rules do not modify security-sensitive values unexpectedly. * [ ] Verify `workers_dev = false` is set in the Wrangler config of every Worker served on a route or custom domain, and that version and preview URLs are disabled or behind Access — turning off `workers.dev` in the dashboard is undone by the next `wrangler deploy`. * [ ] Search Workers for `passThroughOnException()` and confirm none sits in front of an auth, payment or rate-limit check — an exception then forwards the request to the origin unchecked. * [ ] Verify no session revocation, ban list, kill switch or rate-limit counter relies on Workers KV for immediate effect — KV reads can be 60 seconds or more stale in other locations, so a revoked token keeps working there. * [ ] Verify rate-limiting thresholds assume per-data-center counters (`cf.colo.id` is always a characteristic) — a distributed client gets the limit once per location, so per-account limits belong in the application. * [ ] Audit every WAF custom rule with the `skip` action and confirm its expression matches only something the client cannot set (IP list, verified bot, mTLS certificate), never a User-Agent, path prefix or custom header. ## Monitoring, Detection & Incident Response * [ ] Monitor Cloudflare DNS changes. * [ ] Monitor Cloudflare token changes. * [ ] Document how to rotate Cloudflare tokens. ## Pre-Release Gates * [ ] Any exposed Cloudflare/API/cloud credential with production privileges. * [ ] Cloudflare API key * [ ] Cloudflare API token * [ ] Verify production Cloudflare configuration. * [ ] Cloudflare DNS audit complete. * [ ] Cloudflare WAF/rate-limit audit complete. ## Abuse & Availability * [ ] Search production config and build output for `1x0000000000000000000000000000000AA` and the other Turnstile test keys — the test secret passes every token, so a shipped test key silently turns the challenge off. ## AI Security Architecture & Identity * [ ] AI does not receive Cloudflare administrator credentials. ## Tool Calling & Excessive Agency * [ ] Cloudflare DNS changes ## AI Data Access & Privacy * [ ] AI cannot bypass Cloudflare/WAF intentionally. ## AI Output Handling * [ ] Never directly use model output as a Cloudflare rule. ## AI Testing & Red-Team Pack Test whether an attacker can cause an agent to reveal: * [ ] Cloudflare tokens ## AI-Generated Crypto, Dependency & Config Bugs Review every AI-generated: * [ ] Cloudflare rules ## Review Blind Spots * [ ] Verify outdated Cloudflare configuration is not copied. * [ ] Compare Cloudflare behavior. ## Agent Prompts & PR Review * [ ] Identify DNS/Cloudflare changes. Can an attacker reach the same operation another way? * [ ] Cloudflare API. ## Vibe-Coding Release Gate * [ ] AI changed Cloudflare. 43 items · https://github.com/FarzamHabibi/pre-production-checklist · CC BY 4.0