Back to Checks
cloudflare

Development mode is disabled for production zones

zone_development_mode_disabled
Service: zoneSeverity: low
OfficialBuilt-inVerified
Categories:resilience
Resource Type:Zone

Cloudflare zones are assessed for Development Mode configuration by checking if it is disabled to ensure caching, security features, and performance optimizations are active in production environments.

Risk

With Development Mode enabled, Cloudflare bypasses caching and some optimizations.

  • Confidentiality: some security features may be affected or bypassed
  • Integrity: performance optimizations are disabled impacting site reliability
  • Availability: origin server is exposed to increased load without caching protection

Run this check with Prowler

Run in Prowler Cloud
Run
prowler cloudflare --checks zone_development_mode_disabled

Recommendation

Disable Development Mode for production environments.

  • Use only temporarily during active development when cache bypassing is necessary
  • Development Mode auto-expires after 3 hours
  • Ensure it is manually disabled after development work completes
  • Consider using cache purge or page rules for targeted cache invalidation instead

Remediation

Other

1Log in to the Cloudflare dashboard and select your account and domain
2Go to Caching > Configuration
3Scroll to Development Mode
4Ensure Development Mode is Off
5Note: Development Mode auto-expires after 3 hours if left enabled

Check Code

from prowler.lib.check.models import Check, CheckReportCloudflare
from prowler.providers.cloudflare.services.zone.zone_client import zone_client


class zone_development_mode_disabled(Check):
    """Ensure that Development Mode is disabled for production Cloudflare zones.

    Development Mode temporarily bypasses Cloudflare's caching and performance
    optimizations, serving content directly from the origin server. While useful
    for testing changes, it should be disabled in production to maintain caching,
    security features, and performance optimizations.
    """

    def execute(self) -> list[CheckReportCloudflare]:
        """Execute the Development Mode disabled check.

        Iterates through all Cloudflare zones and verifies that Development Mode
        is disabled. When enabled, this mode bypasses caching and can impact
        performance and security.

        Returns:
            A list of CheckReportCloudflare objects with PASS status if Development
            Mode is disabled, or FAIL status if it is enabled for the zone.
        """
        findings = []
        for zone in zone_client.zones.values():
            report = CheckReportCloudflare(
                metadata=self.metadata(),
                resource=zone,
            )
            dev_mode = (zone.settings.development_mode or "").lower()
            if dev_mode == "off" or not dev_mode:
                report.status = "PASS"
                report.status_extended = (
                    f"Development mode is disabled for zone {zone.name}."
                )
            else:
                report.status = "FAIL"
                report.status_extended = (
                    f"Development mode is enabled for zone {zone.name}."
                )
            findings.append(report)
        return findings