SECOPS

Escalate likely secret leaks in GitLab MR diffs to PagerDuty

Scans new merge request diffs for credential and key patterns, and when a likely secret is found it auto-labels the MR, blocks merge, and pages the on-call security engineer…

CategorySecOps
Enginesim
Difficultyadvanced
Triggerwebhook
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab MR opened or commits pushedGitLabGitLab
  • ActionFetch added lines from MR diffGitLabGitLab
  • LogicMatch diff against secret patterns
  • ActionLabel MR and post failing commit statusGitLabGitLab
  • ActionOpen PagerDuty incident for on-callPagerDutyPagerDuty
  • OutputPost heads-up to security channelSlack

What it does

Inspects every newly opened or updated merge request diff for high-risk patterns: private keys, cloud access tokens, connection strings, and hardcoded passwords. On a hit it applies a `security::secret-leak` label, posts a failing commit status, and triggers a PagerDuty incident so it gets handled immediately rather than queued.

When to use it

Use it as a fast tripwire alongside your full secret scanner when a leaked credential in a diff is an urgent, page-worthy event. It shortens time-to-response for the worst-case leak from hours to seconds.

How it works

  1. 1A GitLab webhook fires when an MR is opened or its commits change.
  2. 2The flow fetches the diff and runs the added lines against the secret pattern set.
  3. 3A filter stops the flow when no candidate secret is found.
  4. 4On a match it labels the MR and posts a failing `security/no-secrets` commit status to block merge.
  5. 5It opens a PagerDuty incident with the MR link, file, and matched pattern type, then drops a heads-up in Slack for visibility.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect PagerDutyIncidents, on-call, escalations.
  3. 3
    Connect SlackChannels, DMs, threads, mentions.
  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.