-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
311 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,267 @@ | ||
{ | ||
"openapi": "3.0.1", | ||
"info": { | ||
"title": "OpenAPI definition", | ||
"version": "v0" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "https://api.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api2.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api3.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api4.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api.anz.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api.eu.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api2.eu.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api.gov.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api.prismacloud.cn" | ||
}, | ||
{ | ||
"url": "https://api.ca.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api.sg.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api.uk.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api.ind.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api.jp.prismacloud.io" | ||
}, | ||
{ | ||
"url": "https://api.fr.prismacloud.io" | ||
} | ||
], | ||
"tags": [ | ||
{ | ||
"name": "Alerts", | ||
"description": "..." | ||
} | ||
], | ||
"paths": { | ||
"/policy/api/v1/fetch/remediation/{policyId}": { | ||
"get": { | ||
"tags": [ | ||
"Alerts" | ||
], | ||
"summary": "Get Policy Remediation", | ||
"description": "Fetch AI Assisted Remediation and Recommendation content for a given policy. If AI Assisted Remediation is not available, fetch the recommendation content instead. The remediation typically includes actionable steps to mitigate or remediate the identified alert on the asset.", | ||
"operationId": "getRemediationForPolicy", | ||
"parameters": [ | ||
{ | ||
"name": "policyId", | ||
"in": "path", | ||
"required": true, | ||
"schema": { | ||
"type": "string" | ||
} | ||
}, | ||
{ | ||
"name": "unifiedAssetId", | ||
"in": "query", | ||
"required": true, | ||
"schema": { | ||
"type": "string" | ||
} | ||
}, | ||
{ | ||
"name": "alertId", | ||
"in": "query", | ||
"required": true, | ||
"schema": { | ||
"type": "string" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "success", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/PolicyWithRemediationResponse" | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"description": "bad_request" | ||
}, | ||
"401": { | ||
"description": "unauthorized_access" | ||
}, | ||
"403": { | ||
"description": "permission_error" | ||
}, | ||
"429": { | ||
"description": "too_many_requests" | ||
} | ||
}, | ||
"x-public": "true", | ||
"security": [ | ||
{ | ||
"x-redlock-auth": [] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"AiRemediation": { | ||
"type": "object", | ||
"properties": { | ||
"manualRemediation": { | ||
"$ref": "#/components/schemas/ManualRemediation" | ||
}, | ||
"cli": { | ||
"type": "array", | ||
"description": "The suggested CLI-based remediation steps", | ||
"items": { | ||
"$ref": "#/components/schemas/ScriptRemediation" | ||
} | ||
}, | ||
"tf": { | ||
"type": "array", | ||
"description": "The suggested Terraform-based remediation steps", | ||
"items": { | ||
"$ref": "#/components/schemas/ScriptRemediation" | ||
} | ||
} | ||
} | ||
}, | ||
"ManualRemediation": { | ||
"type": "object", | ||
"properties": { | ||
"title": { | ||
"type": "string", | ||
"description": "A title for the manual remediation steps" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "A description of the remediation content" | ||
}, | ||
"instructions": { | ||
"type": "string", | ||
"description": "Detailed instructions to manually remediate the issue" | ||
}, | ||
"impact": { | ||
"type": "string", | ||
"description": "The potential impact of applying the remediation" | ||
} | ||
}, | ||
"description": "The manual remediation steps to be taken" | ||
}, | ||
"PolicyWithRemediation": { | ||
"type": "object", | ||
"properties": { | ||
"policyId": { | ||
"type": "string" | ||
}, | ||
"policyName": { | ||
"type": "string" | ||
}, | ||
"policyType": { | ||
"type": "string" | ||
}, | ||
"cloudType": { | ||
"type": "string", | ||
"enum": [ | ||
"all", | ||
"aws", | ||
"azure", | ||
"gcp", | ||
"alibaba_cloud", | ||
"oci", | ||
"other", | ||
"ibm" | ||
] | ||
}, | ||
"findingTypes": { | ||
"uniqueItems": true, | ||
"type": "array", | ||
"items": { | ||
"type": "string" | ||
} | ||
}, | ||
"aiRemediation": { | ||
"$ref": "#/components/schemas/AiRemediation" | ||
}, | ||
"recommendation": { | ||
"type": "string" | ||
}, | ||
"hasSearchExecutionSupport": { | ||
"type": "boolean" | ||
}, | ||
"savedSearchId": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"PolicyWithRemediationResponse": { | ||
"type": "object", | ||
"properties": { | ||
"value": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/PolicyWithRemediation" | ||
} | ||
} | ||
} | ||
}, | ||
"ScriptRemediation": { | ||
"type": "object", | ||
"properties": { | ||
"title": { | ||
"type": "string", | ||
"description": "A title for the remediation script to be executed" | ||
}, | ||
"description": { | ||
"type": "string", | ||
"description": "A description of the remediation content" | ||
}, | ||
"codeBlock": { | ||
"type": "string", | ||
"description": "The suggested code block to be executed for remediation" | ||
}, | ||
"impact": { | ||
"type": "string", | ||
"description": "The potential impact of applying the remediation" | ||
}, | ||
"automated": { | ||
"type": "boolean", | ||
"description": "can be executed automatically without manual intervention" | ||
} | ||
}, | ||
"description": "The suggested Terraform-based remediation steps" | ||
} | ||
}, | ||
"securitySchemes": { | ||
"x-redlock-auth": { | ||
"description": "The x-redlock-auth value is a JSON Web Token (JWT).", | ||
"in": "header", | ||
"name": "x-redlock-auth", | ||
"type": "apiKey" | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters