Skip to content
ES EN

Uploading Findings

The findings endpoint is the entry point for all scanner-generated findings. The CLI uses it automatically when running gerion scan ... --push.

Prerequisite

Obtain a JWT first using the M2M authentication endpoint.

Endpoint

POST https://api.gerion.dev/api/v1/findings
Authorization: Bearer <jwt>
Content-Type: application/json

The JWT must have been generated with an API Key that has the write:findings permission.

Body

{
"metadata": {
"repository_name": "my-org/my-repo",
"branch_name": "main",
"scan_type": "SECRETS",
"build_id": "build-2026-001",
"code_path": "/src",
"commit_hash": "abc123def456",
"commit_author": "dev@example.com"
},
"findings": [
{
"finding_id": "secret-001",
"title": "Exposed AWS Access Key",
"severity": "CRITICAL",
"scan_type": "SECRETS",
"repository_name": "my-org/my-repo",
"branch_name": "main",
"build_id": "build-2026-001",
"code_path": "/src",
"active": true,
"mitigated": false,
"false_positive": false,
"creation_date": "2026-03-19T10:00:00Z",
"last_update_date": "2026-03-19T10:00:00Z",
"file_path": "config/deploy.sh",
"line_number": 42
}
]
}

metadata fields

FieldTypeRequiredDescription
repository_namestringRepository name (org/repo).
branch_namestringScanned branch.
build_idstringBuild/pipeline identifier.
code_pathstringRoot path of the scanned code.
scan_typestringSAST, SCA, SECRETS, IAC. Inferred from findings if omitted.
commit_hashstringHash of the scanned commit.
commit_authorstringCommit author.

Finding fields

FieldTypeRequiredDescription
finding_idstringUnique finding ID (generated by the scanner). Used for deduplication.
titlestringDescriptive title.
severitystringCRITICAL, HIGH, MEDIUM, LOW. Normalized to uppercase.
scan_typestringSAST, SCA, SECRETS, IAC.
repository_namestringMust match metadata.repository_name.
branch_namestringFinding branch.
build_idstringBuild in which it was detected.
code_pathstringProject root path.
activebooltrue if the finding is still present.
mitigatedbooltrue if mitigated in this scan.
false_positivebooltrue if marked as false positive.
creation_datestringISO 8601.
last_update_datestringISO 8601.
file_pathstringPath of the affected file.
line_numberintFinding line number.
cvestringRelated CVE (e.g. CVE-2021-44228).
cwestring[]List of related CWEs.
descriptionstringDetailed description.
component_namestringAffected component (SCA/IAC).
component_versionstringComponent version.
component_fixstringVersion that fixes the issue.

Success response (201)

{
"success": true,
"message": "Findings processed successfully",
"result": {
"created": 3,
"updated": 1,
"mitigated": 0,
"duplicates": 2
}
}

Deduplication

The server deduplicates by (finding_id, organization_id, repository_name, branch_name, scan_type). If a finding already exists, it is updated rather than created. Findings present in previous runs but absent from the current payload are automatically marked as mitigated.

Common errors

CodeCause
401Missing, expired, or invalid JWT.
403JWT does not have the write:findings permission.
422Invalid or missing body fields.
429Rate limit exceeded (30 req/s, burst 10).