Cloudflare rules: cost, retirements, security and governance
LeftSize checks your Cloudflare accounts against 26 rules with read-only access, from a scheduled GitHub Action, and opens a GitHub or Jira issue for each finding with the affected resources, the estimated monthly savings where it can price them, and how to fix it. The 4 cost optimization rules are in the Free plan; deprecation, security and governance rules are in the Team and Business plans.
Cloudflare has no OIDC sign-in for API tokens, so the scan uses a read-only Cloudflare API token that you store as a GitHub secret. The token stays on your runner and is never sent to LeftSize. Each issue covers one Cloudflare account. See the Cloudflare setup guide for the token permissions.
Cost optimizationFree4 rules
- Busy Cloudflare Workers logging 100% of requests to Workers LogsWorkers with Workers Logs enabled, a head sampling rate of 1 (every request logged) and at least 10 million requests in the last 7 days
- Cloudflare Zero Trust users holding a seat without signing in for 60+ daysZero Trust users who hold an Access or Gateway seat but haven't signed in for 60 days, or never signed in and were added more than 60 days ago
- Cloudflare zones on a paid plan serving no trafficCloudflare zones on a paid plan (Pro, Business, Enterprise) that are pending, initializing, moved or paused, so none of the plan's features apply
- R2 buckets without a lifecycle rule to clean up incomplete multipart uploadsR2 buckets without an enabled, bucket-wide lifecycle rule that aborts incomplete multipart uploads, so parts of failed uploads stay stored
Deprecations & retirementsTeam3 rules
- Cloudflare zones still using Page Rules — migrate to Rules before Cloudflare does it for youActive Cloudflare zones with Page Rules, which are deprecated in favour of Redirect, Cache, Configuration, Origin and Transform Rules
- Cloudflare zones with deprecated zone features still on (Auto Minify)Active Cloudflare zones with deprecated zone features still configured; currently checks Auto Minify (CSS, HTML or JavaScript)
- Workers AI models in use that Cloudflare removes on Nov 20, 2026Workers AI models called in the last 14 days that Cloudflare removes from the catalog on November 20, 2026
SecurityTeam13 rules
- Cloudflare Access applications allow EveryoneCloudflare Access applications with an Allow policy that includes Everyone and has no Require rule
- Cloudflare Access service tokens unused for 90+ daysCloudflare Access service tokens not used for 90 days, or never used and created more than 90 days ago
- Cloudflare account API tokens unused for 90+ daysActive account-owned Cloudflare API tokens that haven't been used for 90 days, or were never used and are older than 90 days
- Cloudflare account API tokens with write access, no expiry and no IP restrictionActive account-owned Cloudflare API tokens with a Write, Edit or Admin permission, no expiry date and no client IP restriction
- Cloudflare accounts without enforced two-factor authenticationCloudflare accounts where 2FA Enforcement is off, or where accepted members have no two-factor authentication on their Cloudflare login
- Cloudflare Registrar domains without transfer lockActive domains registered with Cloudflare Registrar whose transfer lock is off, so they can be transferred to another registrar with the authorization code
- Cloudflare Workers with credentials in plain-text variablesWorkers with plain-text environment variables whose name looks like a credential (secret, password, token, API key, private key, credential)
- Cloudflare zones not validating the origin certificate (SSL/TLS mode Full instead of Full (strict))Active Cloudflare zones whose SSL/TLS encryption mode is Full, which encrypts traffic to the origin but accepts any origin certificate
- Cloudflare zones sending traffic to the origin unencrypted (SSL/TLS mode Off or Flexible)Active, proxied Cloudflare zones whose SSL/TLS encryption mode is Off or Flexible, so traffic between Cloudflare and the origin is plain HTTP
- Cloudflare zones with weak HTTPS settings (old TLS versions, plain HTTP or no HSTS)Active Cloudflare zones with a minimum TLS version below 1.2, Always Use HTTPS off, or HSTS off
- Cloudflare zones without DNSSECActive Cloudflare zones with DNS on Cloudflare (full setup) where DNSSEC is disabled, or pending for more than 7 days because the registrar has no DS record
- R2 buckets publicly readable through the r2.dev development URLR2 buckets with public access through the Cloudflare-managed r2.dev development URL, which is rate-limited and has no WAF, caching or access control
- R2 buckets with a CORS policy that allows any websiteR2 buckets whose CORS policy has * in AllowedOrigins, so any website can use a visitor's browser to call the bucket
GovernanceTeam6 rules
- Cloudflare certificates expiring within 30 days or expiredCloudflare Origin CA certificates and custom (uploaded) edge certificates that expire within 30 days or have already expired
- Cloudflare load balancer pools not used by any load balancerLoad balancer pools that are not a default, fallback, region, country or PoP pool of any load balancer in the account's zones
- Cloudflare Registrar domains expiring without auto-renew or already expiredDomains registered with Cloudflare Registrar that expire within 30 days with auto-renew off, or that already expired (expired or in the redemption period)
- Cloudflare Tunnels without a connection for 30+ daysCloudflare Tunnels that are down with no connection for more than 30 days, or that were never run and are older than 30 days
- Cloudflare Workers unused for 30+ daysWorkers that had no invocations and no changes in the last 30 days (Workers that only serve static assets are skipped)
- Cloudflare Workers with a compatibility date older than 12 monthsWorkers whose compatibility_date is more than 12 months old