SECOPS

Block and Triage GitLab MRs Containing Leaked Secrets

When a merge request is updated, scans the diff for hardcoded secrets and credentials; if any are found it labels the MR blocked, posts the masked findings to a security Slack…

CategorySecOps
Enginesim
Difficultyadvanced
Triggerwebhook
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab MR updatedGitLabGitLab
  • ActionFetch raw diff and scan for secretsGitLabGitLab
  • LogicBranch on whether a secret was detected
  • ActionApply blocked label + set MR to draftGitLabGitLab
  • ActionPost masked findings to security SlackSlack
  • OutputOpen monday.com remediation itemmonday.com

What it does

Catches API keys, tokens, and private keys committed into a merge request diff, blocks the MR from review, and spins up a tracked remediation task so the leak is rotated rather than just deleted.

When to use it

Run this as a safety net alongside (or instead of) a pre-commit hook, especially for contributors whose local tooling you can't enforce. It catches secrets the moment they reach the server.

How it works

  1. 1A GitLab webhook fires on merge request `update` events.
  2. 2The flow fetches the raw diff and runs a secret-detection ruleset (entropy + known token prefixes like `AKIA`, `ghp_`, `sk-`).
  3. 3A branch checks whether any matches were found.
  4. 4If clean, it exits silently. If a secret is detected, it applies a `sec/blocked` label and sets the MR to draft via GitLab.
  5. 5It posts the masked match locations to the security Slack channel and creates a monday.com remediation item assigned to the secrets-rotation owner.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect SlackChannels, DMs, threads, mentions.
  3. 3
    Connect monday.comVisual work management for teams.
  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.