Skip to content
ES EN

GitHub Actions

Prerequisites

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

TypeNameDescription
SecretGERION_API_KEYM2M API key for your organization
VariableGERION_API_URLGerion API Gateway URL

Workflows

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

Reusable Action

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 }}

Available parameters

ParameterDefaultDescription
scan-typeallall | secrets | sca | iac | sast
code-path.Subdirectory to scan (relative to workspace)
api-urlGerion API Gateway URL
api-keyM2M API key
output-formatjson | markdown | sarif
output-fileOutput file (relative to workspace)
log-levelinfodebug | info | warning | error
timeout180Timeout per scanner in seconds

Outputs

OutputDescription
findings-fileAbsolute path to the output file (if output-file was set)
exit-codeCLI exit code (0 = success, 1 = execution error)

Notes

  • 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.