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.
How it runs
The automated pipeline, trigger to output.
- TriggerNightly schedule starts aggregation
- ActionFetch 24h of WAF block eventsCloudflare
- LogicNormalize and dedupe into pattern keys
- ActionUpsert aggregates into PostgresPostgres
- LogicCompare against 7-day baseline
- OutputEmail trend report to security teamGmail
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
- 1A nightly schedule kicks off the aggregation run.
- 2It fetches the last 24 hours of firewall block events from Cloudflare.
- 3A normalization step collapses events into pattern keys by rule ID, path template, and method, counting occurrences.
- 4The aggregates are upserted into a Postgres table keyed by date and pattern.
- 5A query compares today against the trailing 7-day baseline to flag rising offenders.
- 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.
- 1Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
- 2Connect PostgresAny Postgres URL — query, write, migrate.
- 3Connect GmailRead, draft, send, label.
- 4Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
- 5Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
- 6Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.
More SecOps workflows
Post-Revocation Verification and Audit Logging
After a key is revoked, it confirms the old credential actually fails, verifies the replacement works.
Page on-call when a WAF rule mass-blocks legitimate traffic
On demand or every few minutes, it detects a single Cloudflare WAF rule suddenly blocking a broad spread of ASNs and paths (a likely false-positive storm).
PII Content Scan on New Dropbox External Share
When a file gets an external Dropbox link, it reads the file content, uses an AI classifier to detect PII or secrets.
Compile a weekly WAF tuning review with trends to Confluence
Every week an agent rolls up Cloudflare WAF block clusters by rule and ASN, compares them to prior weeks for trend direction.
Sensitive Dropbox Link Owner Remediation Loop
When a newly created Dropbox shared link points to a sensitive file, this workflow DMs the file owner, gives them a deadline to justify or revoke it.
GitLab Push Secret Detection to Block and History Purge
On a GitLab push that contains a detected secret, it revokes the exposed credential, opens a tracking issue with git-history purge instructions.
Run it inside a business
This workflow drops into a full company template. Import the org, and this is one of the playbooks its agents run.

Run this workflow in your colony.
14-day trial. No DevOps. No Sales call. Provisioned in under a minute.
