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.
Python
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
README.md
updateWafRules.py

README.md

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!

Prerequisites

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

python2.7

pip install requests

python3

pip3 install requests

Define your relevant environment variables.

export CF_ZONE_ID=
export CF_AUTH_EMAIL=
export CF_AUTH_KEY=

Run it!

python3 updateWafRules.py

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.

Authors

  • Conor Murray

License

Use it for whatever

You can’t perform that action at this time.