CI/CD Integration
GitHub Actions
name: MCP Security Scan
on: [push, pull_request]
jobs:
scan:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: sattyamjjain/agent-audit-kit@v0.6.36
with:
severity: low
fail-on: high
Pre-commit
# .pre-commit-config.yaml
repos:
- repo: https://github.com/sattyamjjain/agent-audit-kit
rev: v0.6.36
hooks:
- id: agent-audit-kit
# Stricter: fail on MEDIUM and above. This replaces the hook's default
# `--ci` (which always means --fail-on high), so set the threshold here.
# args: ['--fail-on', 'medium']
The hook runs scan --ci, so it fails on HIGH and CRITICAL findings, except the
instruction-file rules AAK-AGENT-001, -003 and -006, which report but don't
fail it until their precision is published (see the CLI exit codes).
GitLab CI
agent-audit:
image: python:3.12
script:
- pip install agent-audit-kit
- agent-audit-kit scan . --severity high --format sarif -o gl-agent-audit.sarif --fail-on none
artifacts:
reports:
sarif: gl-agent-audit.sarif
reports:sarif needs GitLab Ultimate 19.1 or later, and GitLab ingests it only
from a job that succeeds, hence --fail-on none: gate in a separate job. See
GitLab CI.
Jenkins
stage('MCP Security') {
sh 'pip install agent-audit-kit'
sh 'agent-audit-kit scan . --ci --severity high --format sarif -o report.sarif'
recordIssues tool: sarif(pattern: 'report.sarif')
}
Evidence Artifacts
Generate the SBOM and its companion exploitability document in the same job. Both are offline and deterministic, so re-running does not churn the artifact:
- name: Evidence bundle
run: |
pip install agent-audit-kit
agent-audit-kit sbom . --format cyclonedx -o sbom.cdx.json
agent-audit-kit vex . -o vex.openvex.json
- uses: actions/upload-artifact@v4
with:
name: supply-chain-evidence
path: |
sbom.cdx.json
vex.openvex.json
The two documents identify products by the same purl, so consumers join them
without a mapping table. vex is an evidence command, not a gate: it exits 0
on a clean emit regardless of findings. See VEX and SBOM.
Diff-Aware Scanning
Only scan files changed in a PR:
agent-audit-kit scan . --diff origin/main