- GitHub Actions
- GitLab CI
- CircleCI
Add Attach the artifact to your PR as proof you validated before merge.GitHub Actions documentation →
flintai-cli to your GitHub Actions workflow:Output formats
Flint AI CLI writes results as JSON or as SARIF (Static Analysis Results Interchange Format), an open standard for reporting analysis findings.
Tools that read SARIF ingest results from any SARIF-producing tool without a custom parser, so your findings land alongside the rest of your security results instead of in a file nobody opens. Flint AI CLI writes SARIF 2.1.0.
Set the format
flintai scan and flintai eval run write JSON unless you ask for something else. Pass --format sarif (short form -f) to write SARIF instead. The output filename follows the format you choose:
What SARIF output contains
- flintai scan
- flintai eval run
Findings map to file locations with line numbers, and severity maps to SARIF levels: critical and high findings become Findings then appear in the Security tab of your repository and as annotations on the pull request, so reviewers see them without downloading an artifact.
error, medium becomes warning, and everything else becomes note.This is the output GitHub code scanning is built to read.Upload to GitHub code scanning:Exit codes
Flint AI Scan returns standard exit codes for CI/CD integration:Exit code
0 means the scan ran successfully, not that no issues were found. Check the results file to see findings.Other CI systems
The core pattern works anywhere:1
Provide Python 3.11 or later
Flint AI CLI requires Python 3.11 or later. Use a prebuilt image where you can, such as
python:3.11.2
Install Flint AI CLI
3
Install OpenGrep and put it on PATH
$HOME/.opengrep/cli/latest to PATH. This is the part that differs most between systems, because most of them run each step in a fresh shell: GitHub Actions writes the path to $GITHUB_PATH, CircleCI appends an export to $BASH_ENV, and GitLab CI runs the whole job in one shell, so a plain export carries. Find your system’s equivalent for persisting environment changes between steps.4
Set your LLM API key
Store the key as a secret and expose it to the job as an environment variable:
GEMINI_API_KEY, OPENAI_API_KEY, or ANTHROPIC_API_KEY.5
Run the scan
6
Save the results as a build artifact
Use your CI system’s artifact mechanism so the file outlives the job and reviewers can reach it from the pull request.