SECOPS

Auto-label GitLab MRs that touch secrets and pull in a security reviewer

Scans the diff of each new GitLab MR for credential-like patterns and sensitive file paths, and when it finds them.

CategorySecOps
Enginesim
Difficultyadvanced
Triggerwebhook
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab MR opened or updatedGitLabGitLab
  • ActionFetch MR diff and scan for secretsGitLabGitLab
  • LogicBranch on finding above risk threshold
  • ActionApply security label, assign reviewer, comment findingsGitLabGitLab
  • OutputNotify appsec channel in SlackSlack

What it does

Inspects every new merge request's diff for secret-shaped strings (API keys, tokens, private key headers) and edits to sensitive paths like `.env`, IAM policy, or auth config. When it finds a match it applies a `security::appsec` label, assigns the appsec reviewer, and flags the specific findings in a comment so the change can't slip through unlabeled.

When to use it

Use it as a first-pass gate so risky diffs are caught and routed automatically instead of relying on authors to remember to tag security.

How it works

  1. 1A GitLab webhook fires when an MR is opened or updated.
  2. 2The flow fetches the MR changes and runs pattern matching for credentials and sensitive file paths.
  3. 3A branch decides whether any finding crosses the risk threshold.
  4. 4If so, it applies the security label, assigns the appsec reviewer, and posts a comment listing the matched lines.
  5. 5A Slack note goes to the appsec channel so the reviewer knows it's incoming and why.

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
    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.