{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "title": "Security Knowledge inspection report (no secret values)",
  "type": "object",
  "properties": {
    "schemaVersion": {
      "const": "1.0.0"
    },
    "catalogHash": {
      "type": "string",
      "minLength": 1,
      "pattern": "^[a-f0-9]{64}$"
    },
    "environment": {
      "type": "string",
      "minLength": 1
    },
    "environmentRevision": {
      "type": "string",
      "minLength": 1
    },
    "checkedAt": {
      "type": "string",
      "minLength": 1,
      "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?Z$"
    },
    "results": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "ruleId": {
            "type": "string",
            "minLength": 1,
            "pattern": "^SEC-\\d{3}$"
          },
          "ruleHash": {
            "type": "string",
            "minLength": 1,
            "pattern": "^[a-f0-9]{64}$"
          },
          "assetId": {
            "type": "string",
            "minLength": 1
          },
          "status": {
            "type": "string",
            "enum": [
              "finding",
              "no-finding",
              "not-applicable",
              "unverified"
            ]
          },
          "scope": {
            "type": "string",
            "minLength": 1
          },
          "evidence": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1
            },
            "minItems": 0,
            "uniqueItems": true
          },
          "reason": {
            "type": "string",
            "minLength": 1
          },
          "proposedAction": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "ruleId",
          "ruleHash",
          "assetId",
          "status",
          "scope",
          "evidence",
          "reason",
          "proposedAction"
        ],
        "additionalProperties": false
      },
      "minItems": 1,
      "uniqueItems": true
    }
  },
  "required": [
    "schemaVersion",
    "catalogHash",
    "environment",
    "environmentRevision",
    "checkedAt",
    "results"
  ],
  "additionalProperties": false
}
