Skip to content
ES EN

CI/CD Integration

Integrating Gerion into your CI/CD ensures every commit is automatically analyzed before reaching production. Gerion CLI runs as a Docker container, making it compatible with any system that can run containers.

Required variables

On any platform, you need to configure these two secret variables:

VariableWhere to set itDescription
GERION_API_URLEnvironment variable / pipeline variableBase URL of your Gerion API Gateway
GERION_API_KEYSecret (never as a public variable)M2M API key for your organization

Docker image

ghcr.io/gerion-appsec/gerion-cli:latest

Available commands

CommandDescription
gerion scan-allRuns all four scanners in sequence (recommended)
gerion secrets-scanHardcoded credentials and secrets only
gerion sca-scanVulnerable dependencies only
gerion iac-scanInfrastructure configuration only
gerion sast-scanStatic code analysis only
gerion reportGenerates a report from findings stored in the API

Output modes

The CLI prioritizes the output destination in this order:

  1. --output-file → saves to file (no API call, no console table)
  2. --format → prints format to stdout
  3. GERION_API_URL + GERION_API_KEY → sends findings to the Gerion API
  4. No options → Rich table in console

Automatic metadata detection

Gerion CLI automatically detects the CI/CD environment and extracts repository name, branch, commit, and build ID from each platform’s native environment variables. You don’t need to configure these variables manually in GitHub Actions, GitLab CI, or Jenkins.

For other platforms, use explicit overrides:

Ventana de terminal
GERION_REPO_NAME="my-repo"
GERION_BRANCH_NAME="main"
GERION_COMMIT_HASH="abc123..."
GERION_BUILD_ID="42"

Exit codes

CodeMeaning
0Scan completed (findings may exist)
1Execution error (tool failure, timeout, missing dependency)

The CLI always returns 0 even when vulnerabilities are found. To block the pipeline based on findings, use the report command to parse results and apply your own quality gates.


Platform guides

GitHub Actions

Native container job, SARIF for GitHub Advanced Security, and publishable Marketplace Action.

View guide →

GitLab CI

Integration with GitLab Ultimate’s native Security Dashboard via SARIF.

View guide →

Jenkins

Declarative Pipeline and Shared Library (JSL) to reuse gerionScan() in any Jenkinsfile.

View guide →

Azure DevOps

YAML pipeline with two stages: scan and PDF report generation.

View guide →

CircleCI

Reusable gerion_scan command and workflows with organization context support.

View guide →

Bitbucket Pipelines

Steps with YAML anchors for maximum reuse without duplicating configuration.

View guide →