{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "version",
    "date",
    "checked",
    "status",
    "agent_instructions",
    "entries",
    "license",
    "source"
  ],
  "properties": {
    "version": {
      "const": "sovereigngrc.daily/1"
    },
    "date": {
      "$ref": "#/$defs/date"
    },
    "reference": {
      "type": "string",
      "pattern": "^SGRC-DCB-[0-9]{8}$",
      "description": "Citable code: SGRC-DCB and the issue date as YYYYMMDD. Added when the issue is served; not stored."
    },
    "revisions": {
      "type": "array",
      "minItems": 1,
      "description": "Publication history up to this version, oldest first, from content/daily/revisions.json. Added when the issue is served; absent when no record matches.",
      "items": {
        "$ref": "#/$defs/revision"
      }
    },
    "checked": {
      "$ref": "#/$defs/timestamp"
    },
    "status": {
      "enum": [
        "material",
        "quiet"
      ]
    },
    "agent_instructions": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "task",
        "match_on",
        "report_schema_url"
      ],
      "properties": {
        "task": {
          "enum": [
            "Match each entry against the caller's SBOM, asset inventory, or lockfiles. Report only matches. Cite sources. Do not invent versions you cannot see. On status=quiet, say so and stop.",
            "Match all visible inventory against the latest issue. Include every issue entry exactly once in a sovereigngrc.report/2 evidence record, cite entry sources, copy controls unchanged, and preserve unknown versions. Call validate_report and fix every problem, then return the plain-language human note. On status=quiet, report Nothing material today with an empty record; do not backfill older issues. A workaround reduces risk and never implies fixed.",
            "Match all visible inventory against the latest issue, at most 5 products per check_stack call. Include every issue entry exactly once in a sovereigngrc.report/3 evidence record with inventory.index_coverage (report/2 is still accepted with a notice), cite entry sources, copy controls unchanged, and preserve unknown versions. Call validate_report and fix every problem, then return the plain-language human note. On status=quiet, report Nothing material today with an empty record; do not backfill older issues. A workaround reduces risk and never implies fixed."
          ],
          "default": "Match all visible inventory against the latest issue, at most 5 products per check_stack call. Include every issue entry exactly once in a sovereigngrc.report/3 evidence record with inventory.index_coverage (report/2 is still accepted with a notice), cite entry sources, copy controls unchanged, and preserve unknown versions. Call validate_report and fix every problem, then return the plain-language human note. On status=quiet, report Nothing material today with an empty record; do not backfill older issues. A workaround reduces risk and never implies fixed."
        },
        "match_on": {
          "const": [
            "cpe",
            "purl",
            "vendor_product",
            "alias"
          ]
        },
        "report_schema_url": {
          "const": "https://www.sovereigngrc.com/schemas/agent-report.schema.json"
        }
      }
    },
    "entries": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/entry"
      },
      "maxItems": 1000
    },
    "review": {
      "enum": [
        "automated"
      ]
    },
    "license": {
      "const": "CC-BY-4.0"
    },
    "source": {
      "const": "https://www.sovereigngrc.com/insights/daily/feed?format=json"
    }
  },
  "allOf": [
    {
      "$ref": "#/$defs/noTodo"
    },
    {
      "if": {
        "properties": {
          "status": {
            "const": "quiet"
          }
        },
        "required": [
          "status"
        ],
        "type": "object"
      },
      "then": {
        "properties": {
          "entries": {
            "maxItems": 0,
            "type": "array"
          }
        },
        "type": "object"
      },
      "else": {
        "properties": {
          "entries": {
            "minItems": 1,
            "type": "array"
          }
        },
        "type": "object"
      }
    }
  ],
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://www.sovereigngrc.com/schemas/daily-issue.schema.json",
  "title": "Sovereign GRC Daily Cyber Risk Brief issue",
  "$defs": {
    "text": {
      "type": "string",
      "minLength": 1,
      "maxLength": 4000
    },
    "url": {
      "type": "string",
      "format": "uri",
      "pattern": "^https://",
      "maxLength": 2048
    },
    "date": {
      "type": "string",
      "format": "date",
      "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    },
    "revision": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "version",
        "date",
        "checked",
        "note"
      ],
      "properties": {
        "version": {
          "type": "string",
          "pattern": "^\\d+\\.\\d+$"
        },
        "date": {
          "$ref": "#/$defs/timestamp"
        },
        "checked": {
          "$ref": "#/$defs/timestamp"
        },
        "note": {
          "type": "string",
          "minLength": 1,
          "maxLength": 300
        }
      }
    },
    "noTodo": {
      "anyOf": [
        {
          "type": "string",
          "not": {
            "pattern": "TODO",
            "type": "string"
          },
          "maxLength": 4000
        },
        {
          "type": "object",
          "propertyNames": {
            "not": {
              "pattern": "TODO",
              "type": "string"
            }
          },
          "additionalProperties": {
            "$ref": "#/$defs/noTodo"
          }
        },
        {
          "type": "array",
          "items": {
            "$ref": "#/$defs/noTodo"
          }
        },
        {
          "type": "number"
        },
        {
          "type": "boolean"
        },
        {
          "type": "null"
        }
      ]
    },
    "source": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "role",
        "publisher",
        "url"
      ],
      "properties": {
        "role": {
          "enum": [
            "vendor",
            "authority",
            "victim",
            "research",
            "press"
          ],
          "description": "research: a security research team's own report on what it found. Press is discovery only and never the primary source, except on a press-only incident row (rule K7), which carries report.role press and is labelled as not yet confirmed."
        },
        "publisher": {
          "$ref": "#/$defs/text"
        },
        "url": {
          "$ref": "#/$defs/url"
        },
        "attested": {
          "$ref": "#/$defs/attestation"
        },
        "access": {
          "enum": [
            "fetched",
            "bot-blocked",
            "canonical"
          ]
        }
      }
    },
    "match": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "vendor",
        "product",
        "aliases",
        "cpe",
        "purl",
        "affected_versions",
        "fixed_versions",
        "exposure",
        "affected_ranges",
        "not_affected"
      ],
      "properties": {
        "vendor": {
          "$ref": "#/$defs/text"
        },
        "product": {
          "$ref": "#/$defs/text"
        },
        "aliases": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/text"
          },
          "uniqueItems": true
        },
        "cpe": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^cpe:2\\.3:[aho]:"
          },
          "uniqueItems": true
        },
        "purl": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^pkg:[a-z][a-z0-9.+-]*/\\S+$"
          },
          "uniqueItems": true
        },
        "affected_versions": {
          "anyOf": [
            {
              "$ref": "#/$defs/text"
            },
            {
              "type": "null"
            }
          ]
        },
        "fixed_versions": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/text"
          },
          "uniqueItems": true
        },
        "exposure": {
          "anyOf": [
            {
              "$ref": "#/$defs/text"
            },
            {
              "type": "null"
            }
          ]
        },
        "affected_ranges": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/versionRange"
          },
          "uniqueItems": true
        },
        "not_affected": {
          "anyOf": [
            {
              "$ref": "#/$defs/text"
            },
            {
              "type": "null"
            }
          ]
        }
      }
    },
    "risk": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "cvss",
        "cvss_vector",
        "epss",
        "kev",
        "kev_added",
        "kev_due",
        "kev_due_passed",
        "exploited_in_wild",
        "severity",
        "window"
      ],
      "properties": {
        "severity_basis": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "reason",
            "cvss_rating"
          ],
          "description": "Added at read time by the feed and MCP server. Never stored in an issue file.",
          "properties": {
            "reason": {
              "type": "string"
            },
            "cvss_rating": {
              "type": [
                "string",
                "null"
              ]
            }
          }
        },
        "cvss": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 10
        },
        "cvss_vector": {
          "anyOf": [
            {
              "type": "string",
              "pattern": "^(CVSS:[234]\\.\\d/|AV:)"
            },
            {
              "type": "null"
            }
          ]
        },
        "cvss_highest": { "type": "object", "additionalProperties": false, "required": ["score", "version", "source"], "description": "Owner 9 Nov 2026: the highest CVSS v3 or v4 base score on the NVD record, from any source or version, present only when it is above the row's own score. Ranking and severity use the row's own score.", "properties": { "score": { "type": "number", "minimum": 0, "maximum": 10 }, "version": { "enum": ["3.0", "3.1", "4.0"] }, "source": { "type": ["string", "null"] } } },
        "cvss_source": {
          "type": [
            "string",
            "null"
          ],
          "description": "Who scored the CVSS value in NVD's record: NVD itself or the vendor (CNA), for example nvd@nist.gov. Older issues omit it."
        },
        "epss": {
          "type": [
            "number",
            "null"
          ],
          "minimum": 0,
          "maximum": 1
        },
        "kev": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "null on an incident or campaign row: KEV lists CVEs, and these rows name none. Issues before 6 Nov 2026 store false; the feed and MCP serve null."
        },
        "kev_added": {
          "anyOf": [
            {
              "$ref": "#/$defs/date"
            },
            {
              "type": "null"
            }
          ]
        },
        "kev_due": {
          "anyOf": [
            {
              "$ref": "#/$defs/date"
            },
            {
              "type": "null"
            }
          ]
        },
        "kev_due_passed": {
          "type": "boolean"
        },
        "exploited_in_wild": {
          "type": [
            "boolean",
            "null"
          ],
          "description": "null when no source states it. Issues before 6 Nov 2026 store false on incident and campaign rows; the feed and MCP serve null."
        },
        "severity": {
          "enum": [
            "CRITICAL",
            "HIGH",
            "NOT_SCORED"
          ],
          "description": "NOT_SCORED: no CVSS score from NVD or the vendor yet, or an incident or campaign, which carry no score."
        },
        "window": {
          "enum": [
            "IMMEDIATE",
            "7D",
            "NO_PATCH",
            null
          ],
          "description": "Sovereign GRC's response band for a vulnerability. null on an incident or campaign row, which has no patch to time. Issues before 6 Nov 2026 store NO_PATCH there; the feed and MCP serve null."
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "kev": {
                "const": true
              }
            },
            "required": [
              "kev"
            ],
            "type": "object"
          },
          "then": {
            "properties": {
              "severity": {
                "const": "CRITICAL"
              },
              "kev_added": {
                "$ref": "#/$defs/date"
              },
              "kev_due": {
                "$ref": "#/$defs/date"
              },
              "exploited_in_wild": {
                "const": true
              }
            },
            "type": "object"
          },
          "else": {
            "properties": {
              "kev_added": {
                "type": "null"
              },
              "kev_due": {
                "type": "null"
              },
              "kev_due_passed": {
                "const": false
              }
            },
            "type": "object"
          }
        }
      ]
    },
    "region": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "canada",
        "widely_deployed",
        "canada_sources"
      ],
      "properties": {
        "canada": {
          "type": "boolean"
        },
        "widely_deployed": {
          "type": "boolean"
        },
        "canada_sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/url"
          },
          "uniqueItems": true
        }
      },
      "allOf": [
        {
          "if": {
            "properties": {
              "canada": {
                "const": true
              }
            },
            "required": [
              "canada"
            ],
            "type": "object"
          },
          "then": {
            "properties": {
              "canada_sources": {
                "minItems": 1,
                "type": "array"
              }
            },
            "type": "object"
          },
          "else": {
            "properties": {
              "canada_sources": {
                "maxItems": 0,
                "type": "array"
              }
            },
            "type": "object"
          }
        }
      ]
    },
    "entry": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "id",
        "rank",
        "band",
        "title",
        "what",
        "match",
        "risk",
        "action",
        "region",
        "sources",
        "governance_question",
        "verified"
      ],
      "properties": {
        "id": {
          "type": "string",
          "pattern": "^[A-Za-z0-9][A-Za-z0-9._-]*$"
        },
        "rank": {
          "type": "integer",
          "minimum": 1
        },
        "band": {
          "enum": [
            "CANADA_INCIDENT",
            "KEV_PASSED",
            "KEV_UPCOMING",
            "REPORTED_EXPLOITED",
            "CRITICAL_WIDELY_DEPLOYED",
            "CRITICAL_NEW",
            "HIGH_EPSS",
            "NOT_YET_SCORED",
            "INCIDENT",
            "CAMPAIGN"
          ]
        },
        "title": {
          "$ref": "#/$defs/text",
          "maxLength": 300,
          "type": "string"
        },
        "what": {
          "$ref": "#/$defs/text"
        },
        "attack_note": {
          "type": ["string", "null"],
          "readOnly": true,
          "description": "Rule R14: read-time quote of a description/vector disagreement, shared by pages, feeds and MCP. Never stored in issue or complete-list files."
        },
        "match": {
          "anyOf": [
            {
              "$ref": "#/$defs/match"
            },
            {
              "type": "null"
            }
          ]
        },
        "risk": {
          "$ref": "#/$defs/risk"
        },
        "action": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "summary",
            "steps",
            "workaround",
            "detection"
          ],
          "properties": {
            "summary": {
              "$ref": "#/$defs/text"
            },
            "steps": {
              "type": "array",
              "items": {
                "$ref": "#/$defs/text"
              },
              "maxItems": 30
            },
            "workaround": {
              "anyOf": [
                {
                  "$ref": "#/$defs/workaround"
                },
                {
                  "type": "null"
                }
              ]
            },
            "detection": {
              "anyOf": [
                {
                  "$ref": "#/$defs/text"
                },
                {
                  "type": "null"
                }
              ]
            },
            "general_guidance": {
              "description": "General hardening for the row's weakness from the MITRE CWE catalog, kept apart from steps: it is not a vendor fix or workaround for this CVE. Absent in issues built before 9 Nov 2026, which carried it as a step starting \"Generic hardening for\".",
              "type": "array",
              "maxItems": 5,
              "items": {
                "type": "object",
                "additionalProperties": false,
                "required": ["source", "cwe", "name", "phases", "text"],
                "properties": {
                  "source": { "const": "MITRE CWE" },
                  "cwe": { "type": "string", "pattern": "^CWE-[0-9]+$" },
                  "name": { "anyOf": [{ "$ref": "#/$defs/text" }, { "type": "null" }] },
                  "phases": { "type": "array", "maxItems": 10, "items": { "$ref": "#/$defs/text" } },
                  "text": { "$ref": "#/$defs/text" }
                }
              }
            }
          }
        },
        "region": {
          "$ref": "#/$defs/region"
        },
        "sources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/source"
          },
          "minItems": 1,
          "maxItems": 30
        },
        "governance_question": {
          "$ref": "#/$defs/text"
        },
        "verified": {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "kev_checked",
            "nvd_checked",
            "epss_checked",
            "by"
          ],
          "properties": {
            "kev_checked": {
              "anyOf": [
                {
                  "$ref": "#/$defs/timestamp"
                },
                {
                  "type": "null"
                }
              ]
            },
            "nvd_checked": {
              "anyOf": [
                {
                  "$ref": "#/$defs/timestamp"
                },
                {
                  "type": "null"
                }
              ]
            },
            "epss_checked": {
              "anyOf": [
                {
                  "$ref": "#/$defs/timestamp"
                },
                {
                  "type": "null"
                }
              ]
            },
            "by": {
              "const": "Sovereign GRC"
            }
          }
        },
        "cwe": {
          "type": "array",
          "items": {
            "type": "string",
            "pattern": "^CWE-[0-9]+$"
          },
          "uniqueItems": true
        },
        "controls": {
          "anyOf": [
            {
              "$ref": "#/$defs/controls"
            },
            {
              "type": "null"
            }
          ]
        },
        "report": {
          "$ref": "#/$defs/report"
        },
        "published": {
          "$ref": "#/$defs/timestamp"
        },
        "held": {
          "const": true
        },
        "hold_reason": {
          "$ref": "#/$defs/text"
        }
      },
      "allOf": [
        {
          "if": {
            "type": "object",
            "required": [
              "held"
            ],
            "properties": {
              "held": {
                "const": true
              }
            }
          },
          "then": {
            "type": "object",
            "required": [
              "hold_reason"
            ],
            "properties": {
              "hold_reason": {
                "$ref": "#/$defs/text"
              },
              "action": {
                "type": "object",
                "properties": {
                  "steps": {
                    "type": "array",
                    "maxItems": 0
                  },
                  "workaround": {
                    "type": "null"
                  },
                  "detection": {
                    "type": "null"
                  }
                }
              }
            }
          },
          "else": {
            "type": "object",
            "not": {
              "type": "object",
              "required": [
                "hold_reason"
              ],
              "properties": {
                "hold_reason": {
                  "$ref": "#/$defs/text"
                }
              }
            },
            "properties": {
              "action": {
                "type": "object",
                "properties": {
                  "steps": {
                    "type": "array",
                    "minItems": 1
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "id": {
                "pattern": "^CVE-",
                "type": "string"
              }
            },
            "required": [
              "id"
            ],
            "type": "object"
          },
          "then": {
            "properties": {
              "id": {
                "pattern": "^CVE-\\d{4}-\\d{4,7}$",
                "type": "string"
              },
              "match": {
                "$ref": "#/$defs/match"
              }
            },
            "type": "object"
          }
        },
        {
          "if": {
            "properties": {
              "match": {
                "type": "null"
              }
            },
            "required": [
              "match"
            ],
            "type": "object"
          },
          "then": {
            "properties": {
              "band": {
                "enum": [
                  "CANADA_INCIDENT",
                  "INCIDENT",
                  "CAMPAIGN"
                ]
              },
              "risk": {
                "type": "object",
                "properties": {
                  "cvss": {
                    "type": "null"
                  },
                  "cvss_vector": {
                    "type": "null"
                  },
                  "epss": {
                    "type": "null"
                  },
                  "kev": {
                    "enum": [
                      false,
                      null
                    ]
                  },
                  "window": {
                    "enum": [
                      "NO_PATCH",
                      null
                    ]
                  }
                }
              }
            },
            "type": "object"
          }
        },
        {
          "if": {
            "type": "object",
            "required": [
              "match"
            ],
            "properties": {
              "match": {
                "type": "object"
              }
            }
          },
          "then": {
            "type": "object",
            "properties": {
              "risk": {
                "type": "object",
                "properties": {
                  "kev": {
                    "type": "boolean"
                  },
                  "exploited_in_wild": {
                    "type": [
                      "boolean",
                      "null"
                    ]
                  },
                  "window": {
                    "enum": [
                      "IMMEDIATE",
                      "7D",
                      "NO_PATCH"
                    ]
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "properties": {
              "band": {
                "const": "CANADA_INCIDENT"
              }
            },
            "required": [
              "band"
            ],
            "type": "object"
          },
          "then": {
            "properties": {
              "region": {
                "type": "object",
                "properties": {
                  "canada": {
                    "const": true
                  }
                }
              }
            },
            "type": "object"
          }
        },
        {
          "if": {
            "properties": {
              "band": {
                "const": "KEV_PASSED"
              }
            },
            "required": [
              "band"
            ],
            "type": "object"
          },
          "then": {
            "properties": {
              "risk": {
                "type": "object",
                "properties": {
                  "kev": {
                    "const": true
                  },
                  "kev_due_passed": {
                    "const": true
                  }
                }
              }
            },
            "type": "object"
          }
        },
        {
          "if": {
            "properties": {
              "band": {
                "const": "KEV_UPCOMING"
              }
            },
            "required": [
              "band"
            ],
            "type": "object"
          },
          "then": {
            "properties": {
              "risk": {
                "type": "object",
                "properties": {
                  "kev": {
                    "const": true
                  },
                  "kev_due_passed": {
                    "const": false
                  }
                }
              }
            },
            "type": "object"
          }
        },
        {
          "if": {
            "properties": {
              "band": {
                "enum": [
                  "INCIDENT",
                  "CAMPAIGN"
                ]
              }
            },
            "required": [
              "band"
            ],
            "type": "object"
          },
          "then": {
            "properties": {
              "match": {
                "type": "null"
              },
              "risk": {
                "type": "object",
                "properties": {
                  "severity": {
                    "const": "NOT_SCORED"
                  }
                }
              }
            },
            "type": "object"
          }
        },
        {
          "if": {
            "properties": {
              "band": {
                "enum": [
                  "NOT_YET_SCORED"
                ]
              }
            },
            "required": [
              "band"
            ],
            "type": "object"
          },
          "then": {
            "properties": {
              "match": {
                "$ref": "#/$defs/match"
              },
              "risk": {
                "type": "object",
                "properties": {
                  "cvss": {
                    "type": "null"
                  },
                  "cvss_vector": {
                    "type": "null"
                  },
                  "kev": {
                    "const": false
                  },
                  "severity": {
                    "const": "NOT_SCORED"
                  }
                }
              }
            },
            "type": "object"
          }
        },
        {
          "if": {
            "type": "object",
            "required": [
              "band"
            ],
            "properties": {
              "band": {
                "const": "REPORTED_EXPLOITED"
              }
            }
          },
          "then": {
            "type": "object",
            "required": [
              "report"
            ],
            "properties": {
              "report": {
                "type": "object"
              },
              "match": {
                "$ref": "#/$defs/match"
              },
              "risk": {
                "type": "object",
                "properties": {
                  "kev": {
                    "const": false
                  },
                  "exploited_in_wild": {
                    "const": true
                  },
                  "window": {
                    "const": "IMMEDIATE"
                  }
                }
              }
            }
          }
        },
        {
          "if": {
            "type": "object",
            "required": [
              "band",
              "report"
            ],
            "properties": {
              "band": {
                "const": "INCIDENT"
              },
              "report": {
                "type": "object",
                "required": [
                  "role"
                ],
                "properties": {
                  "role": {
                    "const": "press"
                  }
                }
              }
            }
          },
          "else": {
            "type": "object",
            "properties": {
              "sources": {
                "type": "array",
                "contains": {
                  "type": "object",
                  "properties": {
                    "role": {
                      "enum": [
                        "vendor",
                        "authority",
                        "victim",
                        "research"
                      ]
                    }
                  },
                  "required": [
                    "role"
                  ]
                }
              }
            }
          }
        }
      ]
    },
    "versionRange": {
      "oneOf": [
        {
          "type": "object",
          "additionalProperties": false,
          "required": [
            "exact"
          ],
          "properties": {
            "exact": {
              "$ref": "#/$defs/text"
            },
            "product": {
              "$ref": "#/$defs/text",
              "description": "Separately versioned source product. These bounds apply only to an inventory product with this exact identity, not to the row's primary software."
            },
            "cpe": {
              "type": "string",
              "pattern": "^cpe:2\\.3:[aho]:"
            }
          }
        },
        {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "from": {
              "$ref": "#/$defs/text"
            },
            "after": {
              "$ref": "#/$defs/text"
            },
            "before": {
              "$ref": "#/$defs/text"
            },
            "through": {
              "$ref": "#/$defs/text"
            },
            "product": {
              "$ref": "#/$defs/text",
              "description": "Separately versioned source product. These bounds apply only to an inventory product with this exact identity, not to the row's primary software."
            },
            "cpe": {
              "type": "string",
              "pattern": "^cpe:2\\.3:[aho]:"
            }
          },
          "anyOf": [
            {
              "required": [
                "from"
              ],
              "type": "object",
              "properties": {
                "from": {}
              }
            },
            {
              "required": [
                "after"
              ],
              "type": "object",
              "properties": {
                "after": {}
              }
            },
            {
              "required": [
                "before"
              ],
              "type": "object",
              "properties": {
                "before": {}
              }
            },
            {
              "required": [
                "through"
              ],
              "type": "object",
              "properties": {
                "through": {}
              }
            }
          ],
          "allOf": [
            {
              "not": {
                "required": [
                  "from",
                  "after"
                ],
                "type": "object",
                "properties": {
                  "from": {},
                  "after": {}
                }
              }
            },
            {
              "not": {
                "required": [
                  "before",
                  "through"
                ],
                "type": "object",
                "properties": {
                  "before": {},
                  "through": {}
                }
              }
            }
          ]
        }
      ]
    },
    "attestation": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "by",
        "date",
        "how"
      ],
      "properties": {
        "by": {
          "const": "curator"
        },
        "date": {
          "$ref": "#/$defs/date"
        },
        "how": {
          "enum": [
            "browser",
            "weekly-url-validation"
          ]
        }
      }
    },
    "controls": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "basis",
        "iso27001",
        "nist_csf",
        "cis_v8",
        "itsg33",
        "osfi_b13"
      ],
      "properties": {
        "basis": {
          "enum": [
            "weakness-table",
            "known-exploited-table",
            "curator",
            "incident-table",
            "baseline"
          ]
        },
        "iso27001": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/text"
          },
          "uniqueItems": true
        },
        "nist_csf": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/text"
          },
          "uniqueItems": true
        },
        "cis_v8": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/text"
          },
          "uniqueItems": true
        },
        "itsg33": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/text"
          },
          "uniqueItems": true
        },
        "osfi_b13": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/text"
          },
          "uniqueItems": true
        },
        "reviewed": {
          "$ref": "#/$defs/date"
        },
        "note": {
          "$ref": "#/$defs/text"
        }
      }
    },
    "workaround": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "summary",
        "applies_to",
        "reduces",
        "source_url"
      ],
      "properties": {
        "summary": {
          "$ref": "#/$defs/text"
        },
        "applies_to": {
          "$ref": "#/$defs/text"
        },
        "reduces": {
          "$ref": "#/$defs/text"
        },
        "source_url": {
          "$ref": "#/$defs/url"
        }
      }
    },
    "report": {
      "type": [
        "object",
        "null"
      ],
      "additionalProperties": false,
      "required": [
        "role",
        "publisher",
        "url",
        "quote"
      ],
      "description": "A report that the row's CVE is exploited before CISA lists it in KEV (band REPORTED_EXPLOITED, rule E1), or, on an INCIDENT row with role press, the press report the row rests on when no notice was found (rule K7). The quote is the report's own sentence or headline. The page labels a press report \"Reported by press, not yet confirmed\".",
      "properties": {
        "role": {
          "enum": [
            "authority",
            "vendor",
            "research",
            "press"
          ]
        },
        "publisher": {
          "$ref": "#/$defs/text"
        },
        "url": {
          "$ref": "#/$defs/url"
        },
        "quote": {
          "$ref": "#/$defs/text",
          "maxLength": 400,
          "type": "string"
        },
        "cut": {
          "type": "boolean",
          "description": "True when the quote was cut at a word to fit 400 characters; pages show the cut outside the quote marks."
        },
        "date": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
          "description": "The report's publication date, when the source gave one."
        },
        "confirmed_by": {
          "$ref": "#/$defs/text",
          "description": "Rule K17: on an INCIDENT row with role press, the organisation the article quotes confirming the incident to its outlet. The row then reads confirmed, not reported by press alone."
        }
      }
    }
  }
}
