SECOPS

Block source IPs in Cloudflare when a GitLab token shows anomalous use

Starting from a suspicious GitLab token event, this verifies the originating IPs are also flagged as bots in Cloudflare and, if so, adds them to a Cloudflare WAF block list…

CategorySecOps
Enginesim
Difficultyadvanced
Triggerevent
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab token-anomaly eventGitLabGitLab
  • ActionExtract source IPs from anomalous token activityGitLabGitLab
  • ActionCheck IP bot reputation in CloudflareCloudflareCloudflare
  • LogicGate: proceed only for confirmed hostile IPs
  • ActionAdd IPs to Cloudflare WAF block listCloudflareCloudflare
  • OutputOpen Datadog incident to track containmentDatadogDatadog

What it does

This flips the usual direction: the trigger is GitLab, not Cloudflare. When GitLab reports anomalous token use — a new geo, an impossible-travel login, or a sudden burst of API calls — the flow checks whether the source IPs are already bot-flagged in Cloudflare. If they are, it concludes the token is being driven by hostile infrastructure and blocks those IPs at the Cloudflare WAF, then opens a Datadog incident to track the containment.

When to use it

Use this when GitLab anomaly detection is your earliest signal and you want to push enforcement back out to the edge automatically. It closes the loop between identity-layer anomalies and perimeter blocking without a responder copy-pasting IPs between consoles.

How it works

  1. 1A GitLab token-anomaly event triggers the flow.
  2. 2The flow extracts the source IPs from the anomalous token activity.
  3. 3It checks each IP's bot reputation in Cloudflare.
  4. 4A logic gate proceeds only for IPs confirmed as bot/hostile.
  5. 5Confirmed IPs are added to a Cloudflare WAF block list and a Datadog incident is opened for tracking.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
  3. 3
    Connect DatadogMetrics, traces, log search.
  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.