SECOPS

WAF False-Positive Pattern Aggregator

Nightly job that pulls a day of Cloudflare WAF blocks, deduplicates them into recurring patterns, persists the aggregates to Postgres.

CategorySecOps
Enginesim
Difficultyintermediate
Triggerschedule
Steps6
Setup~15 min

How it runs

The automated pipeline, trigger to output.

  • TriggerNightly schedule starts aggregation
  • ActionFetch 24h of WAF block eventsCloudflareCloudflare
  • LogicNormalize and dedupe into pattern keys
  • ActionUpsert aggregates into PostgresPostgreSQLPostgres
  • LogicCompare against 7-day baseline
  • OutputEmail trend report to security teamGmailGmail

What it does

This deterministic pipeline rolls up a full day of WAF block events into stable pattern groups, stores the counts in Postgres, and produces a trend report. Over weeks it shows which managed rules are the chronic false-positive offenders worth tuning first.

When to use it

Use it when you need data, not anecdotes, to prioritize WAF tuning work. A single noisy rule often accounts for most bad blocks; this surfaces it and tracks whether your tuning is actually reducing false positives week over week.

How it works

  1. 1A nightly schedule kicks off the aggregation run.
  2. 2It fetches the last 24 hours of firewall block events from Cloudflare.
  3. 3A normalization step collapses events into pattern keys by rule ID, path template, and method, counting occurrences.
  4. 4The aggregates are upserted into a Postgres table keyed by date and pattern.
  5. 5A query compares today against the trailing 7-day baseline to flag rising offenders.
  6. 6The trend report, with top rules and deltas, is emailed to the security distribution list.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
  2. 2
    Connect PostgresAny Postgres URL — query, write, migrate.
  3. 3
    Connect GmailRead, draft, send, label.
  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.