SECOPS

Auto-rotate Cloudflare secret on GitHub secret-scanning alert

When GitHub's secret-scanning raises an alert, this rotates the leaked value in Cloudflare Workers secrets, marks the GitHub alert resolved.

CategorySecOps
Enginesim
Difficultyadvanced
Triggerevent
Steps7
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitHub secret-scanning alertGitHubGitHub
  • LogicMap secret type to Cloudflare secret name
  • LogicBranch: authorized to auto-rotate?
  • ActionSet new value in Cloudflare Workers secretCloudflareCloudflare
  • ActionResolve GitHub alert with noteGitHubGitHub
  • ActionAppend entry to Notion evidence logNotionNotion
  • OutputConfirm rotation in SlackSlack

What it does

Listens for GitHub secret-scanning alerts (native push protection and partner detections), rotates the matching secret in your Cloudflare Workers project, then closes the loop by updating the alert status in GitHub and recording the full chain of custody in a Notion evidence log.

When to use it

Use this when GitHub Advanced Security is already scanning your repos and your runtime config lives in Cloudflare Workers. It turns a passive alert into an executed rotation plus an auditable record, instead of an email a human triages hours later.

How it works

  1. 1A GitHub secret-scanning alert webhook fires with the secret type and location.
  2. 2A mapping step resolves which Cloudflare Worker secret name corresponds to the leaked credential.
  3. 3A branch confirms the secret is one this workflow is authorized to rotate; unknown types escalate instead.
  4. 4Cloudflare receives the new value via its secrets API and the Worker picks it up on next deploy.
  5. 5The GitHub alert is patched to resolved with a rotation note.
  6. 6A Notion page is appended with the alert id, repo, rotation timestamp, and operator.
  7. 7A Slack message confirms completion to the on-call channel.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  2. 2
    Connect CloudflareWorkers, Pages, R2, KV — the edge stack.
  3. 3
    Connect NotionPages, databases, comments.
  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.