Fp Triage
Agent ingest endpoints for the FP Triage agent's pre- and post-plugins
List the (issue, occurrence) tuples the FP Triage agent's pre-plugin needs to build LLM prompts. Without scanId, returns the baseline-only working set for the whole project. With scanId, narrows to the one scan's occurrences.
Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Optional STO scan id. When set, the working set is narrowed to occurrences produced by that one scan (scan-completion trigger path). Omit on the cron / project-level trigger path. ssca-manager passes the scanId it received from the stoScanInfo Redis Streams event.
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Optional STO target id. Used in conjunction with scanId on the scan-completion trigger path as a defensive predicate against scan.target. Ignored when scanId is empty. ssca-manager passes the targetId it received from the stoScanInfo Redis Streams event.
xyz987zyx654wvu321tsr9Pattern: ^[a-zA-Z0-9_-]{22}$When false, skip occurrences that already have an fp_triage_agent verdict. Honoured with or without scanId.
trueExample: falseMaximum number of occurrences to return
1000Example: 1000Glob patterns matching target.name on repository targets (target.type='repository'). Any occurrence whose target name matches ANY pattern is excluded. Glob syntax: '*' = any run of chars, '?' = single char. The handler converts each glob to a Postgres LIKE pattern server-side. Empty / absent means "exclude no repositories".
["*-test","dev-*","sandbox/*"]Glob patterns matching target.name on artifact targets (target.type IN ('container','instance')). Same semantics as excludeRepoPatterns but applied to the artifact target buckets. Empty / absent means "exclude no artifacts".
["org/frontend-app","*-SNAPSHOT"]When true (default), the scanId path only returns occurrences from the latest baseline scan for that target (existing FP-triage behaviour). When false AND scanId is set, both baseline restrictions are removed so any user-chosen scan can be read. Ignored on the project path (empty scanId), which always iterates latest baseline scans.
trueExample: falseWhen false (default), occurrences covered by an Approved exemption are dropped. When true, those rows are returned with exempted=true instead of being filtered out. Applies on both scan and project paths.
falseExample: trueKeyset pagination cursor. When set, only rows with occurrenceInternalId strictly greater than this value are returned. Both paths already ORDER BY occurrenceInternalId ascending. Omit (or pass with hasMore/nextCursor from a prior page) to start from the beginning.
67890When false (default), every row carries its issueDetails blob. When true, issueDetails is populated only on the first row (lowest occurrenceInternalId) of each issue within the returned page; subsequent rows of the same issue get null. Reduces payload size for large SCA scans where many occurrences share one issue.
falseExample: trueOK response.
True when more rows exist beyond this page. Server always sets this by fetching limit+1 and trimming.
trueoccurrenceInternalId of the last returned row. Only set when hasMore is true; pass as afterOccurrenceInternalId on the next request.
67890BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/fp-triage/occurrences-in-scope?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"hasMore": true,
"nextCursor": 67890,
"results": [
{
"cisaKevProduct": "Log4j",
"cisaKevVendor": "Apache",
"epss": 0.97,
"epssPercentile": 0.99,
"exempted": true,
"inCisaKev": true,
"issueCves": [
"CVE-2021-44228"
],
"issueDetails": "Sint rem reiciendis molestiae.",
"issueId": "abcdef1234567890ghijkl",
"issueInternalId": 12345,
"issueKey": "CWE-89",
"issueSeverityCode": "High",
"issueTitle": "SQL Injection vulnerability",
"issueType": "SAST",
"occurrenceCves": [
"CVE-2021-44228"
],
"occurrenceDetails": "Quia error error.",
"occurrenceInternalId": 67890,
"productName": "semgrep",
"scanId": "abcdef1234567890ghijkl",
"severityCode": "High",
"targetId": "xyz987zyx654wvu321tsr9",
"targetName": "payment-service",
"targetVariantId": "tv987zyx654wvu321tsr99"
},
{
"cisaKevProduct": "Log4j",
"cisaKevVendor": "Apache",
"epss": 0.97,
"epssPercentile": 0.99,
"exempted": true,
"inCisaKev": true,
"issueCves": [
"CVE-2021-44228"
],
"issueDetails": "Sint rem reiciendis molestiae.",
"issueId": "abcdef1234567890ghijkl",
"issueInternalId": 12345,
"issueKey": "CWE-89",
"issueSeverityCode": "High",
"issueTitle": "SQL Injection vulnerability",
"issueType": "SAST",
"occurrenceCves": [
"CVE-2021-44228"
],
"occurrenceDetails": "Quia error error.",
"occurrenceInternalId": 67890,
"productName": "semgrep",
"scanId": "abcdef1234567890ghijkl",
"severityCode": "High",
"targetId": "xyz987zyx654wvu321tsr9",
"targetName": "payment-service",
"targetVariantId": "tv987zyx654wvu321tsr99"
},
{
"cisaKevProduct": "Log4j",
"cisaKevVendor": "Apache",
"epss": 0.97,
"epssPercentile": 0.99,
"exempted": true,
"inCisaKev": true,
"issueCves": [
"CVE-2021-44228"
],
"issueDetails": "Sint rem reiciendis molestiae.",
"issueId": "abcdef1234567890ghijkl",
"issueInternalId": 12345,
"issueKey": "CWE-89",
"issueSeverityCode": "High",
"issueTitle": "SQL Injection vulnerability",
"issueType": "SAST",
"occurrenceCves": [
"CVE-2021-44228"
],
"occurrenceDetails": "Quia error error.",
"occurrenceInternalId": 67890,
"productName": "semgrep",
"scanId": "abcdef1234567890ghijkl",
"severityCode": "High",
"targetId": "xyz987zyx654wvu321tsr9",
"targetName": "payment-service",
"targetVariantId": "tv987zyx654wvu321tsr99"
},
{
"cisaKevProduct": "Log4j",
"cisaKevVendor": "Apache",
"epss": 0.97,
"epssPercentile": 0.99,
"exempted": true,
"inCisaKev": true,
"issueCves": [
"CVE-2021-44228"
],
"issueDetails": "Sint rem reiciendis molestiae.",
"issueId": "abcdef1234567890ghijkl",
"issueInternalId": 12345,
"issueKey": "CWE-89",
"issueSeverityCode": "High",
"issueTitle": "SQL Injection vulnerability",
"issueType": "SAST",
"occurrenceCves": [
"CVE-2021-44228"
],
"occurrenceDetails": "Quia error error.",
"occurrenceInternalId": 67890,
"productName": "semgrep",
"scanId": "abcdef1234567890ghijkl",
"severityCode": "High",
"targetId": "xyz987zyx654wvu321tsr9",
"targetName": "payment-service",
"targetVariantId": "tv987zyx654wvu321tsr99"
}
]
}Atomically upsert a batch of per-occurrence FP triage verdicts produced by one agent run. The store-level transaction rolls back the whole batch on any single failure so the aggregated rollup stays consistent.
Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$OK response.
Number of verdict rows written (inserted or updated).
42BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
POST /gateway/sto/api/v2/fp-triage/verdicts/batch?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 409
{
"verdicts": [
{
"confidence": 0.87,
"issueId": "abcdef1234567890ghijkl",
"modelName": "anthropic.claude-3-5-sonnet-20241022",
"occurrenceInternalId": 67890,
"promptVersion": "v1.3.0",
"reasoning": "The argument to path.join is __dirname, a constant, not user input.",
"targetId": "xyz987zyx654wvu321tsr9",
"verdict": "FALSE_POSITIVE",
"workflowExecutionId": "wf-exec-2026-05-21-payment-service-247",
"workflowType": "FP_TRIAGE"
}
]
}{
"written": 42
}Resolve the STO scan an agent pre-plugin should use. With scanId, returns that scan's org, project, target, and variant. With targetName (and optional targetVariant / scanner), returns the latest succeeded scan on the resolved variant in orgId/projectId. targetVariant omitted uses the target baseline variant. scanner omitted returns the latest succeeded scan across products. A scanner value keeps only that product. With neither scanId nor targetName, pipelineExecutionId returns the latest succeeded scan on that pipeline execution. Served at /api/v2/scan-context.
Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Optional STO scan id. When set, this scan is used and targetName, targetVariant, scanner, and pipelineExecutionId are ignored.
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness organization id. Required with targetName.
defaultHarness project id. Required with targetName.
testremOptional STO target name, the same name a scan step uses. Combined with targetVariant (or the target baseline variant) to pick the latest succeeded scan in orgId/projectId. A name that matches more than one target type in that project is rejected.
nodegoat_12345Optional target variant id or variant name (target_variant.parameters->>'variant'). Ignored when scanId is set. When empty on the targetName path, the target baseline variant is used.
masterOptional scanner product id, name, or display name (e.g. semgrep, Semgrep). Ignored when scanId is set. When set, the latest succeeded scan is limited to the product whose id, name, or pretty_name matches case-insensitively.
semgrepOptional Harness pipeline execution id. Used only when scanId and targetName are both empty. Returns the latest succeeded scan recorded on that execution (scan.execution_id).
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$OK response.
Harness account id from the scan (or target) row
BdsgiWzwT7CQFeJl9XkQ3AHarness organization id from hierarchy_lookup
defaulthierarchy_lookup / scan parent_unique_id
puid111111111111111111Scanner product name of the resolved scan
semgrepHarness project id from hierarchy_lookup
benchmarkremagentResolved STO scan id
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$STO target id of the resolved scan
xyz987zyx654wvu321tsr9Pattern: ^[a-zA-Z0-9_-]{22}$Human-readable target name
ethers7/VulnerableAppSTO target variant id of the resolved scan
tv987zyx654wvu321tsr99Pattern: ^[a-zA-Z0-9_-]{22}$Variant name from target_variant.parameters->>'variant'
masterBadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/scan-context?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"accountId": "BdsgiWzwT7CQFeJl9XkQ3A",
"gitMetadata": {
"commit": "0000000000000000000000000000000000000001",
"detectedName": "Ratione sunt eveniet perferendis.",
"detectedVariant": "Provident consectetur optio ullam occaecati odio veritatis.",
"droneCorrelated": false,
"provider": "Nostrum saepe.",
"pullRequestNumber": 11,
"repositoryHttp": "https://github.com/harness/drone-cli.git",
"repositoryPath": [
"Iste debitis delectus vel voluptate quia.",
"Ut necessitatibus.",
"Natus harum quos ipsum neque porro est.",
"Dolores et et suscipit qui."
],
"repositorySsh": "git@github.com:harness/drone-cli.git",
"sourceBranch": "feat/shiny-object",
"targetBranch": "develop",
"workspace": "/harness"
},
"orgId": "default",
"parentUniqueId": "puid111111111111111111",
"productName": "semgrep",
"projectId": "benchmarkremagent",
"scanId": "abcdef1234567890ghijkl",
"targetId": "xyz987zyx654wvu321tsr9",
"targetName": "ethers7/VulnerableApp",
"targetVariantId": "tv987zyx654wvu321tsr99",
"targetVariantName": "master"
}Last updated
Was this helpful?