Skip to main content
GET
/
projects
/
{projectId}
/
scans
/
{scanId}
/
compliance
Get compliance result for a scan
curl --request GET \
  --url https://api-eu.cybedefend.com/projects/{projectId}/scans/{scanId}/compliance
{
  "scanId": "550e8400-e29b-41d4-a716-446655440001",
  "projectId": "550e8400-e29b-41d4-a716-446655440002",
  "status": "COMPLETED",
  "evaluationId": "550e8400-e29b-41d4-a716-446655440000",
  "result": {
    "compliant": false,
    "blockingViolationsCount": 2,
    "warningViolationsCount": 5,
    "totalViolationsCount": 7,
    "evaluatedAt": "2024-01-15T10:31:00Z",
    "breakingRulesCount": 2,
    "exitCode": 1,
    "summary": "Policy check failed: 2 critical violations found.",
    "evaluatedPoliciesCount": 3
  },
  "violations": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "policyId": "550e8400-e29b-41d4-a716-446655440001",
      "projectId": "550e8400-e29b-41d4-a716-446655440002",
      "scanId": "550e8400-e29b-41d4-a716-446655440003",
      "organizationId": "550e8400-e29b-41d4-a716-446655440004",
      "actionTaken": "BLOCK",
      "affectedVulnerabilitiesCount": 12,
      "rule": {
        "id": "<string>",
        "name": "<string>",
        "type": "<string>",
        "action": "<string>",
        "description": "<string>",
        "value": {},
        "operator": "<string>",
        "criteria": [
          {
            "id": "<string>",
            "name": "<string>",
            "type": "<string>",
            "description": "<string>",
            "value": {},
            "operator": "<string>"
          }
        ]
      },
      "createdAt": "2024-01-15T10:30:00Z",
      "updatedAt": "2024-01-15T10:30:00Z",
      "affectedVulnerabilities": [
        {
          "id": "<string>",
          "name": "<string>",
          "severity": "<string>",
          "vulnerabilityType": "<string>",
          "cvssScore": 123,
          "cwe": [
            "<string>"
          ],
          "owaspTop10": [
            "<string>"
          ],
          "filePath": "<string>",
          "startLine": 123,
          "endLine": 123,
          "branch": "<string>",
          "packageName": "<string>",
          "packageVersion": "<string>",
          "artifactName": "<string>"
        }
      ]
    }
  ],
  "error": "<string>"
}

Path Parameters

projectId
string<uuid>
required
scanId
string<uuid>
required

Query Parameters

evaluationId
string

Specific evaluation ID (optional)

Response

200 - application/json

Compliance result

scanId
string
required

Scan ID that was evaluated

Example:

"550e8400-e29b-41d4-a716-446655440001"

projectId
string
required

Project ID

Example:

"550e8400-e29b-41d4-a716-446655440002"

status
enum<string>
required

Evaluation status

Available options:
PENDING,
IN_PROGRESS,
COMPLETED,
FAILED,
NOT_STARTED
Example:

"COMPLETED"

evaluationId
string

Evaluation ID (may not be available)

Example:

"550e8400-e29b-41d4-a716-446655440000"

result
object

Compliance result (only present when completed)

violations
object[]

Violations found during evaluation

error
string

Error message if evaluation failed