For the complete documentation index, see llms.txt. This page is also available as Markdown.

Fp Triage

Agent ingest endpoints for the FP Triage agent's pre- and post-plugins

ListOccurrencesInScope FpTriage

get
/api/v2/fp-triage/occurrences-in-scope

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.

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
accountIdstringRequired

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
orgIdstring · max: 128Required

Harness Organization ID

Example: example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectIdstring · max: 128Required

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
scanIdstringOptional

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.

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
targetIdstringOptional

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.

Example: xyz987zyx654wvu321tsr9Pattern: ^[a-zA-Z0-9_-]{22}$
includeAlreadyTriagedbooleanOptional

When false, skip occurrences that already have an fp_triage_agent verdict. Honoured with or without scanId.

Default: trueExample: false
limitinteger · int64 · min: 1 · max: 10000Optional

Maximum number of occurrences to return

Default: 1000Example: 1000
excludeRepoPatternsstring[]Optional

Glob 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".

Example: ["*-test","dev-*","sandbox/*"]
excludeArtifactPatternsstring[]Optional

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

Example: ["org/frontend-app","*-SNAPSHOT"]
baselineOnlybooleanOptional

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.

Default: trueExample: false
includeExemptedbooleanOptional

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

Default: falseExample: true
afterOccurrenceInternalIdinteger · int64Optional

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

Example: 67890
issueDetailsOncePerPagebooleanOptional

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

Default: falseExample: true
Responses
200

OK response.

application/json
hasMorebooleanRequired

True when more rows exist beyond this page. Server always sets this by fetching limit+1 and trimming.

Example: true
nextCursorinteger · int64Optional

occurrenceInternalId of the last returned row. Only set when hasMore is true; pass as afterOccurrenceInternalId on the next request.

Example: 67890
get/api/v2/fp-triage/occurrences-in-scope
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"
    }
  ]
}

BatchUpsertVerdicts FpTriage

post
/api/v2/fp-triage/verdicts/batch

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.

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
accountIdstringRequired

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
orgIdstring · max: 128Required

Harness Organization ID

Example: example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$
projectIdstring · max: 128Required

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
Body
Responses
200

OK response.

application/json
writteninteger · int64Required

Number of verdict rows written (inserted or updated).

Example: 42
post/api/v2/fp-triage/verdicts/batch
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
}

GetScanContext FpTriage

get
/api/v2/scan-context

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.

Required scopes
This endpoint requires the following scopes:
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Query parameters
accountIdstringRequired

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
scanIdstringOptional

Optional STO scan id. When set, this scan is used and targetName, targetVariant, scanner, and pipelineExecutionId are ignored.

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
orgIdstring · max: 256Optional

Harness organization id. Required with targetName.

Example: default
projectIdstring · max: 256Optional

Harness project id. Required with targetName.

Example: testrem
targetNamestring · max: 1024Optional

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

Example: nodegoat_12345
targetVariantstring · max: 256Optional

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

Example: master
scannerstring · max: 128Optional

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

Example: semgrep
pipelineExecutionIdstringOptional

Optional 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).

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
Responses
200

OK response.

application/json
accountIdstringRequired

Harness account id from the scan (or target) row

Example: BdsgiWzwT7CQFeJl9XkQ3A
orgIdstringRequired

Harness organization id from hierarchy_lookup

Example: default
parentUniqueIdstringOptional

hierarchy_lookup / scan parent_unique_id

Example: puid111111111111111111
productNamestringOptional

Scanner product name of the resolved scan

Example: semgrep
projectIdstringRequired

Harness project id from hierarchy_lookup

Example: benchmarkremagent
scanIdstringRequired

Resolved STO scan id

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
targetIdstringRequired

STO target id of the resolved scan

Example: xyz987zyx654wvu321tsr9Pattern: ^[a-zA-Z0-9_-]{22}$
targetNamestringOptional

Human-readable target name

Example: ethers7/VulnerableApp
targetVariantIdstringOptional

STO target variant id of the resolved scan

Example: tv987zyx654wvu321tsr99Pattern: ^[a-zA-Z0-9_-]{22}$
targetVariantNamestringOptional

Variant name from target_variant.parameters->>'variant'

Example: master
get/api/v2/scan-context
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?