ENGINEERING

Block GitLab MRs that touch secrets and escalate to security

Scans changed files in a new merge request for secret-like patterns and hardcoded credentials; on a hit it adds a do-not-merge label, posts findings as an MR comment.

CategoryEngineering
Enginesim
Difficultyadvanced
Triggerwebhook
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab merge request opened or updatedGitLabGitLab
  • ActionFetch the MR diffGitLabGitLab
  • LogicScan diff for secret patterns and high entropy
  • ActionApply do-not-merge label and comment findingsGitLabGitLab
  • OutputPage the security on-call poolPagerDutyPagerDuty

What it does

Catches credentials before they merge. When a merge request opens, the flow scans its diff for secret-like patterns (API keys, tokens, private keys, connection strings). If anything matches, it applies a `do-not-merge` label, comments the exact offending lines on the MR, and pages the security reviewer pool so a human confirms before the branch goes anywhere.

When to use it

Use it as a backstop alongside (not instead of) pre-commit hooks, for teams where a leaked secret in history is a serious incident. Especially valuable when contributors include contractors or forks where local hooks aren't guaranteed.

How it works

  1. 1A GitLab webhook fires on merge request open or update.
  2. 2The flow pulls the MR diff text from the GitLab API.
  3. 3A logic step runs the diff through secret-detection patterns and entropy checks.
  4. 4Clean MRs pass through silently; on a match it labels the MR `do-not-merge` and comments the redacted findings.
  5. 5It pages the security on-call pool so a reviewer is pulled in immediately.

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
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    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.