Skip to content
This python script will update all of the rules in the CloudFlare ruleset to simulate, while also keeping their default actions incase you want to switch back to default after you develop your baseline of false positives.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

CloudFlare Change Waf Rule Actions

This project is meant to help you avoid the pesky task of turning the 350+ cloudflare rules to simulate (or whatever other mode you desire) in your WAF, in order to build a baseline of potential false positives your application may trigger or switch back to default once you've established your baseline.

Getting Started

Clone the repo to your local machine, define the 3 required environment variables, and off you go!


You may need to install the python requests library, or possibly update some dependencies.


pip install requests


pip3 install requests

Define your relevant environment variables.

export CF_ZONE_ID=
export CF_AUTH_KEY=

Run it!


Running the tests

Go check your CloudFlare rules in the UI, they will be set to simulate. Or watch the output of the requests while the script is running.


  • Conor Murray


Use it for whatever

You can’t perform that action at this time.