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

Scans

Access and modify Security Test Scans

get
/api/v2/scans

List a collection of Security Test Scans

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

Harness Account ID

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

Page number to fetch (starting from 0)

Default: 0Example: 4
pageSizeinteger · int64 · min: 1 · max: 100Optional

Number of results per page

Default: 30Example: 50
executionIdstringOptional

Harness Execution ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Aut culpa sed voluptas iure omnis sint.
Responses
200

OK response.

application/json
get/api/v2/scans
GET /gateway/sto/api/v2/scans?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "pagination": {
    "link": "",
    "page": 4,
    "pageSize": 20,
    "totalItems": 230,
    "totalPages": 12
  },
  "results": [
    {
      "codeCoverage": 65.5,
      "created": 1651578240,
      "executionId": "abcdef1234567890ghijkl",
      "gitMetadata": {
        "commit": "0000000000000000000000000000000000000001",
        "detectedName": "Necessitatibus dolore dicta assumenda.",
        "detectedVariant": "Temporibus quis architecto voluptate quae dolores.",
        "droneCorrelated": false,
        "provider": "Perspiciatis minima et.",
        "pullRequestNumber": 11,
        "repositoryHttp": "https://github.com/harness/drone-cli.git",
        "repositoryPath": [
          "Est molestiae sunt ea sed id.",
          "Eaque cum alias.",
          "Minima et iure quis.",
          "Fuga veniam ex nihil maiores."
        ],
        "repositorySsh": "git@github.com:harness/drone-cli.git",
        "sourceBranch": "feat/shiny-object",
        "targetBranch": "develop",
        "workspace": "/harness"
      },
      "id": "abcdef1234567890ghijkl",
      "lastModified": 1651578240,
      "metadata": {
        "baseImageDigest": "sha256:abcdef1234567890ghijkl",
        "baseImageName": "my-image",
        "baseImageTag": "1.0.0"
      },
      "orgId": "your_harness_org",
      "pipelineId": "your_harness_pipeline",
      "productId": "product111111111111111",
      "productName": "snyk",
      "productPrettyName": "Snyk",
      "projectId": "your_harness_project",
      "refinementVersion": "1.0.5",
      "scannerDiffKey": "sast",
      "stageId": "stage_id",
      "status": "Succeeded",
      "stepId": "step_id",
      "subproduct": "owasp",
      "targetVariantId": "variant111111111111111"
    },
    {
      "codeCoverage": 65.5,
      "created": 1651578240,
      "executionId": "abcdef1234567890ghijkl",
      "gitMetadata": {
        "commit": "0000000000000000000000000000000000000001",
        "detectedName": "Necessitatibus dolore dicta assumenda.",
        "detectedVariant": "Temporibus quis architecto voluptate quae dolores.",
        "droneCorrelated": false,
        "provider": "Perspiciatis minima et.",
        "pullRequestNumber": 11,
        "repositoryHttp": "https://github.com/harness/drone-cli.git",
        "repositoryPath": [
          "Est molestiae sunt ea sed id.",
          "Eaque cum alias.",
          "Minima et iure quis.",
          "Fuga veniam ex nihil maiores."
        ],
        "repositorySsh": "git@github.com:harness/drone-cli.git",
        "sourceBranch": "feat/shiny-object",
        "targetBranch": "develop",
        "workspace": "/harness"
      },
      "id": "abcdef1234567890ghijkl",
      "lastModified": 1651578240,
      "metadata": {
        "baseImageDigest": "sha256:abcdef1234567890ghijkl",
        "baseImageName": "my-image",
        "baseImageTag": "1.0.0"
      },
      "orgId": "your_harness_org",
      "pipelineId": "your_harness_pipeline",
      "productId": "product111111111111111",
      "productName": "snyk",
      "productPrettyName": "Snyk",
      "projectId": "your_harness_project",
      "refinementVersion": "1.0.5",
      "scannerDiffKey": "sast",
      "stageId": "stage_id",
      "status": "Succeeded",
      "stepId": "step_id",
      "subproduct": "owasp",
      "targetVariantId": "variant111111111111111"
    }
  ]
}
post
/api/v2/scans

Create a new Security Test Scan

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

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Consequatur possimus molestiae ducimus voluptate.
X-Harness-User-IdstringOptional

Harness User ID

Example: abcdef1234567890ghijkl
Body
codeCoveragenumber · floatOptional

The Code Coverage value for the Scan

Example: 65.5
executionIdstringRequired

Pipeline Execution ID associated with the Scan

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

Harness Organization ID

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

Harness Organization ID

Example: your_harness_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$
productIdstringRequired

The Scan Product used for the Scan

Example: product111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
productNamestringOptional

The machine name of the Scan Product (scanner), e.g. snyk. Optional; populated by endpoints that join the product table.

Example: snyk
productPrettyNamestringOptional

The human-readable display name of the Scan Product (scanner), e.g. Snyk. Optional; populated by endpoints that join the product table.

Example: Snyk
projectIdstring · max: 128Required

Harness Project ID

Example: your_harness_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
refinementVersionstringRequired

The Issue refinement version used for this Scan

Example: 1.0.5
scannerDiffKeystringOptional

Key used to differentiate scanner configurations for scan comparison (e.g. sast, sca, sast_sca)

Example: sast
stageIdstring · max: 128Required

Pipeline Stage ID associated with the Scan

Example: stage_idPattern: ^[A-Za-z_][A-Za-z0-9_]*$
statusstring · enumRequired

Current status of the Scan

Example: SucceededPossible values:
stepIdstring · max: 128Required

Pipeline Step ID associated with the Scan

Example: step_idPattern: ^[A-Za-z_][A-Za-z0-9_]*$
subproductstring · binaryOptional

The Scan Subproduct used for the Scan

Example: owasp
targetVariantIdstringRequired

The Target Variant associated with the Scan

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

OK response.

application/json
idstringRequired

Resource identifier

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
post/api/v2/scans
POST /gateway/sto/api/v2/scans?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 985

{
  "codeCoverage": 65.5,
  "executionId": "abcdef1234567890ghijkl",
  "gitMetadata": {
    "commit": "0000000000000000000000000000000000000001",
    "detectedName": "Recusandae rem autem optio est.",
    "detectedVariant": "Mollitia recusandae incidunt necessitatibus rerum odit.",
    "droneCorrelated": false,
    "provider": "Error deleniti sint rem doloribus.",
    "pullRequestNumber": 11,
    "repositoryHttp": "https://github.com/harness/drone-cli.git",
    "repositoryPath": [
      "Dolor sunt blanditiis.",
      "Quibusdam inventore voluptatem."
    ],
    "repositorySsh": "git@github.com:harness/drone-cli.git",
    "sourceBranch": "feat/shiny-object",
    "targetBranch": "develop",
    "workspace": "/harness"
  },
  "orgId": "your_harness_org",
  "pipelineId": "your_harness_pipeline",
  "productId": "product111111111111111",
  "productName": "snyk",
  "productPrettyName": "Snyk",
  "projectId": "your_harness_project",
  "refinementVersion": "1.0.5",
  "scannerDiffKey": "sast",
  "stageId": "stage_id",
  "status": "Succeeded",
  "stepId": "step_id",
  "subproduct": "owasp",
  "targetVariantId": "variant111111111111111"
}
{
  "id": "abcdef1234567890ghijkl"
}
get
/api/v2/scans/{id}

Find Security Test Scan by ID

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

The ID of the Security Test Scan to retrieve

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

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: A quae aliquam itaque corrupti illum.
Responses
200

OK response.

application/json

Information about a Security Test Scan

codeCoveragenumber · floatOptional

The Code Coverage value for the Scan

Example: 65.5
createdinteger · int64Required

Unix timestamp at which the resource was created

Example: 1651578240
executionIdstringRequired

Pipeline Execution ID associated with the Scan

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

Resource identifier

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

Unix timestamp at which the resource was most recently modified

Example: 1651578240
orgIdstring · max: 128Required

Harness Organization ID

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

Harness Organization ID

Example: your_harness_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$
productIdstringRequired

The Scan Product used for the Scan

Example: product111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
productNamestringOptional

The machine name of the Scan Product (scanner), e.g. snyk. Optional; populated by endpoints that join the product table.

Example: snyk
productPrettyNamestringOptional

The human-readable display name of the Scan Product (scanner), e.g. Snyk. Optional; populated by endpoints that join the product table.

Example: Snyk
projectIdstring · max: 128Required

Harness Project ID

Example: your_harness_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
refinementVersionstringRequired

The Issue refinement version used for this Scan

Example: 1.0.5
scannerDiffKeystringOptional

Key used to differentiate scanner configurations for scan comparison (e.g. sast, sca, sast_sca)

Example: sast
stageIdstring · max: 128Required

Pipeline Stage ID associated with the Scan

Example: stage_idPattern: ^[A-Za-z_][A-Za-z0-9_]*$
statusstring · enumRequired

Current status of the Scan

Example: SucceededPossible values:
stepIdstring · max: 128Required

Pipeline Step ID associated with the Scan

Example: step_idPattern: ^[A-Za-z_][A-Za-z0-9_]*$
subproductstring · binaryOptional

The Scan Subproduct used for the Scan

Example: owasp
targetVariantIdstringRequired

The Target Variant associated with the Scan

Example: variant111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
get/api/v2/scans/{id}
GET /gateway/sto/api/v2/scans/{id}?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "codeCoverage": 65.5,
  "created": 1651578240,
  "executionId": "abcdef1234567890ghijkl",
  "gitMetadata": {
    "commit": "0000000000000000000000000000000000000001",
    "detectedName": "Necessitatibus dolore dicta assumenda.",
    "detectedVariant": "Temporibus quis architecto voluptate quae dolores.",
    "droneCorrelated": false,
    "provider": "Perspiciatis minima et.",
    "pullRequestNumber": 11,
    "repositoryHttp": "https://github.com/harness/drone-cli.git",
    "repositoryPath": [
      "Est molestiae sunt ea sed id.",
      "Eaque cum alias.",
      "Minima et iure quis.",
      "Fuga veniam ex nihil maiores."
    ],
    "repositorySsh": "git@github.com:harness/drone-cli.git",
    "sourceBranch": "feat/shiny-object",
    "targetBranch": "develop",
    "workspace": "/harness"
  },
  "id": "abcdef1234567890ghijkl",
  "lastModified": 1651578240,
  "metadata": {
    "baseImageDigest": "sha256:abcdef1234567890ghijkl",
    "baseImageName": "my-image",
    "baseImageTag": "1.0.0"
  },
  "orgId": "your_harness_org",
  "pipelineId": "your_harness_pipeline",
  "productId": "product111111111111111",
  "productName": "snyk",
  "productPrettyName": "Snyk",
  "projectId": "your_harness_project",
  "refinementVersion": "1.0.5",
  "scannerDiffKey": "sast",
  "stageId": "stage_id",
  "status": "Succeeded",
  "stepId": "step_id",
  "subproduct": "owasp",
  "targetVariantId": "variant111111111111111"
}
put
/api/v2/scans/{id}

Update an existing Security Test Scan

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

The ID of the Security Test Scan to update

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

Harness Account ID

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Voluptatem tempora animi sunt beatae.
Body
artifactFingerprintstring · max: 64Optional

The Artifact Fingerprint used use to identify the target

Example: abcdef1234567890ghijklPattern: ^[A-Za-z0-9_]*$
codeCoveragenumber · floatOptional

The Code Coverage value for the Scan

Example: 65.5
executionIdstringRequired

Pipeline Execution ID associated with the Scan

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

Harness Organization ID

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

Harness Organization ID

Example: your_harness_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$
productIdstringRequired

The Scan Product used for the Scan

Example: product111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
productNamestringOptional

The machine name of the Scan Product (scanner), e.g. snyk. Optional; populated by endpoints that join the product table.

Example: snyk
productPrettyNamestringOptional

The human-readable display name of the Scan Product (scanner), e.g. Snyk. Optional; populated by endpoints that join the product table.

Example: Snyk
projectIdstring · max: 128Required

Harness Project ID

Example: your_harness_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
refinementVersionstringRequired

The Issue refinement version used for this Scan

Example: 1.0.5
scannerDiffKeystringOptional

Key used to differentiate scanner configurations for scan comparison (e.g. sast, sca, sast_sca)

Example: sast
stageIdstring · max: 128Required

Pipeline Stage ID associated with the Scan

Example: stage_idPattern: ^[A-Za-z_][A-Za-z0-9_]*$
statusstring · enumRequired

Current status of the Scan

Example: SucceededPossible values:
stepIdstring · max: 128Required

Pipeline Step ID associated with the Scan

Example: step_idPattern: ^[A-Za-z_][A-Za-z0-9_]*$
subproductstring · binaryOptional

The Scan Subproduct used for the Scan

Example: owasp
targetVariantIdstringRequired

The Target Variant associated with the Scan

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

OK response.

application/json

Information about a Security Test Scan

codeCoveragenumber · floatOptional

The Code Coverage value for the Scan

Example: 65.5
createdinteger · int64Required

Unix timestamp at which the resource was created

Example: 1651578240
executionIdstringRequired

Pipeline Execution ID associated with the Scan

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

Resource identifier

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

Unix timestamp at which the resource was most recently modified

Example: 1651578240
orgIdstring · max: 128Required

Harness Organization ID

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

Harness Organization ID

Example: your_harness_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$
productIdstringRequired

The Scan Product used for the Scan

Example: product111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
productNamestringOptional

The machine name of the Scan Product (scanner), e.g. snyk. Optional; populated by endpoints that join the product table.

Example: snyk
productPrettyNamestringOptional

The human-readable display name of the Scan Product (scanner), e.g. Snyk. Optional; populated by endpoints that join the product table.

Example: Snyk
projectIdstring · max: 128Required

Harness Project ID

Example: your_harness_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
refinementVersionstringRequired

The Issue refinement version used for this Scan

Example: 1.0.5
scannerDiffKeystringOptional

Key used to differentiate scanner configurations for scan comparison (e.g. sast, sca, sast_sca)

Example: sast
stageIdstring · max: 128Required

Pipeline Stage ID associated with the Scan

Example: stage_idPattern: ^[A-Za-z_][A-Za-z0-9_]*$
statusstring · enumRequired

Current status of the Scan

Example: SucceededPossible values:
stepIdstring · max: 128Required

Pipeline Step ID associated with the Scan

Example: step_idPattern: ^[A-Za-z_][A-Za-z0-9_]*$
subproductstring · binaryOptional

The Scan Subproduct used for the Scan

Example: owasp
targetVariantIdstringRequired

The Target Variant associated with the Scan

Example: variant111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$
put/api/v2/scans/{id}
PUT /gateway/sto/api/v2/scans/{id}?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 1145

{
  "artifactFingerprint": "abcdef1234567890ghijkl",
  "codeCoverage": 65.5,
  "executionId": "abcdef1234567890ghijkl",
  "gitMetadata": {
    "commit": "0000000000000000000000000000000000000001",
    "detectedName": "Recusandae rem autem optio est.",
    "detectedVariant": "Mollitia recusandae incidunt necessitatibus rerum odit.",
    "droneCorrelated": false,
    "provider": "Error deleniti sint rem doloribus.",
    "pullRequestNumber": 11,
    "repositoryHttp": "https://github.com/harness/drone-cli.git",
    "repositoryPath": [
      "Dolor sunt blanditiis.",
      "Quibusdam inventore voluptatem."
    ],
    "repositorySsh": "git@github.com:harness/drone-cli.git",
    "sourceBranch": "feat/shiny-object",
    "targetBranch": "develop",
    "workspace": "/harness"
  },
  "metadata": {
    "baseImageDigest": "sha256:abcdef1234567890ghijkl",
    "baseImageName": "my-image",
    "baseImageTag": "1.0.0"
  },
  "orgId": "your_harness_org",
  "pipelineId": "your_harness_pipeline",
  "productId": "product111111111111111",
  "productName": "snyk",
  "productPrettyName": "Snyk",
  "projectId": "your_harness_project",
  "refinementVersion": "1.0.5",
  "scannerDiffKey": "sast",
  "stageId": "stage_id",
  "status": "Succeeded",
  "stepId": "step_id",
  "subproduct": "owasp",
  "targetVariantId": "variant111111111111111"
}
{
  "codeCoverage": 65.5,
  "created": 1651578240,
  "executionId": "abcdef1234567890ghijkl",
  "gitMetadata": {
    "commit": "0000000000000000000000000000000000000001",
    "detectedName": "Necessitatibus dolore dicta assumenda.",
    "detectedVariant": "Temporibus quis architecto voluptate quae dolores.",
    "droneCorrelated": false,
    "provider": "Perspiciatis minima et.",
    "pullRequestNumber": 11,
    "repositoryHttp": "https://github.com/harness/drone-cli.git",
    "repositoryPath": [
      "Est molestiae sunt ea sed id.",
      "Eaque cum alias.",
      "Minima et iure quis.",
      "Fuga veniam ex nihil maiores."
    ],
    "repositorySsh": "git@github.com:harness/drone-cli.git",
    "sourceBranch": "feat/shiny-object",
    "targetBranch": "develop",
    "workspace": "/harness"
  },
  "id": "abcdef1234567890ghijkl",
  "lastModified": 1651578240,
  "metadata": {
    "baseImageDigest": "sha256:abcdef1234567890ghijkl",
    "baseImageName": "my-image",
    "baseImageTag": "1.0.0"
  },
  "orgId": "your_harness_org",
  "pipelineId": "your_harness_pipeline",
  "productId": "product111111111111111",
  "productName": "snyk",
  "productPrettyName": "Snyk",
  "projectId": "your_harness_project",
  "refinementVersion": "1.0.5",
  "scannerDiffKey": "sast",
  "stageId": "stage_id",
  "status": "Succeeded",
  "stepId": "step_id",
  "subproduct": "owasp",
  "targetVariantId": "variant111111111111111"
}
get
/api/v2/scans/{id}/issue/{issueId}

Returns a scan specific issue

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

The ID of the Security Test Scan

Example: Autem non occaecati vel eos.
issueIdstringRequired

The ID of the Security Test Issue

Example: Omnis dignissimos error vel quia dolor ut.
Query parameters
accountIdstringRequired

Harness Account ID

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

Harness Organization ID

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

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
pageinteger · int64Optional

Page number to fetch (starting from 0)

Default: 0Example: 4
pageSizeinteger · int64 · min: 1 · max: 100Optional

Number of results per page

Default: 30Example: 50
sortstringOptional

The field to sort by

Example: Ea autem veritatis corporis.
orderstring · enumOptional

The order to sort by

Example: DESCPossible values:
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Odio quos quidem sit incidunt est eius.
Responses
200

OK response.

application/json
aiTriagedstring · enumOptional

Aggregate AI triage verdict. 'LikelyFP' if every occurrence is FALSE_POSITIVE; 'LikelyTP' if any is TRUE_POSITIVE; 'NotEvaluatedYet' if only some are triaged. Field is absent when no occurrence has been triaged yet.

Example: LikelyFPPossible values:
aiTriagedReasoningstringOptional

Representative LLM reasoning quoted from one of the per-occurrence triaged verdicts (FP-verdict reasoning preferred). Field is absent when no occurrence has been triaged yet.

Example: The argument to path.join is __dirname, a constant, not user input.
baseImageNamestringOptional

base image name of the issue

Example: baseImageName
baseImageOrgIdstringOptional

org id of the issue from where the base image is being referred

Example: default
baseImageProjectIdstringOptional

project id of the issue from where the base image is being referred

Example: STO
baselineVariantIdstringOptional

The Baseline Target Variant related to this Security Issue

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

Unix timestamp at which the resource was created

Example: 1651578240
currentStatusstring · enumOptional

Current status of the Exemption

Example: ApprovedPossible values:
epssLastModifiedstringOptional

Last date the issue EPSS data was last modified

Example: 2025-05-01
epssPercentilenumber · doubleOptional

EPSS percentile of the issue CVE identifier

Example: 0.15
epssScorenumber · doubleOptional

EPSS score of the issue CVE identifier

Example: 0.035
exemptionCoveragestringOptional

Indicates if the Security Issue was found to be Exempted or PartiallyExempted.

Example: PartiallyExempted
exemptionIdstringOptional

ID of Security Test Exemption

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

Exemption's status at the Security Scan created time

Example: RejectedPossible values:
exploitabilitystringOptional

Exploitability status of the issue (yes or no)

Example: yes
fallbackSeverityCodestring · enumOptional

Issue-table severity code used as occurrence fallback at read time; omitted from API responses

Example: HighPossible values:
gracePeriodDaysinteger · int64Optional

Issue-level grace period rollup in days. Only populated when scan honorGracePeriod is enabled.

Example: 13
hasRulesbooleanRequired

Whether the account has at least one exemption rule. When false, clients can skip exemption rule evaluation (no rule-eval loaders).

Example: true
idstringRequired

Resource identifier

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

True when the displayed severity is grace-sheltered: at the display-max severity band, all non-exempt occurrences are in grace. Only populated when scan honorGracePeriod is enabled.

Example: true
keystring · max: 512Required

Compression/deduplication key

Example: json-schema@0.2.3
lastBaseImageScanAtinteger · int64Optional

last scan timestamp of the base image being referred

Example: 1651578240
numNonExemptedOccurrencesinteger · int32Required

Indicates the number of Occurrences which dont have an active exemption on the Occurrence

Default: 0Example: 10
numOccurrencesinteger · int32Required

Indicates the number of Occurrences on the Issue

Example: 10
occurrenceIdinteger · int64 · min: 1OptionalExample: 12345
originStatusstringOptional

The status of the origin, either 'approved' or 'unapproved'

Example: approved
originsstring[]Optional

The origins of the issue

Example: ["app","base"]
pipelineIdstring · max: 128Optional

Harness Pipeline ID

Example: example_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$
primaryOccurrenceIdinteger · int64Required

The primary occurrence's ID

Example: 12345
productIdstringRequired

The scan tool that identified this Security Issue

Example: product1234567890abcdePattern: ^[a-zA-Z0-9_-]{22}$
reachabilitystringOptional

Reachability status of the issue (reachable or unreachable)

Example: reachable
severitynumber · floatRequired

Numeric severity, from 0 (lowest) to 10 (highest)

Example: 8.5
severityCodestring · enumRequired

Severity code

Example: HighPossible values:
statusstring · enumOptional

Indicates if the Security Issue was found to be remediated, ignored, etc.

Example: RemediatedPossible values:
subproductstringOptional

The subproduct that identified this Security Issue

Example: product
targetIdstringOptional

The Target that this Security Issue affects

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

The Name of the Target that this Security Issue affects

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

The type of the Target that this Security Issue affects

Example: repositoryPossible values:
targetVariantIdstringOptional

The Target Variant that this Security Issue affects

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

Name of the associated Target and Variant

Example: nodegoat:masterPattern: ^[a-zA-Z0-9_-]{22}$
titlestring · max: 128Required

Title of the Security Issue

Example: Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash
typestring · enumOptional

The type of vulnerability or quality issue for this Issue

Example: SASTPossible values:
get/api/v2/scans/{id}/issue/{issueId}
GET /gateway/sto/api/v2/scans/{id}/issue/{issueId}?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "aiTriaged": "LikelyFP",
  "aiTriagedReasoning": "The argument to path.join is __dirname, a constant, not user input.",
  "baseImageName": "baseImageName",
  "baseImageOrgId": "default",
  "baseImageProjectId": "STO",
  "baselineVariantId": "abcdef1234567890ghijkl",
  "created": 1651578240,
  "currentStatus": "Approved",
  "details": {
    "package": "json-schema",
    "version": "v0.2.3"
  },
  "epssLastModified": "2025-05-01",
  "epssPercentile": 0.15,
  "epssScore": 0.035,
  "exemptionCoverage": "PartiallyExempted",
  "exemptionId": "abcdef1234567890ghijkl",
  "exemptionStatusAtScan": "Approved",
  "exploitability": "yes",
  "fallbackSeverityCode": "High",
  "gitMetadata": {
    "commit": "0000000000000000000000000000000000000001",
    "detectedName": "Necessitatibus dolore dicta assumenda.",
    "detectedVariant": "Temporibus quis architecto voluptate quae dolores.",
    "droneCorrelated": false,
    "provider": "Perspiciatis minima et.",
    "pullRequestNumber": 11,
    "repositoryHttp": "https://github.com/harness/drone-cli.git",
    "repositoryPath": [
      "Est molestiae sunt ea sed id.",
      "Eaque cum alias.",
      "Minima et iure quis.",
      "Fuga veniam ex nihil maiores."
    ],
    "repositorySsh": "git@github.com:harness/drone-cli.git",
    "sourceBranch": "feat/shiny-object",
    "targetBranch": "develop",
    "workspace": "/harness"
  },
  "gracePeriodDays": 13,
  "harnessAugmentation": {
    "Magni sapiente consequatur.": "Cum et esse voluptas alias officia.",
    "Ut recusandae numquam est.": "Vel aut omnis fugit aut."
  },
  "hasRules": true,
  "id": "abcdef1234567890ghijkl",
  "inGrace": true,
  "key": "json-schema@0.2.3",
  "lastBaseImageScanAt": 1651578240,
  "numNonExemptedOccurrences": 10,
  "numOccurrences": 10,
  "occurrenceId": 12345,
  "occurrences": [
    {
      "line": "42"
    },
    {
      "line": "666"
    }
  ],
  "occurrencesPagination": {
    "link": "",
    "page": 4,
    "pageSize": 20,
    "totalItems": 230,
    "totalPages": 12
  },
  "originStatus": "approved",
  "origins": [
    "app",
    "base"
  ],
  "overrides": [
    {
      "created": 1651578240,
      "fieldName": "severityCode",
      "impactedTargetId": "target1111111111111111",
      "originalFieldValue": "Low",
      "overrideFieldValue": "Low",
      "overrideId": "override1234",
      "reason": "Waiting on upstream bug fix",
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname"
    },
    {
      "created": 1651578240,
      "fieldName": "severityCode",
      "impactedTargetId": "target1111111111111111",
      "originalFieldValue": "Low",
      "overrideFieldValue": "Low",
      "overrideId": "override1234",
      "reason": "Waiting on upstream bug fix",
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname"
    }
  ],
  "overridesAtScan": [
    {
      "created": 1651578240,
      "fieldName": "severityCode",
      "impactedTargetId": "target1111111111111111",
      "originalFieldValue": "Low",
      "overrideFieldValue": "Low",
      "overrideId": "override1234",
      "reason": "Waiting on upstream bug fix",
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname"
    },
    {
      "created": 1651578240,
      "fieldName": "severityCode",
      "impactedTargetId": "target1111111111111111",
      "originalFieldValue": "Low",
      "overrideFieldValue": "Low",
      "overrideId": "override1234",
      "reason": "Waiting on upstream bug fix",
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname"
    },
    {
      "created": 1651578240,
      "fieldName": "severityCode",
      "impactedTargetId": "target1111111111111111",
      "originalFieldValue": "Low",
      "overrideFieldValue": "Low",
      "overrideId": "override1234",
      "reason": "Waiting on upstream bug fix",
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname"
    }
  ],
  "pipelineId": "example_pipeline",
  "primaryOccurrenceId": 12345,
  "productId": "product1234567890abcde",
  "reachability": "reachable",
  "recentActivities": [
    {
      "actorName": "Priya Nair",
      "created": 1781391060,
      "id": "hist111111111111111111",
      "isAutoExpiry": false,
      "status": "Expired"
    },
    {
      "actorName": "Priya Nair",
      "created": 1781391060,
      "id": "hist111111111111111111",
      "isAutoExpiry": false,
      "status": "Expired"
    }
  ],
  "remediationAgentPullRequests": [
    {
      "buildId": "4",
      "commits": 3,
      "createdAt": "2026-07-04T12:45:00Z",
      "executionId": "execution1111111111111",
      "fixVerified": "success",
      "fixVerifiedPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "id": "42",
      "jiraTicketId": "STO-87236",
      "jiraTicketUrl": "https://jira.example.com/browse/STO-87236",
      "prNumber": 13114,
      "prTitle": "[13114] Security fix",
      "prUrl": "https://github.com/harness/example/pull/13114",
      "regression": "success",
      "regressionPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "repository": "harness/nodegoat",
      "scanId": "scan111111111111111111",
      "sourceBranch": "remediation/sast-13114",
      "status": "Open",
      "targetBranch": "master"
    },
    {
      "buildId": "4",
      "commits": 3,
      "createdAt": "2026-07-04T12:45:00Z",
      "executionId": "execution1111111111111",
      "fixVerified": "success",
      "fixVerifiedPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "id": "42",
      "jiraTicketId": "STO-87236",
      "jiraTicketUrl": "https://jira.example.com/browse/STO-87236",
      "prNumber": 13114,
      "prTitle": "[13114] Security fix",
      "prUrl": "https://github.com/harness/example/pull/13114",
      "regression": "success",
      "regressionPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "repository": "harness/nodegoat",
      "scanId": "scan111111111111111111",
      "sourceBranch": "remediation/sast-13114",
      "status": "Open",
      "targetBranch": "master"
    },
    {
      "buildId": "4",
      "commits": 3,
      "createdAt": "2026-07-04T12:45:00Z",
      "executionId": "execution1111111111111",
      "fixVerified": "success",
      "fixVerifiedPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "id": "42",
      "jiraTicketId": "STO-87236",
      "jiraTicketUrl": "https://jira.example.com/browse/STO-87236",
      "prNumber": 13114,
      "prTitle": "[13114] Security fix",
      "prUrl": "https://github.com/harness/example/pull/13114",
      "regression": "success",
      "regressionPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "repository": "harness/nodegoat",
      "scanId": "scan111111111111111111",
      "sourceBranch": "remediation/sast-13114",
      "status": "Open",
      "targetBranch": "master"
    }
  ],
  "severity": 8.5,
  "severityCode": "High",
  "status": "Remediated",
  "subproduct": "product",
  "targetId": "abcdef1234567890ghijkl",
  "targetName": "abcdef1234567890ghijkl",
  "targetType": "repository",
  "targetVariantId": "abcdef1234567890ghijkl",
  "targetVariantName": "nodegoat:master",
  "title": "Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash",
  "type": "SAST"
}
get
/api/v2/scans/{id}/issue/{issueId}/occurrences

Returns occurrences for a scan specific issue

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

The ID of the Security Test Scan

Example: Officia ex deleniti beatae ipsum.
issueIdstringRequired

The ID of the Security Test Issue

Example: Qui rem nesciunt reprehenderit.
Query parameters
accountIdstringRequired

Harness Account ID

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

Harness Organization ID

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

Harness Project ID

Example: example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$
pageinteger · int64Optional

Page number to fetch (starting from 0)

Default: 0Example: 4
pageSizeinteger · int64 · min: 1 · max: 100Optional

Number of results per page

Default: 30Example: 50
searchstring · max: 256OptionalExample: CWE-123,5
exemptionStatusstringOptionalExample: EXEMPTED,REJECTEDPattern: ^(EXEMPTED|NOT_EXEMPTED|REJECTED|PENDING)(,EXEMPTED|,NOT_EXEMPTED|,REJECTED|,PENDING)*$
occurrenceIdinteger · int64 · min: 1OptionalExample: 12345
sortstringOptional

The field to sort by

Example: Excepturi quo ut est sit qui quasi.
orderstring · enumOptional

The order to sort by

Example: DESCPossible values:
exemptionIdstringOptional

ID of Security Test Exemption

Example: abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Praesentium ab quis quo non amet.
Responses
200

OK response.

application/json
aiTriagedstring · enumOptional

Aggregate AI triage verdict. 'LikelyFP' if every occurrence is FALSE_POSITIVE; 'LikelyTP' if any is TRUE_POSITIVE; 'NotEvaluatedYet' if only some are triaged. Field is absent when no occurrence has been triaged yet.

Example: LikelyFPPossible values:
aiTriagedReasoningstringOptional

Representative LLM reasoning quoted from one of the per-occurrence triaged verdicts (FP-verdict reasoning preferred). Field is absent when no occurrence has been triaged yet.

Example: The argument to path.join is __dirname, a constant, not user input.
baseImageNamestringOptional

base image name of the issue

Example: baseImageName
baseImageOrgIdstringOptional

org id of the issue from where the base image is being referred

Example: default
baseImageProjectIdstringOptional

project id of the issue from where the base image is being referred

Example: STO
baselineVariantIdstringOptional

The Baseline Target Variant related to this Security Issue

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

Unix timestamp at which the resource was created

Example: 1651578240
currentStatusstring · enumOptional

Current status of the Exemption

Example: ApprovedPossible values:
epssLastModifiedstringOptional

Last date the issue EPSS data was last modified

Example: 2025-05-01
epssPercentilenumber · doubleOptional

EPSS percentile of the issue CVE identifier

Example: 0.15
epssScorenumber · doubleOptional

EPSS score of the issue CVE identifier

Example: 0.035
exemptionCoveragestringOptional

Indicates if the Security Issue was found to be Exempted or PartiallyExempted.

Example: PartiallyExempted
exemptionIdstringOptional

ID of Security Test Exemption

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

Exemption's status at the Security Scan created time

Example: RejectedPossible values:
exploitabilitystringOptional

Exploitability status of the issue (yes or no)

Example: yes
fallbackSeverityCodestring · enumOptional

Issue-table severity code used as occurrence fallback at read time; omitted from API responses

Example: HighPossible values:
gracePeriodDaysinteger · int64Optional

Issue-level grace period rollup in days. Only populated when scan honorGracePeriod is enabled.

Example: 13
hasRulesbooleanRequired

Whether the account has at least one exemption rule. When false, clients can skip exemption rule evaluation (no rule-eval loaders).

Example: true
idstringRequired

Resource identifier

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

True when the displayed severity is grace-sheltered: at the display-max severity band, all non-exempt occurrences are in grace. Only populated when scan honorGracePeriod is enabled.

Example: true
keystring · max: 512Required

Compression/deduplication key

Example: json-schema@0.2.3
lastBaseImageScanAtinteger · int64Optional

last scan timestamp of the base image being referred

Example: 1651578240
numNonExemptedOccurrencesinteger · int32Required

Indicates the number of Occurrences which dont have an active exemption on the Occurrence

Default: 0Example: 10
numOccurrencesinteger · int32Required

Indicates the number of Occurrences on the Issue

Example: 10
occurrenceIdinteger · int64 · min: 1OptionalExample: 12345
originStatusstringOptional

The status of the origin, either 'approved' or 'unapproved'

Example: approved
originsstring[]Optional

The origins of the issue

Example: ["app","base"]
pipelineIdstring · max: 128Optional

Harness Pipeline ID

Example: example_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$
primaryOccurrenceIdinteger · int64Required

The primary occurrence's ID

Example: 12345
productIdstringRequired

The scan tool that identified this Security Issue

Example: product1234567890abcdePattern: ^[a-zA-Z0-9_-]{22}$
reachabilitystringOptional

Reachability status of the issue (reachable or unreachable)

Example: reachable
severitynumber · floatRequired

Numeric severity, from 0 (lowest) to 10 (highest)

Example: 8.5
severityCodestring · enumRequired

Severity code

Example: HighPossible values:
statusstring · enumOptional

Indicates if the Security Issue was found to be remediated, ignored, etc.

Example: RemediatedPossible values:
subproductstringOptional

The subproduct that identified this Security Issue

Example: product
targetIdstringOptional

The Target that this Security Issue affects

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

The Name of the Target that this Security Issue affects

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

The type of the Target that this Security Issue affects

Example: repositoryPossible values:
targetVariantIdstringOptional

The Target Variant that this Security Issue affects

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

Name of the associated Target and Variant

Example: nodegoat:masterPattern: ^[a-zA-Z0-9_-]{22}$
titlestring · max: 128Required

Title of the Security Issue

Example: Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash
typestring · enumOptional

The type of vulnerability or quality issue for this Issue

Example: SASTPossible values:
get/api/v2/scans/{id}/issue/{issueId}/occurrences
GET /gateway/sto/api/v2/scans/{id}/issue/{issueId}/occurrences?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "aiTriaged": "LikelyFP",
  "aiTriagedReasoning": "The argument to path.join is __dirname, a constant, not user input.",
  "baseImageName": "baseImageName",
  "baseImageOrgId": "default",
  "baseImageProjectId": "STO",
  "baselineVariantId": "abcdef1234567890ghijkl",
  "created": 1651578240,
  "currentStatus": "Approved",
  "details": {
    "package": "json-schema",
    "version": "v0.2.3"
  },
  "epssLastModified": "2025-05-01",
  "epssPercentile": 0.15,
  "epssScore": 0.035,
  "exemptionCoverage": "PartiallyExempted",
  "exemptionId": "abcdef1234567890ghijkl",
  "exemptionStatusAtScan": "Approved",
  "exploitability": "yes",
  "fallbackSeverityCode": "High",
  "gitMetadata": {
    "commit": "0000000000000000000000000000000000000001",
    "detectedName": "Necessitatibus dolore dicta assumenda.",
    "detectedVariant": "Temporibus quis architecto voluptate quae dolores.",
    "droneCorrelated": false,
    "provider": "Perspiciatis minima et.",
    "pullRequestNumber": 11,
    "repositoryHttp": "https://github.com/harness/drone-cli.git",
    "repositoryPath": [
      "Est molestiae sunt ea sed id.",
      "Eaque cum alias.",
      "Minima et iure quis.",
      "Fuga veniam ex nihil maiores."
    ],
    "repositorySsh": "git@github.com:harness/drone-cli.git",
    "sourceBranch": "feat/shiny-object",
    "targetBranch": "develop",
    "workspace": "/harness"
  },
  "gracePeriodDays": 13,
  "harnessAugmentation": {
    "Magni sapiente consequatur.": "Cum et esse voluptas alias officia.",
    "Ut recusandae numquam est.": "Vel aut omnis fugit aut."
  },
  "hasRules": true,
  "id": "abcdef1234567890ghijkl",
  "inGrace": true,
  "key": "json-schema@0.2.3",
  "lastBaseImageScanAt": 1651578240,
  "numNonExemptedOccurrences": 10,
  "numOccurrences": 10,
  "occurrenceId": 12345,
  "occurrences": [
    {
      "line": "42"
    },
    {
      "line": "666"
    }
  ],
  "occurrencesPagination": {
    "link": "",
    "page": 4,
    "pageSize": 20,
    "totalItems": 230,
    "totalPages": 12
  },
  "originStatus": "approved",
  "origins": [
    "app",
    "base"
  ],
  "overrides": [
    {
      "created": 1651578240,
      "fieldName": "severityCode",
      "impactedTargetId": "target1111111111111111",
      "originalFieldValue": "Low",
      "overrideFieldValue": "Low",
      "overrideId": "override1234",
      "reason": "Waiting on upstream bug fix",
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname"
    },
    {
      "created": 1651578240,
      "fieldName": "severityCode",
      "impactedTargetId": "target1111111111111111",
      "originalFieldValue": "Low",
      "overrideFieldValue": "Low",
      "overrideId": "override1234",
      "reason": "Waiting on upstream bug fix",
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname"
    }
  ],
  "overridesAtScan": [
    {
      "created": 1651578240,
      "fieldName": "severityCode",
      "impactedTargetId": "target1111111111111111",
      "originalFieldValue": "Low",
      "overrideFieldValue": "Low",
      "overrideId": "override1234",
      "reason": "Waiting on upstream bug fix",
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname"
    },
    {
      "created": 1651578240,
      "fieldName": "severityCode",
      "impactedTargetId": "target1111111111111111",
      "originalFieldValue": "Low",
      "overrideFieldValue": "Low",
      "overrideId": "override1234",
      "reason": "Waiting on upstream bug fix",
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname"
    },
    {
      "created": 1651578240,
      "fieldName": "severityCode",
      "impactedTargetId": "target1111111111111111",
      "originalFieldValue": "Low",
      "overrideFieldValue": "Low",
      "overrideId": "override1234",
      "reason": "Waiting on upstream bug fix",
      "requesterEmail": "user@harness.io",
      "requesterId": "user111111111111111111",
      "requesterName": "firstname lastname"
    }
  ],
  "pipelineId": "example_pipeline",
  "primaryOccurrenceId": 12345,
  "productId": "product1234567890abcde",
  "reachability": "reachable",
  "recentActivities": [
    {
      "actorName": "Priya Nair",
      "created": 1781391060,
      "id": "hist111111111111111111",
      "isAutoExpiry": false,
      "status": "Expired"
    },
    {
      "actorName": "Priya Nair",
      "created": 1781391060,
      "id": "hist111111111111111111",
      "isAutoExpiry": false,
      "status": "Expired"
    }
  ],
  "remediationAgentPullRequests": [
    {
      "buildId": "4",
      "commits": 3,
      "createdAt": "2026-07-04T12:45:00Z",
      "executionId": "execution1111111111111",
      "fixVerified": "success",
      "fixVerifiedPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "id": "42",
      "jiraTicketId": "STO-87236",
      "jiraTicketUrl": "https://jira.example.com/browse/STO-87236",
      "prNumber": 13114,
      "prTitle": "[13114] Security fix",
      "prUrl": "https://github.com/harness/example/pull/13114",
      "regression": "success",
      "regressionPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "repository": "harness/nodegoat",
      "scanId": "scan111111111111111111",
      "sourceBranch": "remediation/sast-13114",
      "status": "Open",
      "targetBranch": "master"
    },
    {
      "buildId": "4",
      "commits": 3,
      "createdAt": "2026-07-04T12:45:00Z",
      "executionId": "execution1111111111111",
      "fixVerified": "success",
      "fixVerifiedPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "id": "42",
      "jiraTicketId": "STO-87236",
      "jiraTicketUrl": "https://jira.example.com/browse/STO-87236",
      "prNumber": 13114,
      "prTitle": "[13114] Security fix",
      "prUrl": "https://github.com/harness/example/pull/13114",
      "regression": "success",
      "regressionPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "repository": "harness/nodegoat",
      "scanId": "scan111111111111111111",
      "sourceBranch": "remediation/sast-13114",
      "status": "Open",
      "targetBranch": "master"
    },
    {
      "buildId": "4",
      "commits": 3,
      "createdAt": "2026-07-04T12:45:00Z",
      "executionId": "execution1111111111111",
      "fixVerified": "success",
      "fixVerifiedPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "id": "42",
      "jiraTicketId": "STO-87236",
      "jiraTicketUrl": "https://jira.example.com/browse/STO-87236",
      "prNumber": 13114,
      "prTitle": "[13114] Security fix",
      "prUrl": "https://github.com/harness/example/pull/13114",
      "regression": "success",
      "regressionPipeline": {
        "executionId": "execution1111111111111",
        "orgId": "default",
        "pipelineId": "security_pipeline",
        "projectId": "STO"
      },
      "repository": "harness/nodegoat",
      "scanId": "scan111111111111111111",
      "sourceBranch": "remediation/sast-13114",
      "status": "Open",
      "targetBranch": "master"
    }
  ],
  "severity": 8.5,
  "severityCode": "High",
  "status": "Remediated",
  "subproduct": "product",
  "targetId": "abcdef1234567890ghijkl",
  "targetName": "abcdef1234567890ghijkl",
  "targetType": "repository",
  "targetVariantId": "abcdef1234567890ghijkl",
  "targetVariantName": "nodegoat:master",
  "title": "Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash",
  "type": "SAST"
}
get
/api/v2/scans/{id}/issues

List Issues by Scan ID

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

The Scan ID

Example: abcdefghijkl1234567890Pattern: ^[a-zA-Z0-9_-]{22}$
Query parameters
accountIdstringRequired

Harness Account ID

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

Chooses whether to show exempted issues ("only"), or non-exempted issues ("0" or "false")

Default: falseExample: 0Possible values:
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Minus provident velit.
Responses
200

OK response.

application/json

List of Issues

get/api/v2/scans/{id}/issues
GET /gateway/sto/api/v2/scans/{id}/issues?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "issues": [
    {
      "baseImageName": "baseImageName",
      "baselineVariantId": "abcdef1234567890ghijkl",
      "created": 1651578240,
      "currentStatus": "Pending",
      "details": {
        "package": "json-schema",
        "version": "v0.2.3"
      },
      "epssLastModified": "2025-05-01",
      "epssPercentile": 0.15,
      "epssScore": 0.035,
      "exemptionCoverage": "PartiallyExempted",
      "exemptionId": "abcdef1234567890ghijkl",
      "exemptionStatusAtScan": "Expired",
      "exploitability": "yes",
      "fallbackSeverityCode": "High",
      "gracePeriodDays": 13,
      "harnessAugmentation": {
        "Commodi in aut totam quia.": "Amet aut eum omnis placeat sed dolor.",
        "Magnam ea enim commodi.": "Voluptatem amet ipsa non ut aut odit."
      },
      "id": "abcdef1234567890ghijkl",
      "inGrace": true,
      "key": "json-schema@0.2.3",
      "numOccurrences": 10,
      "occurrenceId": 12345,
      "occurrences": [
        {
          "line": "42"
        },
        {
          "line": "666"
        }
      ],
      "originStatus": "approved",
      "origins": [
        "app",
        "base"
      ],
      "overrides": [
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        }
      ],
      "overridesAtScan": [
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        }
      ],
      "productId": "product1234567890abcde",
      "reachability": "reachable",
      "severity": 8.5,
      "severityCode": "High",
      "status": "Remediated",
      "subproduct": "product",
      "targetId": "abcdef1234567890ghijkl",
      "targetName": "abcdef1234567890ghijkl",
      "targetType": "repository",
      "targetVariantId": "abcdef1234567890ghijkl",
      "targetVariantName": "nodegoat:master",
      "title": "Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash",
      "type": "SAST"
    },
    {
      "baseImageName": "baseImageName",
      "baselineVariantId": "abcdef1234567890ghijkl",
      "created": 1651578240,
      "currentStatus": "Pending",
      "details": {
        "package": "json-schema",
        "version": "v0.2.3"
      },
      "epssLastModified": "2025-05-01",
      "epssPercentile": 0.15,
      "epssScore": 0.035,
      "exemptionCoverage": "PartiallyExempted",
      "exemptionId": "abcdef1234567890ghijkl",
      "exemptionStatusAtScan": "Expired",
      "exploitability": "yes",
      "fallbackSeverityCode": "High",
      "gracePeriodDays": 13,
      "harnessAugmentation": {
        "Commodi in aut totam quia.": "Amet aut eum omnis placeat sed dolor.",
        "Magnam ea enim commodi.": "Voluptatem amet ipsa non ut aut odit."
      },
      "id": "abcdef1234567890ghijkl",
      "inGrace": true,
      "key": "json-schema@0.2.3",
      "numOccurrences": 10,
      "occurrenceId": 12345,
      "occurrences": [
        {
          "line": "42"
        },
        {
          "line": "666"
        }
      ],
      "originStatus": "approved",
      "origins": [
        "app",
        "base"
      ],
      "overrides": [
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        }
      ],
      "overridesAtScan": [
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        }
      ],
      "productId": "product1234567890abcde",
      "reachability": "reachable",
      "severity": 8.5,
      "severityCode": "High",
      "status": "Remediated",
      "subproduct": "product",
      "targetId": "abcdef1234567890ghijkl",
      "targetName": "abcdef1234567890ghijkl",
      "targetType": "repository",
      "targetVariantId": "abcdef1234567890ghijkl",
      "targetVariantName": "nodegoat:master",
      "title": "Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash",
      "type": "SAST"
    },
    {
      "baseImageName": "baseImageName",
      "baselineVariantId": "abcdef1234567890ghijkl",
      "created": 1651578240,
      "currentStatus": "Pending",
      "details": {
        "package": "json-schema",
        "version": "v0.2.3"
      },
      "epssLastModified": "2025-05-01",
      "epssPercentile": 0.15,
      "epssScore": 0.035,
      "exemptionCoverage": "PartiallyExempted",
      "exemptionId": "abcdef1234567890ghijkl",
      "exemptionStatusAtScan": "Expired",
      "exploitability": "yes",
      "fallbackSeverityCode": "High",
      "gracePeriodDays": 13,
      "harnessAugmentation": {
        "Commodi in aut totam quia.": "Amet aut eum omnis placeat sed dolor.",
        "Magnam ea enim commodi.": "Voluptatem amet ipsa non ut aut odit."
      },
      "id": "abcdef1234567890ghijkl",
      "inGrace": true,
      "key": "json-schema@0.2.3",
      "numOccurrences": 10,
      "occurrenceId": 12345,
      "occurrences": [
        {
          "line": "42"
        },
        {
          "line": "666"
        }
      ],
      "originStatus": "approved",
      "origins": [
        "app",
        "base"
      ],
      "overrides": [
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        }
      ],
      "overridesAtScan": [
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        }
      ],
      "productId": "product1234567890abcde",
      "reachability": "reachable",
      "severity": 8.5,
      "severityCode": "High",
      "status": "Remediated",
      "subproduct": "product",
      "targetId": "abcdef1234567890ghijkl",
      "targetName": "abcdef1234567890ghijkl",
      "targetType": "repository",
      "targetVariantId": "abcdef1234567890ghijkl",
      "targetVariantName": "nodegoat:master",
      "title": "Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash",
      "type": "SAST"
    },
    {
      "baseImageName": "baseImageName",
      "baselineVariantId": "abcdef1234567890ghijkl",
      "created": 1651578240,
      "currentStatus": "Pending",
      "details": {
        "package": "json-schema",
        "version": "v0.2.3"
      },
      "epssLastModified": "2025-05-01",
      "epssPercentile": 0.15,
      "epssScore": 0.035,
      "exemptionCoverage": "PartiallyExempted",
      "exemptionId": "abcdef1234567890ghijkl",
      "exemptionStatusAtScan": "Expired",
      "exploitability": "yes",
      "fallbackSeverityCode": "High",
      "gracePeriodDays": 13,
      "harnessAugmentation": {
        "Commodi in aut totam quia.": "Amet aut eum omnis placeat sed dolor.",
        "Magnam ea enim commodi.": "Voluptatem amet ipsa non ut aut odit."
      },
      "id": "abcdef1234567890ghijkl",
      "inGrace": true,
      "key": "json-schema@0.2.3",
      "numOccurrences": 10,
      "occurrenceId": 12345,
      "occurrences": [
        {
          "line": "42"
        },
        {
          "line": "666"
        }
      ],
      "originStatus": "approved",
      "origins": [
        "app",
        "base"
      ],
      "overrides": [
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        }
      ],
      "overridesAtScan": [
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        },
        {
          "created": 1651578240,
          "fieldName": "severityCode",
          "impactedTargetId": "target1111111111111111",
          "originalFieldValue": "Low",
          "overrideFieldValue": "Low",
          "overrideId": "override1234",
          "reason": "Waiting on upstream bug fix",
          "requesterEmail": "user@harness.io",
          "requesterId": "user111111111111111111",
          "requesterName": "firstname lastname"
        }
      ],
      "productId": "product1234567890abcde",
      "reachability": "reachable",
      "severity": 8.5,
      "severityCode": "High",
      "status": "Remediated",
      "subproduct": "product",
      "targetId": "abcdef1234567890ghijkl",
      "targetName": "abcdef1234567890ghijkl",
      "targetType": "repository",
      "targetVariantId": "abcdef1234567890ghijkl",
      "targetVariantName": "nodegoat:master",
      "title": "Semgrep Finding: generic.secrets.security.detected-bcrypt-hash.detected-bcrypt-hash",
      "type": "SAST"
    }
  ]
}
get
/api/v2/scans/{id}/issues/counts

Returns counts of active Security Issues for a Security Test Scan

Required scopes
This endpoint requires the following scopes:
Authorizations
X-Api-KeystringRequired
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
idstringRequired

The ID of the Security Test Scan for which to count issues

Example: Numquam quo error tempore et.
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_]*$
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Dolore reiciendis.
Responses
200

OK response.

application/json
appCriticalinteger · int32Optional

The number of Critical-severity Issues in the App Image

Example: 1
appHighinteger · int32Optional

The number of High-severity Issues in the App Image

Example: 3
appInfointeger · int32Optional

The number of Informational Issues in the App Image

Example: 11
appLowinteger · int32Optional

The number of Low-severity Issues in the App Image

Example: 39
appMediuminteger · int32Optional

The number of Medium-severity Issues in the App Image

Example: 17
baseCriticalinteger · int32Optional

The number of Critical-severity Issues in the Base Image

Example: 1
baseHighinteger · int32Optional

The number of High-severity Issues in the Base Image

Example: 3
baseImageApprovedbooleanOptional

The approval status of the Base Image for the Scan

Example: true
baseImageDetectedbooleanOptional

The status of the Base Image for the Scan

Example: true
baseInfointeger · int32Optional

The number of Informational Issues in the Base Image

Example: 11
baseLowinteger · int32Optional

The number of Low-severity Issues in the Base Image

Example: 39
baseMediuminteger · int32Optional

The number of Medium-severity Issues in the Base Image

Example: 17
codeCoveragenumber · floatOptional

The Code Coverage value for the Scan

Example: 65.5
criticalinteger · int32Required

The number of Critical-severity Issues

Example: 1
externalPolicyFailuresinteger · int32Required

The number of EXTERNAL_POLICY Issues

Example: 0
highinteger · int32Required

The number of High-severity Issues

Example: 3
ignoredinteger · int32Required

The number of Issues ignored due to Exemptions, and therefore not included in other counts

Example: 1
ignoredCriticalinteger · int32Required

The number of ignored Critical-severity Issues

Example: 1
ignoredHighinteger · int32Required

The number of ignored High-severity Issues

Example: 3
ignoredInfointeger · int32Required

The number of ignored Informational Issues

Example: 11
ignoredLowinteger · int32Required

The number of ignored Low-severity Issues

Example: 39
ignoredMediuminteger · int32Required

The number of ignored Medium-severity Issues

Example: 17
ignoredUnassignedinteger · int32Required

The number of Issues with no associated severity code

Example: 0
infointeger · int32Required

The number of Informational Issues

Example: 11
lowinteger · int32Required

The number of Low-severity Issues

Example: 39
mediuminteger · int32Required

The number of Medium-severity Issues

Example: 17
newAppCriticalinteger · int32Optional

The number of new Critical-severity Issues in the App Image

Example: 1
newAppHighinteger · int32Optional

The number of new High-severity Issues in the App Image

Example: 3
newAppInfointeger · int32Optional

The number of new Informational Issues in the App Image

Example: 11
newAppLowinteger · int32Optional

The number of new Low-severity Issues in the App Image

Example: 39
newAppMediuminteger · int32Optional

The number of new Medium-severity Issues in the App Image

Example: 17
newBaseCriticalinteger · int32Optional

The number of new Critical-severity Issues in the Base Image

Example: 1
newBaseHighinteger · int32Optional

The number of new High-severity Issues in the Base Image

Example: 3
newBaseInfointeger · int32Optional

The number of new Informational Issues in the Base Image

Example: 11
newBaseLowinteger · int32Optional

The number of new Low-severity Issues in the Base Image

Example: 39
newBaseMediuminteger · int32Optional

The number of new Medium-severity Issues in the Base Image

Example: 17
newCriticalinteger · int32Required

The number of new Critical-severity Issues

Example: 1
newHighinteger · int32Required

The number of new High-severity Issues

Example: 3
newIgnoredCriticalinteger · int32Required

The number of ignored Critical-severity Issues

Example: 1
newIgnoredHighinteger · int32Required

The number of ignored High-severity Issues

Example: 3
newIgnoredInfointeger · int32Required

The number of ignored Informational Issues

Example: 11
newIgnoredLowinteger · int32Required

The number of ignored Low-severity Issues

Example: 39
newIgnoredMediuminteger · int32Required

The number of ignored Medium-severity Issues

Example: 17
newIgnoredOccurrencesCriticalinteger · int32Required

The number of ignored Critical-severity Occurrences

Example: 1
newIgnoredOccurrencesHighinteger · int32Required

The number of ignored High-severity Occurrences

Example: 3
newIgnoredOccurrencesInfointeger · int32Required

The number of ignored Informational Occurrences

Example: 11
newIgnoredOccurrencesLowinteger · int32Required

The number of ignored Low-severity Occurrences

Example: 39
newIgnoredOccurrencesMediuminteger · int32Required

The number of ignored Medium-severity Occurrences

Example: 17
newIgnoredOccurrencesUnassignedinteger · int32Required

The number of ignored Occurrences with no associated severity code

Example: 0
newIgnoredUnassignedinteger · int32Required

The number of Issues with no associated severity code

Example: 0
newInfointeger · int32Required

The number of new Informational Issues

Example: 11
newLowinteger · int32Required

The number of new Low-severity Issues

Example: 39
newMediuminteger · int32Required

The number of new Medium-severity Issues

Example: 17
newOccurrencesCriticalinteger · int32Required

The number of new Critical-severity Occurrences

Example: 1
newOccurrencesHighinteger · int32Required

The number of new High-severity Occurrences

Example: 3
newOccurrencesInfointeger · int32Required

The number of new Informational Occurrences

Example: 11
newOccurrencesLowinteger · int32Required

The number of new Low-severity Occurrences

Example: 39
newOccurrencesMediuminteger · int32Required

The number of new Medium-severity Occurrences

Example: 17
newOccurrencesUnassignedinteger · int32Required

The number of new Occurrences with no associated severity code

Example: 0
newTotalinteger · int32Required

The total number new Issues

Example: 3
newTotalBaseinteger · int32Optional

The total number new Issues in the Base Image

Example: 3
newUnassignedinteger · int32Required

The number of new Issues with no associated severity code

Example: 0
scannerConsoleUrlstringOptional

The scanner console URL for viewing scan results

Example: https://app.shiftleft.io/apps/myapp/summary?scan=12345
totalinteger · int32Required

The total number of Issues

Example: 10
totalBaseinteger · int32Optional

The total number of Issues in the Base Image

Example: 10
unassignedinteger · int32Required

The number of Issues with no associated severity code

Example: 0
get/api/v2/scans/{id}/issues/counts
GET /gateway/sto/api/v2/scans/{id}/issues/counts?accountId=abcdef1234567890ghijkl&orgId=example_org&projectId=example_project HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "appCritical": 1,
  "appHigh": 3,
  "appInfo": 11,
  "appLow": 39,
  "appMedium": 17,
  "baseCritical": 1,
  "baseHigh": 3,
  "baseImageApproved": true,
  "baseImageDetected": true,
  "baseInfo": 11,
  "baseLow": 39,
  "baseMedium": 17,
  "codeCoverage": 65.5,
  "critical": 1,
  "externalPolicyFailures": 0,
  "high": 3,
  "ignored": 1,
  "ignoredCritical": 1,
  "ignoredHigh": 3,
  "ignoredInfo": 11,
  "ignoredLow": 39,
  "ignoredMedium": 17,
  "ignoredUnassigned": 0,
  "info": 11,
  "low": 39,
  "medium": 17,
  "newAppCritical": 1,
  "newAppHigh": 3,
  "newAppInfo": 11,
  "newAppLow": 39,
  "newAppMedium": 17,
  "newBaseCritical": 1,
  "newBaseHigh": 3,
  "newBaseInfo": 11,
  "newBaseLow": 39,
  "newBaseMedium": 17,
  "newCritical": 1,
  "newHigh": 3,
  "newIgnoredCritical": 1,
  "newIgnoredHigh": 3,
  "newIgnoredInfo": 11,
  "newIgnoredLow": 39,
  "newIgnoredMedium": 17,
  "newIgnoredOccurrencesCritical": 1,
  "newIgnoredOccurrencesHigh": 3,
  "newIgnoredOccurrencesInfo": 11,
  "newIgnoredOccurrencesLow": 39,
  "newIgnoredOccurrencesMedium": 17,
  "newIgnoredOccurrencesUnassigned": 0,
  "newIgnoredUnassigned": 0,
  "newInfo": 11,
  "newLow": 39,
  "newMedium": 17,
  "newOccurrencesCritical": 1,
  "newOccurrencesHigh": 3,
  "newOccurrencesInfo": 11,
  "newOccurrencesLow": 39,
  "newOccurrencesMedium": 17,
  "newOccurrencesUnassigned": 0,
  "newTotal": 3,
  "newTotalBase": 3,
  "newUnassigned": 0,
  "scannerConsoleUrl": "https://app.shiftleft.io/apps/myapp/summary?scan=12345",
  "total": 10,
  "totalBase": 10,
  "unassigned": 0
}

Get Latest Scans

get
/api/v2/scans/latest

Get the most recent successful scan for each product/subproduct of a target variant. A single product can emit multiple subproducts (e.g. SnykCode vs snykContainer), each of which is a distinct scan stream, so the result is an array with the latest succeeded scan per (product, subproduct). The optional productId and subproduct query params narrow the result to a single product and/or subproduct. Used by scanners needing previous scan context and by UIs to show latest scan status.

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

Harness Account ID

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

The Target Variant ID

Example: abcdefghijkl1234567890Pattern: ^[a-zA-Z0-9_-]{22}$
productIdstringOptional

Optional Product ID (scanner) filter. When omitted, the latest scan for every product of the target variant is returned.

Example: abcdefghijkl1234567890Pattern: ^[a-zA-Z0-9_-]{22}$
subproductstringOptional

Optional subproduct filter to disambiguate scans within a product (e.g. SnykCode vs snykContainer). When omitted, the latest scan for every subproduct is returned.

Example: SnykCode
scannerDiffKeystringOptional

Optional scanner diff key filter to disambiguate scan comparison streams within a product/subproduct (e.g. pr_scan vs deep). When omitted, all scanner diff keys are considered.

Example: pr_scan
Header parameters
X-Api-KeystringOptional

Harness personal or service access token

Example: Quia hic dolorum consectetur consectetur dolor.
Responses
200

OK response.

application/json

The latest succeeded scan for each product/subproduct of a target variant

get/api/v2/scans/latest
GET /gateway/sto/api/v2/scans/latest?accountId=abcdef1234567890ghijkl&targetVariantId=abcdefghijkl1234567890 HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "scans": [
    {
      "codeCoverage": 65.5,
      "created": 1651578240,
      "executionId": "abcdef1234567890ghijkl",
      "gitMetadata": {
        "commit": "0000000000000000000000000000000000000001",
        "detectedName": "Necessitatibus dolore dicta assumenda.",
        "detectedVariant": "Temporibus quis architecto voluptate quae dolores.",
        "droneCorrelated": false,
        "provider": "Perspiciatis minima et.",
        "pullRequestNumber": 11,
        "repositoryHttp": "https://github.com/harness/drone-cli.git",
        "repositoryPath": [
          "Est molestiae sunt ea sed id.",
          "Eaque cum alias.",
          "Minima et iure quis.",
          "Fuga veniam ex nihil maiores."
        ],
        "repositorySsh": "git@github.com:harness/drone-cli.git",
        "sourceBranch": "feat/shiny-object",
        "targetBranch": "develop",
        "workspace": "/harness"
      },
      "id": "abcdef1234567890ghijkl",
      "lastModified": 1651578240,
      "metadata": {
        "baseImageDigest": "sha256:abcdef1234567890ghijkl",
        "baseImageName": "my-image",
        "baseImageTag": "1.0.0"
      },
      "orgId": "your_harness_org",
      "pipelineId": "your_harness_pipeline",
      "productId": "product111111111111111",
      "productName": "snyk",
      "productPrettyName": "Snyk",
      "projectId": "your_harness_project",
      "refinementVersion": "1.0.5",
      "scannerDiffKey": "sast",
      "stageId": "stage_id",
      "status": "Succeeded",
      "stepId": "step_id",
      "subproduct": "owasp",
      "targetVariantId": "variant111111111111111"
    },
    {
      "codeCoverage": 65.5,
      "created": 1651578240,
      "executionId": "abcdef1234567890ghijkl",
      "gitMetadata": {
        "commit": "0000000000000000000000000000000000000001",
        "detectedName": "Necessitatibus dolore dicta assumenda.",
        "detectedVariant": "Temporibus quis architecto voluptate quae dolores.",
        "droneCorrelated": false,
        "provider": "Perspiciatis minima et.",
        "pullRequestNumber": 11,
        "repositoryHttp": "https://github.com/harness/drone-cli.git",
        "repositoryPath": [
          "Est molestiae sunt ea sed id.",
          "Eaque cum alias.",
          "Minima et iure quis.",
          "Fuga veniam ex nihil maiores."
        ],
        "repositorySsh": "git@github.com:harness/drone-cli.git",
        "sourceBranch": "feat/shiny-object",
        "targetBranch": "develop",
        "workspace": "/harness"
      },
      "id": "abcdef1234567890ghijkl",
      "lastModified": 1651578240,
      "metadata": {
        "baseImageDigest": "sha256:abcdef1234567890ghijkl",
        "baseImageName": "my-image",
        "baseImageTag": "1.0.0"
      },
      "orgId": "your_harness_org",
      "pipelineId": "your_harness_pipeline",
      "productId": "product111111111111111",
      "productName": "snyk",
      "productPrettyName": "Snyk",
      "projectId": "your_harness_project",
      "refinementVersion": "1.0.5",
      "scannerDiffKey": "sast",
      "stageId": "stage_id",
      "status": "Succeeded",
      "stepId": "step_id",
      "subproduct": "owasp",
      "targetVariantId": "variant111111111111111"
    }
  ]
}

Last updated

Was this helpful?