Exemptions
Access and modify Exemptions to Security Issues
List a collection of Exemptions
Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Page number to fetch (starting from 0)
0Example: 4Number of results per page
30Example: 50Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness personal or service access token
Vero rerum quia.OK response.
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/exemptions?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": [
{
"approverEmail": "user@harness.io",
"approverId": "user111111111111111111",
"approverName": "firstname lastname",
"canApproveFor": [
"ACCOUNT",
"ORG",
"PROJECT",
"PIPELINE"
],
"canCancel": true,
"canCreate": true,
"canReApprove": true,
"canReject": true,
"comment": "This exemption was reviewed by the security team.",
"created": 1651578240,
"exemptionStatusAtScan": "Pending",
"expiration": 1651578240,
"id": "abcdef1234567890ghijkl",
"isDeleted": true,
"issueId": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"link": "https://example.com/ABC-1234",
"numOccurrences": 10,
"occurrences": [
42,
666
],
"orgId": "your_project",
"orgName": "Organization Name",
"pendingChanges": {
"durationDays": 7
},
"pipelineId": "your_pipeline",
"projectId": "your_project",
"projectName": "Project Name",
"reason": "Waiting on upstream bug fix",
"requestedOn": 1651578240,
"requesterEmail": "user@harness.io",
"requesterId": "user111111111111111111",
"requesterName": "firstname lastname",
"reviewedOn": 1651578240,
"scanId": "abcdef1234567890ghijkl",
"scope": "PROJECT",
"search": "CWE-123,5",
"status": "Canceled",
"targetId": "abcdef1234567890ghijkl",
"type": "Other"
},
{
"approverEmail": "user@harness.io",
"approverId": "user111111111111111111",
"approverName": "firstname lastname",
"canApproveFor": [
"ACCOUNT",
"ORG",
"PROJECT",
"PIPELINE"
],
"canCancel": true,
"canCreate": true,
"canReApprove": true,
"canReject": true,
"comment": "This exemption was reviewed by the security team.",
"created": 1651578240,
"exemptionStatusAtScan": "Pending",
"expiration": 1651578240,
"id": "abcdef1234567890ghijkl",
"isDeleted": true,
"issueId": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"link": "https://example.com/ABC-1234",
"numOccurrences": 10,
"occurrences": [
42,
666
],
"orgId": "your_project",
"orgName": "Organization Name",
"pendingChanges": {
"durationDays": 7
},
"pipelineId": "your_pipeline",
"projectId": "your_project",
"projectName": "Project Name",
"reason": "Waiting on upstream bug fix",
"requestedOn": 1651578240,
"requesterEmail": "user@harness.io",
"requesterId": "user111111111111111111",
"requesterName": "firstname lastname",
"reviewedOn": 1651578240,
"scanId": "abcdef1234567890ghijkl",
"scope": "PROJECT",
"search": "CWE-123,5",
"status": "Canceled",
"targetId": "abcdef1234567890ghijkl",
"type": "Other"
}
]
}Create a new Exemption
Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness personal or service access token
Sunt iusto.States if the user wants to exempt future occurrences of the issue
trueExample: falseUnix timestamp at which this Exemption will expire
1651578240Issue ID associated with the Exemption
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Link to a related ticket
https://example.com/ABC-1234Array of occurrence Ids
[42,666]ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".
your_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$Text describing why this Exemption is necessary
Waiting on upstream bug fixEmail of the user who requested this Exemption
user@harness.ioName of the user who requested this Exemption
firstname lastnameID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Search parameter to find filtered occurrences of the issue
CWE-123,5ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)
OtherPossible values: OK response.
Resource identifier
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
POST /gateway/sto/api/v2/exemptions?accountId=abcdef1234567890ghijkl&orgId=your_project&projectId=your_project 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: 435
{
"exemptFutureOccurrences": false,
"expiration": 1651578240,
"issueId": "abcdef1234567890ghijkl",
"link": "https://example.com/ABC-1234",
"occurrences": [
42,
666
],
"pendingChanges": {
"durationDays": 7
},
"pipelineId": "your_pipeline",
"reason": "Waiting on upstream bug fix",
"requesterEmail": "user@harness.io",
"requesterName": "firstname lastname",
"scanId": "abcdef1234567890ghijkl",
"search": "CWE-123,5",
"targetId": "abcdef1234567890ghijkl",
"type": "Other"
}{
"id": "abcdef1234567890ghijkl"
}Find Exemption by ID
The ID of the Exemption to retrieve
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Execution ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Ignore scope
falseHarness personal or service access token
Rerum perferendis iusto deserunt natus cumque.OK response.
Information about an Exemption
Email of the user who approved this Exemption
user@harness.ioUser ID the user who approved or rejected this exemptions
user111111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$Name of the user who approved this Exemption
firstname lastnameStates if the user can cancel the exemption
falseExample: trueStates whether the user can create or reopen the exemption
falseExample: trueStates if the user can re-approve the exemption for the exemption's scope
falseExample: trueStates whether the user can reject the exemption
falseExample: trueThe additional comment to include with the exemption
This exemption was reviewed by the security team.Unix timestamp at which the resource was created
1651578240Exemption's status at the Security Scan created time
PendingPossible values: Unix timestamp at which this Exemption will expire
1651578240Resource identifier
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$States if the exemption is deleted
falseExample: trueIssue ID associated with the Exemption
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Unix timestamp at which the resource was most recently modified
1651578240Link to a related ticket
https://example.com/ABC-1234States how may occurrences are associated with the exemption, if not an issue level exemption
0Example: 10Array of occurrence Ids
[42,666]ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Name of the organization associated with the exemption
Organization NameID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".
your_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Name of the project associated with the exemption
Project NameText describing why this Exemption is necessary
Waiting on upstream bug fixUnix timestamp of the exemption's current request. Updates each time the exemption is reopened; falls back to the original creation time when never reopened.
1651578240Email of the user who requested this Exemption
user@harness.ioUser ID of the user who requested this Exemption
user111111111111111111Name of the user who requested this Exemption
firstname lastnameUnix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.
1651578240ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$States the scope for the exemption
PROJECTPossible values: Search parameter to find filtered occurrences of the issue
CWE-123,5Approval status of Exemption
PendingExample: RejectedPossible values: ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)
OtherPossible values: BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/exemptions/{id}?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"approverEmail": "user@harness.io",
"approverId": "user111111111111111111",
"approverName": "firstname lastname",
"canApproveFor": [
"ACCOUNT",
"ORG",
"PROJECT",
"PIPELINE"
],
"canCancel": true,
"canCreate": true,
"canReApprove": true,
"canReject": true,
"comment": "This exemption was reviewed by the security team.",
"created": 1651578240,
"exemptionStatusAtScan": "Pending",
"expiration": 1651578240,
"id": "abcdef1234567890ghijkl",
"isDeleted": true,
"issueId": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"link": "https://example.com/ABC-1234",
"numOccurrences": 10,
"occurrences": [
42,
666
],
"orgId": "your_project",
"orgName": "Organization Name",
"pendingChanges": {
"durationDays": 7
},
"pipelineId": "your_pipeline",
"projectId": "your_project",
"projectName": "Project Name",
"reason": "Waiting on upstream bug fix",
"requestedOn": 1651578240,
"requesterEmail": "user@harness.io",
"requesterId": "user111111111111111111",
"requesterName": "firstname lastname",
"reviewedOn": 1651578240,
"scanId": "abcdef1234567890ghijkl",
"scope": "PROJECT",
"search": "CWE-123,5",
"status": "Canceled",
"targetId": "abcdef1234567890ghijkl",
"type": "Other"
}Update an existing Exemption
The ID of the Exemption to update
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness personal or service access token
Dolore voluptate vel corporis.Unix timestamp at which this Exemption will expire
1651578240Link to a related ticket
https://example.com/ABC-1234ID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".
your_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$Text describing why this Exemption is necessary
Waiting on upstream bug fixEmail of the user who requested this Exemption
user@harness.ioName of the user who requested this Exemption
firstname lastnameID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)
OtherPossible values: OK response.
Information about an Exemption
Email of the user who approved this Exemption
user@harness.ioUser ID the user who approved or rejected this exemptions
user111111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$Name of the user who approved this Exemption
firstname lastnameStates if the user can cancel the exemption
falseExample: trueStates whether the user can create or reopen the exemption
falseExample: trueStates if the user can re-approve the exemption for the exemption's scope
falseExample: trueStates whether the user can reject the exemption
falseExample: trueThe additional comment to include with the exemption
This exemption was reviewed by the security team.Unix timestamp at which the resource was created
1651578240Exemption's status at the Security Scan created time
PendingPossible values: Unix timestamp at which this Exemption will expire
1651578240Resource identifier
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$States if the exemption is deleted
falseExample: trueIssue ID associated with the Exemption
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Unix timestamp at which the resource was most recently modified
1651578240Link to a related ticket
https://example.com/ABC-1234States how may occurrences are associated with the exemption, if not an issue level exemption
0Example: 10Array of occurrence Ids
[42,666]ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Name of the organization associated with the exemption
Organization NameID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".
your_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Name of the project associated with the exemption
Project NameText describing why this Exemption is necessary
Waiting on upstream bug fixUnix timestamp of the exemption's current request. Updates each time the exemption is reopened; falls back to the original creation time when never reopened.
1651578240Email of the user who requested this Exemption
user@harness.ioUser ID of the user who requested this Exemption
user111111111111111111Name of the user who requested this Exemption
firstname lastnameUnix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.
1651578240ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$States the scope for the exemption
PROJECTPossible values: Search parameter to find filtered occurrences of the issue
CWE-123,5Approval status of Exemption
PendingExample: RejectedPossible values: ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)
OtherPossible values: BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
PUT /gateway/sto/api/v2/exemptions/{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: 290
{
"expiration": 1651578240,
"link": "https://example.com/ABC-1234",
"pendingChanges": {
"durationDays": 7
},
"pipelineId": "your_pipeline",
"reason": "Waiting on upstream bug fix",
"requesterEmail": "user@harness.io",
"requesterName": "firstname lastname",
"targetId": "abcdef1234567890ghijkl",
"type": "Other"
}{
"approverEmail": "user@harness.io",
"approverId": "user111111111111111111",
"approverName": "firstname lastname",
"canApproveFor": [
"ACCOUNT",
"ORG",
"PROJECT",
"PIPELINE"
],
"canCancel": true,
"canCreate": true,
"canReApprove": true,
"canReject": true,
"comment": "This exemption was reviewed by the security team.",
"created": 1651578240,
"exemptionStatusAtScan": "Pending",
"expiration": 1651578240,
"id": "abcdef1234567890ghijkl",
"isDeleted": true,
"issueId": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"link": "https://example.com/ABC-1234",
"numOccurrences": 10,
"occurrences": [
42,
666
],
"orgId": "your_project",
"orgName": "Organization Name",
"pendingChanges": {
"durationDays": 7
},
"pipelineId": "your_pipeline",
"projectId": "your_project",
"projectName": "Project Name",
"reason": "Waiting on upstream bug fix",
"requestedOn": 1651578240,
"requesterEmail": "user@harness.io",
"requesterId": "user111111111111111111",
"requesterName": "firstname lastname",
"reviewedOn": 1651578240,
"scanId": "abcdef1234567890ghijkl",
"scope": "PROJECT",
"search": "CWE-123,5",
"status": "Canceled",
"targetId": "abcdef1234567890ghijkl",
"type": "Other"
}Approve/reject an existing Exemption
The ID of the Exemption to update
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$The approval action to take on the Exemption
approvePossible values: Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness personal or service access token
Quia doloribus voluptatibus harum.Comment to be added to the Exemption approval or rejection
This is a comment for the approval or rejection of the exemptionOK response.
Information about an Exemption
Email of the user who approved this Exemption
user@harness.ioUser ID the user who approved or rejected this exemptions
user111111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$Name of the user who approved this Exemption
firstname lastnameStates if the user can cancel the exemption
falseExample: trueStates whether the user can create or reopen the exemption
falseExample: trueStates if the user can re-approve the exemption for the exemption's scope
falseExample: trueStates whether the user can reject the exemption
falseExample: trueThe additional comment to include with the exemption
This exemption was reviewed by the security team.Unix timestamp at which the resource was created
1651578240Exemption's status at the Security Scan created time
PendingPossible values: Unix timestamp at which this Exemption will expire
1651578240Resource identifier
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$States if the exemption is deleted
falseExample: trueIssue ID associated with the Exemption
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Unix timestamp at which the resource was most recently modified
1651578240Link to a related ticket
https://example.com/ABC-1234States how may occurrences are associated with the exemption, if not an issue level exemption
0Example: 10Array of occurrence Ids
[42,666]ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Name of the organization associated with the exemption
Organization NameID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".
your_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Name of the project associated with the exemption
Project NameText describing why this Exemption is necessary
Waiting on upstream bug fixUnix timestamp of the exemption's current request. Updates each time the exemption is reopened; falls back to the original creation time when never reopened.
1651578240Email of the user who requested this Exemption
user@harness.ioUser ID of the user who requested this Exemption
user111111111111111111Name of the user who requested this Exemption
firstname lastnameUnix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.
1651578240ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$States the scope for the exemption
PROJECTPossible values: Search parameter to find filtered occurrences of the issue
CWE-123,5Approval status of Exemption
PendingExample: RejectedPossible values: ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)
OtherPossible values: BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
PUT /gateway/sto/api/v2/exemptions/{id}/{action}?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: 123
{
"comment": "This is a comment for the approval or rejection of the exemption",
"pendingChangesOverride": {
"durationDays": 30
}
}{
"approverEmail": "user@harness.io",
"approverId": "user111111111111111111",
"approverName": "firstname lastname",
"canApproveFor": [
"ACCOUNT",
"ORG",
"PROJECT",
"PIPELINE"
],
"canCancel": true,
"canCreate": true,
"canReApprove": true,
"canReject": true,
"comment": "This exemption was reviewed by the security team.",
"created": 1651578240,
"exemptionStatusAtScan": "Pending",
"expiration": 1651578240,
"id": "abcdef1234567890ghijkl",
"isDeleted": true,
"issueId": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"link": "https://example.com/ABC-1234",
"numOccurrences": 10,
"occurrences": [
42,
666
],
"orgId": "your_project",
"orgName": "Organization Name",
"pendingChanges": {
"durationDays": 7
},
"pipelineId": "your_pipeline",
"projectId": "your_project",
"projectName": "Project Name",
"reason": "Waiting on upstream bug fix",
"requestedOn": 1651578240,
"requesterEmail": "user@harness.io",
"requesterId": "user111111111111111111",
"requesterName": "firstname lastname",
"reviewedOn": 1651578240,
"scanId": "abcdef1234567890ghijkl",
"scope": "PROJECT",
"search": "CWE-123,5",
"status": "Canceled",
"targetId": "abcdef1234567890ghijkl",
"type": "Other"
}Promote an existing Exemption to a higher scope
The ID of the Exemption to promote
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness personal or service access token
Expedita pariatur aut dignissimos excepturi eos.Comment to be added to the Exemption approval or rejection
This is a comment for the approval or rejection of the exemptionHarness STO pipeline ID
abcdef1234567890ghijklPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness STO Target ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$OK response.
Information about an Exemption
Email of the user who approved this Exemption
user@harness.ioUser ID the user who approved or rejected this exemptions
user111111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$Name of the user who approved this Exemption
firstname lastnameStates if the user can cancel the exemption
falseExample: trueStates whether the user can create or reopen the exemption
falseExample: trueStates if the user can re-approve the exemption for the exemption's scope
falseExample: trueStates whether the user can reject the exemption
falseExample: trueThe additional comment to include with the exemption
This exemption was reviewed by the security team.Unix timestamp at which the resource was created
1651578240Exemption's status at the Security Scan created time
PendingPossible values: Unix timestamp at which this Exemption will expire
1651578240Resource identifier
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$States if the exemption is deleted
falseExample: trueIssue ID associated with the Exemption
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Unix timestamp at which the resource was most recently modified
1651578240Link to a related ticket
https://example.com/ABC-1234States how may occurrences are associated with the exemption, if not an issue level exemption
0Example: 10Array of occurrence Ids
[42,666]ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Name of the organization associated with the exemption
Organization NameID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".
your_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Name of the project associated with the exemption
Project NameText describing why this Exemption is necessary
Waiting on upstream bug fixUnix timestamp of the exemption's current request. Updates each time the exemption is reopened; falls back to the original creation time when never reopened.
1651578240Email of the user who requested this Exemption
user@harness.ioUser ID of the user who requested this Exemption
user111111111111111111Name of the user who requested this Exemption
firstname lastnameUnix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.
1651578240ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$States the scope for the exemption
PROJECTPossible values: Search parameter to find filtered occurrences of the issue
CWE-123,5Approval status of Exemption
PendingExample: RejectedPossible values: ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)
OtherPossible values: BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
NotFound: Not Found response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
PUT /gateway/sto/api/v2/exemptions/{id}/promote?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: 197
{
"comment": "This is a comment for the approval or rejection of the exemption",
"pendingChangesOverride": {
"durationDays": 30
},
"pipelineId": "abcdef1234567890ghijkl",
"targetId": "abcdef1234567890ghijkl"
}{
"approverEmail": "user@harness.io",
"approverId": "user111111111111111111",
"approverName": "firstname lastname",
"canApproveFor": [
"ACCOUNT",
"ORG",
"PROJECT",
"PIPELINE"
],
"canCancel": true,
"canCreate": true,
"canReApprove": true,
"canReject": true,
"comment": "This exemption was reviewed by the security team.",
"created": 1651578240,
"exemptionStatusAtScan": "Pending",
"expiration": 1651578240,
"id": "abcdef1234567890ghijkl",
"isDeleted": true,
"issueId": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"link": "https://example.com/ABC-1234",
"numOccurrences": 10,
"occurrences": [
42,
666
],
"orgId": "your_project",
"orgName": "Organization Name",
"pendingChanges": {
"durationDays": 7
},
"pipelineId": "your_pipeline",
"projectId": "your_project",
"projectName": "Project Name",
"reason": "Waiting on upstream bug fix",
"requestedOn": 1651578240,
"requesterEmail": "user@harness.io",
"requesterId": "user111111111111111111",
"requesterName": "firstname lastname",
"reviewedOn": 1651578240,
"scanId": "abcdef1234567890ghijkl",
"scope": "PROJECT",
"search": "CWE-123,5",
"status": "Canceled",
"targetId": "abcdef1234567890ghijkl",
"type": "Other"
}Create multiple Exemptions in bulk. The batch is all-or-none for policy violations: if any item would violate an exemption rule, the entire batch is rejected with HTTP 400 and a single error message naming the failing issue and rule (no DB writes happen). Infrastructure failures (DB constraint violations, transaction errors) also fail the entire batch and are surfaced per-item in the response body so ops can diagnose which item triggered the failure.
Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness personal or service access token
Ducimus cupiditate.Whether to exempt future occurrences of each issue
trueExample: falseUnix timestamp at which these Exemptions will expire
1651578240Link to a related ticket
https://example.com/ABC-1234Text describing why these Exemptions are necessary
Waiting on upstream bug fixEmail of the user who requested these Exemptions
user@harness.ioName of the user who requested these Exemptions
firstname lastnameType of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)
OtherPossible values: OK response.
Number of failed exemption creations
1Number of successfully created exemptions
5BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
POST /gateway/sto/api/v2/exemptions/bulk?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
Content-Type: application/json
Accept: */*
Content-Length: 627
{
"exemptFutureOccurrences": false,
"expiration": 1651578240,
"items": [
{
"issueId": "abcdef1234567890ghijkl",
"occurrences": [
42,
666
],
"pipelineId": "your_pipeline",
"scanId": "abcdef1234567890ghijkl",
"search": "CWE-123,5",
"targetId": "abcdef1234567890ghijkl"
},
{
"issueId": "abcdef1234567890ghijkl",
"occurrences": [
42,
666
],
"pipelineId": "your_pipeline",
"scanId": "abcdef1234567890ghijkl",
"search": "CWE-123,5",
"targetId": "abcdef1234567890ghijkl"
}
],
"link": "https://example.com/ABC-1234",
"pendingChanges": {
"durationDays": 7
},
"reason": "Waiting on upstream bug fix",
"requesterEmail": "user@harness.io",
"requesterName": "firstname lastname",
"type": "Other"
}{
"failed": 1,
"results": [
{
"error": "\"targetId\" must be specified when \"exempt future occurrences\" is disabled",
"id": "abcdef1234567890ghijkl",
"issueId": "abcdef1234567890ghijkl",
"statusCode": 201
},
{
"error": "\"targetId\" must be specified when \"exempt future occurrences\" is disabled",
"id": "abcdef1234567890ghijkl",
"issueId": "abcdef1234567890ghijkl",
"statusCode": 201
},
{
"error": "\"targetId\" must be specified when \"exempt future occurrences\" is disabled",
"id": "abcdef1234567890ghijkl",
"issueId": "abcdef1234567890ghijkl",
"statusCode": 201
}
],
"succeeded": 5
}Get the highest-priority exemption for an issue across all scopes (account, org, project)
Issue ID to find exemption for
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness personal or service access token
Vel ducimus nihil.OK response.
Information about an Exemption
Email of the user who approved this Exemption
user@harness.ioUser ID the user who approved or rejected this exemptions
user111111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$Name of the user who approved this Exemption
firstname lastnameStates if the user can cancel the exemption
falseExample: trueStates whether the user can create or reopen the exemption
falseExample: trueStates if the user can re-approve the exemption for the exemption's scope
falseExample: trueStates whether the user can reject the exemption
falseExample: trueThe additional comment to include with the exemption
This exemption was reviewed by the security team.Unix timestamp at which the resource was created
1651578240Exemption's status at the Security Scan created time
PendingPossible values: Unix timestamp at which this Exemption will expire
1651578240Resource identifier
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$States if the exemption is deleted
falseExample: trueIssue ID associated with the Exemption
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Unix timestamp at which the resource was most recently modified
1651578240Link to a related ticket
https://example.com/ABC-1234States how may occurrences are associated with the exemption, if not an issue level exemption
0Example: 10Array of occurrence Ids
[42,666]ID of the Harness Organization to which the exemption applies. Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Name of the organization associated with the exemption
Organization NameID of the Harness Pipeline to which the exemption applies. You must also specify "projectId" and "orgId". Cannot be specified alongside "targetId".
your_pipelinePattern: ^[A-Za-z_][A-Za-z0-9_]*$ID of the Harness Project to which the exemption applies. You must also specify "orgId". Cannot be specified alongside "targetId".
your_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Name of the project associated with the exemption
Project NameText describing why this Exemption is necessary
Waiting on upstream bug fixUnix timestamp of the exemption's current request. Updates each time the exemption is reopened; falls back to the original creation time when never reopened.
1651578240Email of the user who requested this Exemption
user@harness.ioUser ID of the user who requested this Exemption
user111111111111111111Name of the user who requested this Exemption
firstname lastnameUnix timestamp when this exemption was reviewed (approved or rejected). Populated only for approved and rejected exemptions.
1651578240ID of the Harness Scan to determine all the occurrences for the scan-issue. You must also specify "projectId", "orgId" and "targetId". Cannot be specified alongside "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$States the scope for the exemption
PROJECTPossible values: Search parameter to find filtered occurrences of the issue
CWE-123,5Approval status of Exemption
PendingExample: RejectedPossible values: ID of the Target to which the exemption applies. Cannot be specified alongside "projectId" or "pipelineId".
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Type of Exemption (Compensating Controls / Acceptable Use / Acceptable Risk / False Positive / Fix Unavailable / Other)
OtherPossible values: BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/exemptions/issue/{issueId}?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"approverEmail": "user@harness.io",
"approverId": "user111111111111111111",
"approverName": "firstname lastname",
"canApproveFor": [
"ACCOUNT",
"ORG",
"PROJECT",
"PIPELINE"
],
"canCancel": true,
"canCreate": true,
"canReApprove": true,
"canReject": true,
"comment": "This exemption was reviewed by the security team.",
"created": 1651578240,
"exemptionStatusAtScan": "Pending",
"expiration": 1651578240,
"id": "abcdef1234567890ghijkl",
"isDeleted": true,
"issueId": "abcdef1234567890ghijkl",
"lastModified": 1651578240,
"link": "https://example.com/ABC-1234",
"numOccurrences": 10,
"occurrences": [
42,
666
],
"orgId": "your_project",
"orgName": "Organization Name",
"pendingChanges": {
"durationDays": 7
},
"pipelineId": "your_pipeline",
"projectId": "your_project",
"projectName": "Project Name",
"reason": "Waiting on upstream bug fix",
"requestedOn": 1651578240,
"requesterEmail": "user@harness.io",
"requesterId": "user111111111111111111",
"requesterName": "firstname lastname",
"reviewedOn": 1651578240,
"scanId": "abcdef1234567890ghijkl",
"scope": "PROJECT",
"search": "CWE-123,5",
"status": "Canceled",
"targetId": "abcdef1234567890ghijkl",
"type": "Other"
}Paginated flat timeline of exemption history events for an issue
Issue ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Page number to fetch (starting from 0)
0Example: 4Number of results per page
30Example: 50Harness pipeline ID. When set with targetId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.
sto-core-ciPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness target ID. When set with pipelineId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.
target1111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$Harness personal or service access token
Recusandae omnis.OK response.
BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/exemptions/issue/{issueId}/history?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"events": [
{
"comment": "kno",
"commenterEmail": "priya.nair@harness.io",
"commenterId": "user111111111111111111",
"commenterName": "Priya Nair",
"created": 1781391060,
"durationDays": 1863109692595423000,
"exemptedOccurrenceCount": 5259068024927412000,
"exemptionId": "exmp111111111111111111",
"expiration": 352069224179804000,
"id": "hist111111111111111111",
"isAutoExpiry": false,
"isOccurrenceLevel": false,
"orgId": "Nobis pariatur eos voluptatibus nesciunt similique dolor.",
"orgName": "Default",
"pipelineId": "Rem ullam explicabo.",
"pipelineName": "STO Core CI",
"projectId": "Nulla magnam assumenda doloremque consectetur.",
"projectName": "STO Core",
"reasonType": "Compensating Controls",
"scope": "ORG",
"status": "Rejected",
"targetId": "Est reiciendis labore quis et.",
"targetName": "sto-core"
},
{
"comment": "kno",
"commenterEmail": "priya.nair@harness.io",
"commenterId": "user111111111111111111",
"commenterName": "Priya Nair",
"created": 1781391060,
"durationDays": 1863109692595423000,
"exemptedOccurrenceCount": 5259068024927412000,
"exemptionId": "exmp111111111111111111",
"expiration": 352069224179804000,
"id": "hist111111111111111111",
"isAutoExpiry": false,
"isOccurrenceLevel": false,
"orgId": "Nobis pariatur eos voluptatibus nesciunt similique dolor.",
"orgName": "Default",
"pipelineId": "Rem ullam explicabo.",
"pipelineName": "STO Core CI",
"projectId": "Nulla magnam assumenda doloremque consectetur.",
"projectName": "STO Core",
"reasonType": "Compensating Controls",
"scope": "ORG",
"status": "Rejected",
"targetId": "Est reiciendis labore quis et.",
"targetName": "sto-core"
},
{
"comment": "kno",
"commenterEmail": "priya.nair@harness.io",
"commenterId": "user111111111111111111",
"commenterName": "Priya Nair",
"created": 1781391060,
"durationDays": 1863109692595423000,
"exemptedOccurrenceCount": 5259068024927412000,
"exemptionId": "exmp111111111111111111",
"expiration": 352069224179804000,
"id": "hist111111111111111111",
"isAutoExpiry": false,
"isOccurrenceLevel": false,
"orgId": "Nobis pariatur eos voluptatibus nesciunt similique dolor.",
"orgName": "Default",
"pipelineId": "Rem ullam explicabo.",
"pipelineName": "STO Core CI",
"projectId": "Nulla magnam assumenda doloremque consectetur.",
"projectName": "STO Core",
"reasonType": "Compensating Controls",
"scope": "ORG",
"status": "Rejected",
"targetId": "Est reiciendis labore quis et.",
"targetName": "sto-core"
},
{
"comment": "kno",
"commenterEmail": "priya.nair@harness.io",
"commenterId": "user111111111111111111",
"commenterName": "Priya Nair",
"created": 1781391060,
"durationDays": 1863109692595423000,
"exemptedOccurrenceCount": 5259068024927412000,
"exemptionId": "exmp111111111111111111",
"expiration": 352069224179804000,
"id": "hist111111111111111111",
"isAutoExpiry": false,
"isOccurrenceLevel": false,
"orgId": "Nobis pariatur eos voluptatibus nesciunt similique dolor.",
"orgName": "Default",
"pipelineId": "Rem ullam explicabo.",
"pipelineName": "STO Core CI",
"projectId": "Nulla magnam assumenda doloremque consectetur.",
"projectName": "STO Core",
"reasonType": "Compensating Controls",
"scope": "ORG",
"status": "Rejected",
"targetId": "Est reiciendis labore quis et.",
"targetName": "sto-core"
}
],
"pagination": {
"link": "",
"page": 4,
"pageSize": 20,
"totalItems": 230,
"totalPages": 12
}
}CSV export of the full exemption history timeline for an issue (fetch-all, no pagination)
Issue ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Account ID
abcdef1234567890ghijklPattern: ^[a-zA-Z0-9_-]{22}$Harness Organization ID
example_orgPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness Project ID
example_projectPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness pipeline ID. When set with targetId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.
sto-core-ciPattern: ^[A-Za-z_][A-Za-z0-9_]*$Harness target ID. When set with pipelineId, scopes history to that pipeline/target (Vulnerabilities tab). Requires orgId and projectId.
target1111111111111111Pattern: ^[a-zA-Z0-9_-]{22}$Harness personal or service access token
Sed voluptatem.OK response.
Suggested filename for download
Totam omnis.CSV column headers
["Explicabo consequatur numquam commodi.","Voluptates incidunt in velit illo aut laboriosam.","Dolorum dolores optio delectus tenetur labore occaecati.","Omnis impedit sunt."]Issue ID for this export
Eaque qui eaque.Total number of data rows
9133896228551028000BadRequest: Bad Request response.
Unauthorized: Unauthorized response.
Forbidden: Forbidden response.
TooManyRequests: Too Many Requests response.
InternalServerError: Internal Server Error response.
GET /gateway/sto/api/v2/exemptions/issue/{issueId}/history/export?accountId=abcdef1234567890ghijkl HTTP/1.1
Host: app.harness.io
X-Api-Key: YOUR_API_KEY
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
"data": [
[
"Et enim itaque laborum totam.",
"Eligendi distinctio sequi porro asperiores labore.",
"Voluptatem sapiente perspiciatis debitis aut.",
"Minima quas ducimus blanditiis voluptas."
],
[
"Voluptatem eum nam sunt qui animi laborum.",
"Ullam eos expedita impedit aut."
],
[
"Voluptatem quisquam veritatis.",
"Qui est."
],
[
"Accusantium voluptas facere autem tenetur et.",
"Quia tempora nobis minima."
]
],
"filename": "Eum aut et qui eos rem.",
"headers": [
"Quis cupiditate.",
"Omnis ipsum repellendus et.",
"Tempore nisi."
],
"issueId": "Iure illum ipsam accusantium.",
"totalRows": 169356730981085800
}Last updated
Was this helpful?