SECOPS

Auto-label GitLab MRs that introduce leaked secrets

On every merge request, scan the diff for hardcoded secrets and, if any are found, apply a security label, block the MR, and alert the secrets-response pod.

CategorySecOps
Enginesim
Difficultyadvanced
Triggerwebhook
Steps6
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitLab MR opened or updatedGitLabGitLab
  • ActionFetch MR diff from GitLabGitLabGitLab
  • ActionClassify hunks for secret patternsOpenAI
  • LogicExit if no secrets detected
  • ActionLabel and block MR in GitLabGitLabGitLab
  • OutputOpen Linear issue and alert Slack podSlack

What it does

Scans each new or updated merge request diff for credential patterns (API keys, tokens, private keys, connection strings). When it finds a likely secret, it applies a `security::leaked-secret` label, blocks the MR, opens a Linear issue, and pings the secrets-response pod in Slack with the file and line.

When to use it

Use it as a safety net upstream of human review, so a leaked credential gets caught and quarantined before a reviewer even looks. It feeds the same label namespace your reviewer-routing workflow consumes.

How it works

  1. 1A GitLab webhook fires when a merge request opens or its commits update.
  2. 2The flow fetches the MR diff via the GitLab API.
  3. 3An OpenAI step classifies each changed hunk for high-confidence secret patterns and returns matches with file and line.
  4. 4A branch exits quietly when no secrets are found.
  5. 5On a hit, it applies the `security::leaked-secret` label and `review::blocking` on the MR.
  6. 6It opens a Linear issue with the redacted finding and notifies the secrets-response Slack channel.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitLabRepos, MRs, pipelines, registry.
  2. 2
    Connect OpenAIModels, embeddings, files.
  3. 3
    Connect LinearIssues, projects, cycles, triage.
  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.