SECOPS

Leaked Cloudflare API Token Revoke and Reissue

On detection of an exposed Cloudflare API token, this workflow immediately revokes the live token, issues a scoped replacement, stores it securely.

CategorySecOps
Enginesim
Difficultyadvanced
Triggerwebhook
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerExposure report received via webhookHTTP webhook
  • LogicVerify token is active and ours
  • ActionRevoke compromised tokenCloudflareCloudflare
  • ActionIssue scoped replacement tokenCloudflareCloudflare
  • ActionRecord rotation in audit logPostgreSQLPostgres
  • OutputNotify service owner with new token refSlack

What it does

Contains the blast radius of a leaked Cloudflare API token by revoking it the moment exposure is confirmed, minting a fresh token with the same scopes, and handing the replacement to the owning service so the rotation closes the same hour.

When to use it

Use it when a Cloudflare token is found in logs, a public repo, or a paste, and you need automatic containment rather than a manual revoke-and-rebuild that leaves a window open. Best for orgs managing many edge tokens.

How it works

  1. 1An HTTP webhook receives the exposure report with the token ID and the source that flagged it.
  2. 2The flow checks the token is still active and confirms it belongs to your Cloudflare account before acting.
  3. 3It revokes the compromised token via the Cloudflare API to immediately cut access.
  4. 4It creates a replacement token carrying the original's permission scopes.
  5. 5It writes the new token to the secrets store and records the rotation in Postgres for audit.
  6. 6It DMs the service owner in Slack with the new token reference and the revoked token's old ID.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
  3. 3
    Connect PostgresAny Postgres URL — query, write, migrate.
  4. 4
    Connect SlackChannels, DMs, threads, mentions.
  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.