{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://raw.githubusercontent.com/api-evangelist/harness/main/json-schema/harness-create-compliance-result-v2-schema.json", "title": "CreateComplianceResultV2", "x-generated": "2026-10-04", "x-method": "derived", "x-generator": "derive-json-schema.py", "x-source": "openapi/harness-complianceresultsv2-api-openapi.yml#/components/schemas/CreateComplianceResultV2", "type": "object", "x-stoplight": { "id": "16fsbiusxpwm1" }, "required": [ "url", "name", "scan_type", "source_platform", "results" ], "properties": { "url": { "type": "string", "x-stoplight": { "id": "jnajrpongor60" }, "description": "Represents Source URL." }, "org": { "type": "string", "x-stoplight": { "id": "4v0893lp7mtr8" }, "description": "Represents organization." }, "name": { "type": "string", "x-stoplight": { "id": "gsuu5ghgjctvu" }, "description": "Name of entity for compliance results." }, "full_fqn": { "type": "string", "x-stoplight": { "id": "urjujxeot10dk" }, "description": "Fully qualified name of entity. \nUses entire URL and name to depict same." }, "default_branch": { "type": "string", "description": "Branch for scan." }, "scan_type": { "$ref": "#/$defs/ComplianceScanType" }, "source_platform": { "x-stoplight": { "id": "9v0at3udg36rh" }, "type": "string", "enum": [ "GITHUB", "HARNESS" ], "description": "Source platform enum. \nExample: GITHUB, HARNESS" }, "step_execution_identifier": { "type": "string" }, "pipeline_execution_identifier": { "type": "string" }, "pipeline_identifier": { "type": "string", "x-stoplight": { "id": "jypmkd8wicqlh" } }, "stage_execution_identifier": { "type": "string" }, "results": { "type": "array", "items": { "$ref": "#/$defs/ComplianceResult" } }, "plugins": { "type": "array", "x-stoplight": { "id": "8ti0weon56jlx" }, "items": { "$ref": "#/$defs/PluginDTO" } }, "stage_type": { "type": "string", "x-stoplight": { "id": "zyzsfpyieg5to" } } }, "$defs": { "ComplianceCheckEntityType": { "title": "ComplianceCheckEntityType", "type": "string", "x-stoplight": { "id": "c9u1ph0w9r2pc" }, "enum": [ "REPOSITORY", "ORGANIZATION", "BRANCH", "PACKAGEREGISTRY", "PIPELINE", "DEPENDENCIES", "All" ], "description": "Represents entity type on which compliance check is applicable" }, "ComplianceCheckSeverity": { "title": "ComplianceCheckSeverity", "type": "string", "x-stoplight": { "id": "kpbii4pjiw1ff" }, "enum": [ "CRITICAL", "HIGH", "MEDIUM", "LOW" ] }, "ComplianceOccurrenceDTO": { "title": "ComplianceOccurrenceDTO", "x-stoplight": { "id": "5kz1r0wmqqtb9" }, "type": "object", "properties": { "snippet": { "type": "string", "x-stoplight": { "id": "tou5xin4shjem" }, "description": "Depicts occurrence snippet." }, "snippet_url": { "type": "string", "x-stoplight": { "id": "elke0tcie443g" }, "description": "URL to go to snippet" }, "line_number": { "type": "integer", "x-stoplight": { "id": "r956qlsf9zrc0" }, "description": "Line number of snippet." } } }, "ComplianceResult": { "type": "object", "required": [ "compliance_id", "compliance_val", "category", "category_id", "standards", "severity", "reason", "status", "remediation", "entity", "sub_category", "sub_category_id" ], "properties": { "compliance_id": { "type": "string", "x-stoplight": { "id": "l9pks9athcp51" } }, "compliance_val": { "type": "integer", "x-stoplight": { "id": "u21ksorb3iewy" } }, "title": { "type": "string" }, "category": { "type": "string" }, "category_id": { "type": "string", "x-stoplight": { "id": "kg7ooi3esk292" } }, "standards": { "type": "array", "items": { "$ref": "#/$defs/ComplianceStandardType" } }, "description": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "severity": { "$ref": "#/$defs/ComplianceCheckSeverity" }, "reason": { "type": "string" }, "status": { "$ref": "#/$defs/ComplianceResultStatus" }, "remediation": { "type": "string" }, "url": { "type": "string" }, "entity": { "$ref": "#/$defs/ComplianceCheckEntityType" }, "sub_category": { "type": "string", "x-stoplight": { "id": "t6uyz63sy5k68" } }, "sub_category_id": { "type": "string", "x-stoplight": { "id": "gz47g56itzdmu" } }, "occurrences": { "type": "array", "x-stoplight": { "id": "zgqjsm3l2x3xr" }, "items": { "$ref": "#/$defs/ComplianceOccurrenceDTO" } } }, "x-stoplight": { "id": "sxoz6cpmag92w" } }, "ComplianceResultStatus": { "title": "ComplianceResultStatus", "type": "string", "x-stoplight": { "id": "g7eq9rgfjalfb" }, "enum": [ "PASSED", "FAILED", "UNKNOWN" ] }, "ComplianceScanType": { "title": "ComplianceScanType", "x-stoplight": { "id": "xofqrlg94b1o5" }, "type": "string", "enum": [ "REPOSITORY", "CICD" ], "description": "Type of scan on the source like Repository scan or Worklfow scan" }, "ComplianceStandardType": { "title": "ComplianceStandardType", "type": "string", "x-stoplight": { "id": "hqwyia5x65e2x" }, "enum": [ "CIS", "OWASP" ] }, "PluginDTO": { "title": "PluginDTO", "x-stoplight": { "id": "6h45p8xhj8nyq" }, "type": "object", "properties": { "name": { "type": "string", "x-stoplight": { "id": "imeroxjtaijgs" } }, "version": { "type": "string", "x-stoplight": { "id": "emdtllba1deoe" } }, "path_from_root": { "type": "string", "x-stoplight": { "id": "j7spynufi3rvf" } } }, "description": "Represents workflow images/plugin/actions found for CI/CD workflows scan." } } }