agent-guardian scan you run
locally exits non-zero when an agent regresses, and your CI provider turns that
exit code into a failed check. The findings surface three ways — a SARIF /
Code Quality report, inline annotations, and a single sticky PR comment — all
from the one CLI.
Start here
GitHub Actions
Composite action + SARIF upload to the Security tab + sticky PR comment.
GitLab CI
SARIF security report + inline Code Quality widget + sticky MR note.
Bitbucket
Code Insights report + per-finding annotations + sticky PR comment.
The pieces
| Page | What it covers |
|---|---|
| GitHub Actions | The pull_request workflow, the composite action, the permissions block. |
| Composite action | The reusable agentguardian-scan action and its inputs. |
| GitLab CI | The .gitlab-ci.yml job, SAST + Code Quality artifacts. |
| Bitbucket Pipelines | bitbucket-pipelines.yml, Code Insights, annotations. |
| Security gates | --fail-under plus the --max-critical / --max-high / --max-medium / --max-low ceilings, and the authoritativeness rules. |
| Upload SARIF | github/codeql-action/upload-sarif@v3 and the permissions it needs. |
| PR / MR comments | The single sticky comment, its hidden-marker contract, and a rendered sample. |
The gate, in one line
--fail-under is the AIVSS floor; the --max-* flags are per-severity finding
ceilings. They are AND-combined — the gate fails if the score drops below
the floor or any severity count exceeds its ceiling. Full matrix on the
security gates page.
Surfacing the result
Each platform exposes the same scan three ways:- A machine-readable report — SARIF (GitHub Code Scanning / GitLab SAST), GitLab Code Quality JSON, or a Bitbucket Code Insights report.
- Inline annotations — per-finding, severity-mapped, shown on the diff.
- A sticky PR/MR comment — one comment upserted in place on every push, keyed by a hidden marker so it never spams. Identical body across all three hosts; see PR / MR comments.
Cost control
Cap the spend with--budget-usd so a runaway provider can never cost more than
budgeted per PR. The swarm soft-stops new attack turns at 80% of the cap and
reserves the remainder for the report-emission step. A full-mode scan against
the bundled vulnerable demo costs roughly $0.06 on gemini:gemini-2.5-flash.