← Files Codex SecurityARCHIVED FILE

schemas/findings.schema.json

10.3 KB · Nov 29, 2026 · 00:15 UTC

↓ Download file

See the change to this file →

{
  "$id": "https://openai.com/codex-security/schemas/findings.schema.json",
  "title": "Codex Security findings",
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "type": "object",
  "properties": {
    "documentType": { "const": "codex-security.findings" },
    "schemaVersion": { "const": "1.0" },
    "scanId": { "type": "string", "minLength": 1 },
    "findings": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "findingId": { "type": "string", "pattern": "^csf_[a-f0-9]{24}$" },
          "occurrenceId": { "type": "string", "pattern": "^occ_[a-f0-9]{24}$" },
          "ruleId": { "type": "string", "pattern": "^[a-z0-9][a-z0-9._/-]*$" },
          "identity": {
            "type": "object",
            "properties": {
              "anchor": {
                "type": "string",
                "pattern": "^[a-z0-9][a-z0-9._/-]*$"
              },
              "instance": {
                "type": "string",
                "pattern": "^[a-z0-9][a-z0-9._/-]*$"
              }
            },
            "required": ["anchor"]
          },
          "fingerprints": {
            "type": "object",
            "properties": {
              "algorithm": { "const": "codex-security/v1" },
              "primary": {
                "type": "string",
                "pattern": "^codex-security/v1:sha256:[a-f0-9]{64}$"
              }
            },
            "required": ["algorithm", "primary"]
          },
          "title": { "type": "string", "minLength": 1 },
          "summary": { "type": "string", "minLength": 1 },
          "severity": {
            "type": "object",
            "properties": {
              "level": {
                "enum": ["critical", "high", "medium", "low", "informational"]
              },
              "score": { "type": "number", "minimum": 0, "maximum": 10 },
              "scoringSystem": { "type": "string", "minLength": 1 },
              "vector": { "type": "string", "minLength": 1 },
              "rationale": { "type": "string", "minLength": 1 },
              "changeConditions": { "type": "string", "minLength": 1 }
            },
            "required": ["level"]
          },
          "confidence": {
            "type": "object",
            "properties": {
              "level": { "enum": ["high", "medium", "low"] },
              "rationale": { "type": "string", "minLength": 1 }
            },
            "required": ["level", "rationale"]
          },
          "taxonomy": {
            "type": "object",
            "properties": {
              "category": { "type": "string", "minLength": 1 },
              "cwe": { "$ref": "#/$defs/stringList" }
            },
            "required": ["category", "cwe"]
          },
          "locations": {
            "minItems": 1,
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "path": { "type": "string", "minLength": 1 },
                "startLine": { "type": "integer", "minimum": 1 },
                "endLine": { "type": "integer", "minimum": 1 },
                "role": { "type": "string", "minLength": 1 }
              },
              "required": ["path", "startLine"]
            }
          },
          "writeup": {
            "type": "object",
            "properties": {
              "reportPath": {
                "type": "string",
                "pattern": "^findings/([a-z0-9][a-z0-9._-]*)/\\1\\.md$"
              }
            },
            "required": ["reportPath"]
          },
          "codeEvidence": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "pattern": "^[a-z0-9][a-z0-9._/-]*$"
                },
                "label": { "type": "string", "minLength": 1 },
                "path": { "type": "string", "minLength": 1 },
                "startLine": { "type": "integer", "minimum": 1 },
                "endLine": { "type": "integer", "minimum": 1 },
                "language": { "type": "string", "minLength": 1 },
                "role": { "type": "string", "minLength": 1 },
                "code": { "type": "string", "minLength": 1 },
                "explanation": { "type": "string", "minLength": 1 }
              },
              "required": [
                "id",
                "label",
                "path",
                "startLine",
                "code",
                "explanation"
              ]
            }
          },
          "code_evidence": {
            "type": ["array", "null"],
            "items": {
              "type": "object",
              "properties": {
                "id": { "type": "string", "minLength": 1 },
                "code": { "type": "string", "minLength": 1 }
              },
              "required": ["id", "code"]
            }
          },
          "rootCause": {
            "type": ["object", "string"],
            "properties": {
              "summary": { "type": "string", "minLength": 1 },
              "evidenceRefs": { "$ref": "#/$defs/stringList" },
              "code": { "type": "string", "minLength": 1 },
              "language": { "type": "string", "minLength": 1 }
            },
            "required": ["summary"]
          },
          "root_cause": {
            "type": ["object", "string", "null"],
            "properties": {
              "summary": { "type": "string", "minLength": 1 },
              "evidenceRefs": { "$ref": "#/$defs/stringList" },
              "evidence_refs": { "$ref": "#/$defs/stringList" },
              "code": { "type": "string", "minLength": 1 },
              "language": { "type": "string", "minLength": 1 }
            }
          },
          "remediation": { "type": "string", "minLength": 1 },
          "validation": {
            "type": ["object", "null"],
            "properties": {
              "assertions": { "$ref": "#/$defs/stringList" },
              "counterEvidence": { "$ref": "#/$defs/stringList" },
              "evidence": {
                "type": ["string", "array"],
                "minLength": 1,
                "items": { "type": "string", "minLength": 1 }
              },
              "evidenceRefs": { "$ref": "#/$defs/stringList" },
              "evidence_refs": { "$ref": "#/$defs/stringList" },
              "limitations": { "$ref": "#/$defs/stringList" },
              "method": { "type": "string", "minLength": 1 },
              "status": { "type": ["string", "null"], "minLength": 1 },
              "summary": { "type": "string", "minLength": 1 },
              "disposition": { "type": ["string", "null"], "minLength": 1 },
              "result": { "type": ["string", "null"], "minLength": 1 }
            }
          },
          "attackPath": {
            "type": ["object", "null"],
            "properties": {
              "assumptions": { "$ref": "#/$defs/stringList" },
              "blindspots": { "$ref": "#/$defs/stringList" },
              "controls": { "$ref": "#/$defs/stringList" },
              "dataFlow": { "$ref": "#/$defs/dataFlow" },
              "data_flow": { "$ref": "#/$defs/dataFlow" },
              "dataflow": { "$ref": "#/$defs/dataFlow" },
              "evidenceRefs": { "$ref": "#/$defs/stringList" },
              "evidence_refs": { "$ref": "#/$defs/stringList" },
              "impact": { "$ref": "#/$defs/assessment" },
              "likelihood": { "$ref": "#/$defs/assessment" },
              "limitations": { "$ref": "#/$defs/stringList" },
              "preconditions": { "$ref": "#/$defs/stringList" },
              "reachability": {
                "type": ["string", "object"],
                "minLength": 1,
                "properties": {
                  "summary": { "type": "string", "minLength": 1 },
                  "attacker": { "type": "string", "minLength": 1 },
                  "entrypoint": { "type": "string", "minLength": 1 },
                  "source": { "type": "string", "minLength": 1 },
                  "sink": { "type": "string", "minLength": 1 },
                  "outcome": { "type": "string", "minLength": 1 },
                  "preconditions": { "$ref": "#/$defs/stringList" },
                  "evidenceRefs": { "$ref": "#/$defs/stringList" },
                  "evidence_refs": { "$ref": "#/$defs/stringList" }
                }
              },
              "steps": { "$ref": "#/$defs/stringList" },
              "summary": { "type": "string", "minLength": 1 }
            }
          },
          "remediationTests": { "$ref": "#/$defs/stringList" },
          "preventiveControls": { "$ref": "#/$defs/stringList" },
          "provenance": {
            "type": "object",
            "properties": { "source": { "type": "string", "minLength": 1 } },
            "required": ["source"]
          },
          "extensions": {
            "type": "object",
            "properties": {
              "candidateId": { "type": "string", "minLength": 1 },
              "ledgerRowId": { "type": "string", "minLength": 1 },
              "reportId": { "type": "string", "minLength": 1 }
            }
          }
        },
        "required": [
          "findingId",
          "occurrenceId",
          "ruleId",
          "identity",
          "fingerprints",
          "title",
          "summary",
          "severity",
          "confidence",
          "taxonomy",
          "locations",
          "remediation",
          "provenance"
        ]
      }
    }
  },
  "required": ["documentType", "schemaVersion", "scanId", "findings"],
  "$defs": {
    "stringList": {
      "type": "array",
      "items": { "type": "string", "minLength": 1 }
    },
    "dataFlow": {
      "type": ["string", "object"],
      "minLength": 1,
      "properties": {
        "summary": { "type": "string", "minLength": 1 },
        "source": { "type": "string", "minLength": 1 },
        "sink": { "type": "string", "minLength": 1 },
        "outcome": { "type": "string", "minLength": 1 },
        "transformations": { "$ref": "#/$defs/stringList" },
        "evidenceRefs": { "$ref": "#/$defs/stringList" },
        "evidence_refs": { "$ref": "#/$defs/stringList" }
      }
    },
    "assessment": {
      "type": ["string", "object", "null"],
      "minLength": 1,
      "properties": {
        "level": { "type": "string", "minLength": 1 },
        "rationale": { "type": "string", "minLength": 1 },
        "why": { "type": "string", "minLength": 1 }
      }
    }
  }
}

SHA-256: c53067bf1f17b88de5b555ed4d074f7d17975294345b40f16c7a9f91019c9f67