IT OPS

Cloudflare WAF Drift Auto-Remediation → GitHub Revert PR

Detects WAF rules that drifted from the IaC baseline and, instead of just alerting.

CategoryIT Ops
Enginesim
Difficultyadvanced
Triggerschedule
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerSchedule triggers reconciliation run
  • ActionPull current WAF rules from CloudflareCloudflareCloudflare
  • ActionRead approved baseline from GitHubGitHubGitHub
  • LogicDiff and render corrected baseline; stop if clean
  • ActionOpen GitHub revert PR with corrected baselineGitHubGitHub
  • OutputPost PR link to Slack for reviewSlack

What it does

Closes the loop on drift. When live Cloudflare WAF rules no longer match the approved baseline, this opens a GitHub PR proposing the corrective change — restoring the baseline definition — so remediation goes back through code review and CI rather than another console edit.

When to use it

Use this on zones managed strictly as code where every fix must land via PR. It turns a drift finding into an actionable, reviewable revert without an engineer hand-writing the patch.

How it works

  1. 1A schedule triggers the reconciliation run.
  2. 2Cloudflare returns the current WAF rules for the zone.
  3. 3A GitHub action reads the approved baseline definition from the repo.
  4. 4A logic step computes the diff and renders the corrected baseline file content.
  5. 5If drift exists, a GitHub action commits the corrected file to a new branch and opens a PR describing the drift and proposed revert.
  6. 6A Slack output posts the PR link to the platform channel for review and merge.

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.