Internal API for fetching custom email templates and images from core server
Code Insight REST API Documentation (v1)
The Code Insight REST APIs provide a standardized interface for interacting with the application.
An authorization JWT token must be included in the HTTP Authorization header using the Bearer schema. The token can be obtained from the Code Insight Web UI under the Preferences menu. To set the token, click the Authorize button below on the right, enter the JWT token in the Value field, then click Authorize and close the dialog. Once authorized, the token will be automatically included in the HTTP Authorization header for all API requests made through the Swagger UI.
Note: If accessing the REST APIs through external tools such as curl or Postman, include the token manually in the HTTP header using the following format: Authorization: Bearer JWT_TOKEN. "Bearer" must precede the actual JWT token value.
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/vulnerability/suppress
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/vulnerability/suppress
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/vulnerability/suppress?componentId=1&vulnerabilityName=string&limit=25&offset=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "itemNumber": 0, "suppressId": 0, "suppressionScope": "string", "vulnerabilityId": 0, "vulnerabilityName": "string", "componentId": 0, "componentName": "string", "suppressedBy": "string", "suppressedDate": "string", "suppressionDetails": [ { … } ], "componentVersionIds": [ 0 ] }
Request
Suppress vulnerability for component version(s). System administrator only has permission for global suppression, while Developer/Security contact have permission for project-specific suppression.
Note: For GLOBAL level suppression, providing suppression details is not necessary. These details are only required for PROJECT level suppression and will be ignored if provided in the GLOBAL scope.
- The default value for the Suppression Scope will be considered GLOBAL if left empty.
Input model to suppress vulnerability for component versions.
versionScope
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/vulnerability/suppress
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/vulnerability/suppress
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://codeinsightapi.redocly.app/_mock/swagger/vulnerability/suppress \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"componentId": 1,
"versionIds": [
0
],
"vulnerabilityName": "Vulnerability Name",
"reason": "FALSE_POSITIVE|REMEDIATED|OTHER",
"remarks": "Remarks to Suppress Vulnerability",
"versionScope": "SPECIFIC_VERSIONS|ALL_CURRENT_VERSIONS",
"suppressionScope": "GLOBAL|PROJECT",
"suppressionDetails": {
"projectId": 123,
"state": "RESOLVED|RESOLVED_WITH_PEDIGREE|EXPLOITABLE|IN_TRIAGE|FALSE_POSITIVE",
"justification": "CODE_NOT_PRESENT|CODE_NOT_REACHABLE|REQUIRES_CONFIGURATION|REQUIRES_DEPENDENCY|REQUIRES_ENVIRONMENT|PROTECTED_BY_COMPILER|PROTECTED_AT_RUNTIME|PROTECTED_AT_PERIMETER|PROTECTED_BY_MITIGATING_CONTROL",
"response": "CAN_NOT_FIX|WILL_NOT_FIX|UPDATE|ROLLBACK|WORKAROUND_AVAILABLE"
}
}'{ "componentId": 1, "versionIds": [ 0 ], "vulnerabilityName": "Vulnerability Name", "reason": "FALSE_POSITIVE|REMEDIATED|OTHER", "remarks": "Remarks to Suppress Vulnerability", "versionScope": "SPECIFIC_VERSIONS|ALL_CURRENT_VERSIONS", "suppressionScope": "GLOBAL|PROJECT", "suppressionDetails": { "projectId": 123, "state": "RESOLVED|RESOLVED_WITH_PEDIGREE|EXPLOITABLE|IN_TRIAGE|FALSE_POSITIVE", "justification": "CODE_NOT_PRESENT|CODE_NOT_REACHABLE|REQUIRES_CONFIGURATION|REQUIRES_DEPENDENCY|REQUIRES_ENVIRONMENT|PROTECTED_BY_COMPILER|PROTECTED_AT_RUNTIME|PROTECTED_AT_PERIMETER|PROTECTED_BY_MITIGATING_CONTROL", "response": "CAN_NOT_FIX|WILL_NOT_FIX|UPDATE|ROLLBACK|WORKAROUND_AVAILABLE" } }
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/vulnerability/suppress/details
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/vulnerability/suppress/details
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
'https://codeinsightapi.redocly.app/_mock/swagger/vulnerability/suppress/details?suppressId=1&componentVersionId=1&limit=25&offset=1' \
-H 'Authorization: Bearer <YOUR_JWT_HERE>'{ "suppressId": 0, "vulnerabilityName": "string", "componentName": "string", "versionId": 0, "versionName": "string", "suppressedReason": "string", "suppressedRemarks": "string", "suppressedBy": "string", "suppressedDate": "string" }
Request
UnSuppress a vulnerability for given component versions. System administrator only has permission for Global un-suppression, while Developer/Security contact have permission for Project-specific un-suppression.
Note: If a project ID is provided, the un-suppression occurs at the PROJECT level, otherwise, it happens at the GLOBAL level.
Input model to unSuppress vulnerability
- Mock serverhttps://codeinsightapi.redocly.app/_mock/swagger/vulnerability/unSuppress
- Code Insight REST API Serverhttps://codeinsightapi.redocly.app/codeinsight/api/vulnerability/unSuppress
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
https://codeinsightapi.redocly.app/_mock/swagger/vulnerability/unSuppress \
-H 'Authorization: Bearer <YOUR_JWT_HERE>' \
-H 'Content-Type: application/json' \
-d '{
"vulnerabilityName": "Vulnerability Name",
"componentId": 1,
"versionIds": [
0
],
"remarks": "Remarks to Unsuppress Vulnerability",
"projectId": 1
}'