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

Security Testing Orchestration

Read scan results and manage security issues, exemptions, and test targets with the Harness Security Testing Orchestration API.

The Security Testing Orchestration (STO) API reads the results of security scans in your pipelines, and manages the issues, exemptions, and targets around them.

Request basics

  • API key token: Send it in the x-api-key header on every request. Go to Manage API keys to create a key and token.

  • Account, organization, and project IDs: This API names them accountId, orgId, and projectId. Send them as query parameters; most endpoints need all three. Go to Organizations and projects to find these identifiers.

  • Base URL: Send requests to https://app.harness.io/gateway/sto, followed by the endpoint path.

Example request

List the scans in a project:

curl "https://app.harness.io/gateway/sto/api/v2/scans?accountId=ACCOUNT_ID&orgId=ORG_ID&projectId=PROJECT_ID" \
  -H "x-api-key: $HARNESS_API_KEY"

Replace ACCOUNT_ID, ORG_ID, and PROJECT_ID with your own values, and set HARNESS_API_KEY to your API key token.

Find an endpoint

Endpoint paths are relative to the base URL.

  • Scans: One run of a scanner against a target, and the issues it found. List scans with GET /api/v2/scans and read one with GET /api/v2/scans/{id}. Go to Set up Scans to set up scans.

  • Issues: Vulnerabilities found by scans, with their severity and the targets they affect. List issues with GET /api/v2/issues and read one with GET /api/v2/issues/{id}. Go to Security Issues to review security issues.

  • Exemptions and exemption rules: Requests to ignore an issue for a period, and the rules that decide who can approve them. List exemptions with GET /api/v2/exemptions, request one with POST /api/v2/exemptions, and list the rules with GET /api/v2/exemption-rules. Go to Exemptions for specific issues to understand exemptions.

  • Test targets and variants: The repository, image, or application being scanned, and its branches or tags. List the scanned variants of a repository with GET /api/v2/repositories/{targetId}/variants, or of an artifact with GET /api/v2/artifacts/{id}/variants. Go to Targets, variants, and baselines in STO to understand targets and baselines.

  • Overrides: Manual or scanner-wide changes to an issue's severity. List overrides with GET /api/v2/overrides and add one with POST /api/v2/overrides. Go to Severity Override to override a severity.

Last updated

Was this helpful?