SECOPS

Pre-Merge Gitleaks Hit to Author Coaching

When a Gitleaks scan in CI flags a secret in a pull request, this workflow blocks the merge, comments on the PR with the exact finding, and DMs the author with rotation guidance.

CategorySecOps
Enginesim
Difficultybeginner
Triggerwebhook
Steps5
Setup~5 min

How it runs

The automated pipeline, trigger to output.

  • TriggerCI Gitleaks scan results webhookHTTP webhook
  • LogicFilter out allowlisted findings
  • ActionFail PR status check to block mergeGitHubGitHub
  • ActionComment finding inline on PRGitHubGitHub
  • OutputDM author with rotation stepsSlack

What it does

Stops a secret from ever landing on the default branch. When Gitleaks finds a credential in a PR diff, it fails the check, annotates the offending line so the author sees exactly what leaked, and coaches them through both removing it from history and rotating the now-burned secret.

When to use it

Use it as a guardrail on every pull request so leaks are caught at review time, not after merge. Best paired with reactive scanning so the rare secret that slips past CI still gets handled downstream.

How it works

  1. 1A CI pipeline run finishes a Gitleaks scan and posts results to the webhook.
  2. 2The flow checks whether any findings are real secrets versus allowlisted patterns.
  3. 3If a real secret is present, it sets the PR's status check to failing to block the merge.
  4. 4It comments inline on the PR with the file, line, and rule that matched.
  5. 5It DMs the PR author in Slack with steps to scrub the secret from history and rotate it.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect HTTP webhookTrigger any URL on agent actions.
  2. 2
    Connect GitHubRepos, issues, pull requests, actions.
  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.