Skip to content

GitHub Actions

Add the following in Settings → Secrets and variables → Actions of your repository:

Type Name Description
Secret GERION_API_KEY M2M API key for your organization
Variable GERION_API_URL Gerion API Gateway URL

Results are sent directly to the Gerion dashboard. Copy this file to .github/workflows/gerion-scan.yml:

name: Gerion Security Scan
on:
push:
branches: [main, master, develop]
pull_request:
workflow_dispatch:
jobs:
gerion-scan:
name: Security Scan
runs-on: ubuntu-latest
permissions:
contents: read
container:
image: ghcr.io/gerion-appsec/gerion-cli:latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Run full security scan
env:
GERION_API_URL: ${{ vars.GERION_API_URL }}
GERION_API_KEY: ${{ secrets.GERION_API_KEY }}
run: gerion scan-all /github/workspace

You can use the official Gerion Action directly in any workflow without copying the container YAML:

- uses: gerion-appsec/gerion-cli-action@v1
with:
api-url: ${{ vars.GERION_API_URL }}
api-key: ${{ secrets.GERION_API_KEY }}
Parameter Default Description
scan-type all all | secrets | sca | iac | sast
code-path . Subdirectory to scan (relative to workspace)
api-url — Gerion API Gateway URL
api-key — M2M API key
output-format — json | markdown | sarif
output-file — Output file (relative to workspace)
log-level info debug | info | warning | error
timeout 180 Timeout per scanner in seconds
Output Description
findings-file Absolute path to the output file (if output-file was set)
exit-code CLI exit code (0 = success, 1 = execution error)
  • Gerion CLI automatically detects GITHUB_REPOSITORY, GITHUB_REF_NAME, and GITHUB_SHA. No manual metadata configuration needed.
  • Container jobs mount $GITHUB_WORKSPACE at /github/workspace automatically.
  • The CLI returns exit code 0 even when vulnerabilities are found. Use report --severity or parse the JSON to implement quality gates.