The pattern
Every CI integration is the same three steps:- Install the CLI (
pip install mergeguide). - Run
mergeguide checkwith a fail threshold. - Let the non-zero exit code fail the job.
check exits 1 when policy violations are found, which fails the step. See
exit codes.
Emit SARIF for your security dashboard
Most CI and security platforms ingest SARIF. Write it to a file and upload it with your platform’s mechanism:Examples by system
- GitHub Actions
- GitLab CI
- Generic shell
Use the dedicated GitHub Action — it wraps these steps
and uploads to code scanning.
Keep credentials in CI secrets
When a step needs an API key, reference it from your CI system’s secret store — never hardcode it:Scanners in CI
The vulnerability and IaC scanners take their own--fail-on threshold and also
exit non-zero to fail a build:
Next steps
Output formats
Pick the right format for your pipeline.
PR gate
Block merges on blocking findings.