SECOPS

Cloudflare WAF Emergency Block with PagerDuty Escalation and Timed Rollback

On a PagerDuty incident webhook, deploys an emergency Cloudflare WAF block rule, then automatically removes it after a defined TTL unless an on-call engineer confirms it should…

CategorySecOps
Enginesim
Difficultyadvanced
Triggerwebhook
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerPagerDuty incident webhook with offender detailsPagerDutyPagerDuty
  • LogicValidate payload and build scoped block expression
  • ActionDeploy emergency WAF block with expiry tagCloudflareCloudflare
  • ActionPost Keep/Let-Expire prompt to on-call SlackSlack
  • LogicBranch on Keep vs. TTL expiry, remove rule if expiredCloudflareCloudflare
  • OutputLog action and decision to Axiom incident timelineAxiom

What it does

Lets you respond to an active attack by instantly deploying a Cloudflare WAF block from a PagerDuty incident, while preventing forgotten emergency rules from lingering. The block self-expires after a TTL unless explicitly extended.

When to use it

Use it during live incidents (credential stuffing, L7 floods, malicious IP ranges) when speed matters but you don't want temporary mitigations to become permanent, unreviewed cruft. It pairs fast action with guaranteed cleanup.

How it works

  1. 1A PagerDuty incident webhook carries the offending IP, ASN, or path pattern in its payload.
  2. 2The flow validates the payload and constructs a scoped WAF block expression.
  3. 3It deploys the emergency block rule via the Cloudflare API and tags it with an expiry timestamp.
  4. 4It posts the active rule and a Keep / Let-Expire prompt to the on-call Slack channel.
  5. 5A branch waits for the TTL: if the engineer chooses Keep, the rule is promoted to a tracked permanent change; otherwise on expiry the rule is removed via Cloudflare.
  6. 6The action, decision, and removal are logged to Axiom for the incident timeline.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect PagerDutyIncidents, on-call, escalations.
  2. 2
    Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  4. 4
    Connect AxiomLog streams, queries, dashboards.
  5. 5
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  6. 6
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  7. 7
    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.