SECOPS

Daily Cloudflare WAF Drift Audit Against Git Baseline

Every morning, pulls the live Cloudflare firewall and WAF custom rules, diffs them against the approved baseline stored in GitHub.

CategorySecOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerDaily schedule fires the audit
  • ActionList live Cloudflare WAF and firewall rulesCloudflareCloudflare
  • ActionFetch approved baseline JSON from GitHubGitHubGitHub
  • LogicDiff live rules against baseline
  • LogicBranch on whether drift was detected
  • OutputPost drift report or all-clear to SlackSlack

What it does

This workflow keeps your Cloudflare Web Application Firewall honest. Once a day it reads every active custom firewall and WAF rule across your configured zones, compares them line by line against the approved baseline checked into a GitHub repo, and reports any drift to Slack so on-call can react.

When to use it

Run this when your WAF rules are change-managed through Git but operators can still hot-edit them in the Cloudflare dashboard during incidents. It surfaces the gap between what was approved and what is actually live, before an unreviewed rule weakens your perimeter.

How it works

  1. 1A daily schedule fires the audit at a quiet hour.
  2. 2The Cloudflare step lists all custom firewall and WAF rules for each zone, capturing expression, action, and enabled state.
  3. 3The GitHub step fetches the committed baseline JSON for the same zones.
  4. 4A diff logic step computes rules that were added, removed, or modified versus baseline.
  5. 5A branch checks whether any drift exists.
  6. 6If drift is found, Slack receives a formatted report listing each delta with the rule name and what changed; a clean run posts a short all-clear.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
  2. 2
    Connect GitHubRepos, issues, pull requests, actions.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  4. 4
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  5. 5
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  6. 6
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.