{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/ismalicious-com/json-schema/ismalicious-com-exposure-response-schema.json",
  "title": "ExposureResponse",
  "x-generated": "2026-11-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/ismalicious-com-openapi.json#/components/schemas/ExposureResponse",
  "type": "object",
  "required": [
    "level",
    "headline",
    "readAt",
    "counts",
    "groups",
    "lowProbability",
    "upgradeGroups",
    "recentlyClosed",
    "channels",
    "policy",
    "notices"
  ],
  "properties": {
    "channels": {
      "$ref": "#/$defs/ExposureChannels"
    },
    "counts": {
      "$ref": "#/$defs/ExposureCounts"
    },
    "groups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/ExposureGroup"
      }
    },
    "headline": {
      "$ref": "#/$defs/ExposureHeadline"
    },
    "level": {
      "type": "string",
      "description": "`critical`, `high`, `medium`, `low`, `none`, `unknown`."
    },
    "lowProbability": {
      "$ref": "#/$defs/LowProbability"
    },
    "notices": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/SourceNotice"
      },
      "description": "Notices owed by the sources behind any of the organisation's findings\n(the headline, counts and groups rest on them): VulnCheck's (§12)\nonce one of them matched on its ranges. Empty otherwise."
    },
    "policy": {
      "$ref": "#/$defs/AlertPolicyDto"
    },
    "readAt": {
      "$ref": "#/$defs/ExposureReadAt"
    },
    "recentlyClosed": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/RecentlyClosed"
      }
    },
    "upgradeGroups": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/UpgradeGroup"
      }
    }
  },
  "$defs": {
    "AlertPolicyDto": {
      "type": "object",
      "required": [
        "p1Cadence",
        "p2Cadence",
        "p3Cadence",
        "emailEnabled",
        "emailRecipients",
        "chatDestinationIds",
        "webhooksEnabled",
        "includeDevDependencies",
        "locale"
      ],
      "properties": {
        "chatDestinationIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "emailEnabled": {
          "type": "boolean"
        },
        "emailRecipients": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Empty = the organisation's OWNER/ADMIN users with a verified address.\nEvery entry passes `contexts::cve::domain::is_notification_email`."
        },
        "includeDevDependencies": {
          "type": "boolean"
        },
        "lastDailyDigestAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "lastWeeklyDigestAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "locale": {
          "type": "string",
          "description": "`en` or `fr`."
        },
        "p1Cadence": {
          "$ref": "#/$defs/Cadence"
        },
        "p2Cadence": {
          "$ref": "#/$defs/Cadence"
        },
        "p3Cadence": {
          "$ref": "#/$defs/Cadence"
        },
        "updatedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "webhooksEnabled": {
          "type": "boolean"
        }
      }
    },
    "Cadence": {
      "type": "string",
      "description": "`SurveillanceAlertPolicy.p{1,2,3}Cadence`.",
      "enum": [
        "Immediate",
        "Daily",
        "Weekly",
        "Never"
      ]
    },
    "ChatChannel": {
      "type": "object",
      "required": [
        "destinationId",
        "type",
        "name"
      ],
      "properties": {
        "destinationId": {
          "type": "string"
        },
        "lastStatus": {
          "type": [
            "string",
            "null"
          ]
        },
        "name": {
          "type": "string"
        },
        "type": {
          "type": "string",
          "description": "`slack_webhook` or `teams_webhook`."
        }
      }
    },
    "ClosedReason": {
      "type": "string",
      "description": "`ExposureFinding.closedReason`.",
      "enum": [
        "FixedVersionRead",
        "ComponentRemoved",
        "User"
      ]
    },
    "EmailChannel": {
      "type": "object",
      "required": [
        "enabled",
        "recipientCount"
      ],
      "properties": {
        "enabled": {
          "type": "boolean"
        },
        "recipientCount": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "ExposureChannels": {
      "type": "object",
      "required": [
        "email",
        "chat",
        "webhooks"
      ],
      "properties": {
        "chat": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/ChatChannel"
          }
        },
        "email": {
          "$ref": "#/$defs/EmailChannel"
        },
        "lastSentAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "webhooks": {
          "$ref": "#/$defs/WebhookChannel"
        }
      }
    },
    "ExposureCounts": {
      "type": "object",
      "required": [
        "toTreat",
        "acknowledged",
        "snoozed",
        "fixed",
        "closed"
      ],
      "properties": {
        "acknowledged": {
          "type": "integer",
          "format": "int64"
        },
        "closed": {
          "type": "integer",
          "format": "int64"
        },
        "fixed": {
          "type": "integer",
          "format": "int64"
        },
        "snoozed": {
          "type": "integer",
          "format": "int64"
        },
        "toTreat": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "ExposureGroup": {
      "type": "object",
      "required": [
        "proof",
        "findings"
      ],
      "properties": {
        "findings": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FindingDto"
          }
        },
        "proof": {
          "$ref": "#/$defs/Proof"
        }
      }
    },
    "ExposureHeadline": {
      "type": "object",
      "required": [
        "exploitedCount",
        "componentNames",
        "assetCount"
      ],
      "properties": {
        "assetCount": {
          "type": "integer",
          "format": "int64"
        },
        "componentNames": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "exploitedCount": {
          "type": "integer",
          "format": "int64"
        },
        "upgrade": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/ExposureUpgrade"
            }
          ]
        }
      }
    },
    "ExposureReadAt": {
      "type": "object",
      "properties": {
        "catalog": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "stack": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        }
      }
    },
    "ExposureUpgrade": {
      "type": "object",
      "required": [
        "componentName",
        "toVersion"
      ],
      "properties": {
        "componentName": {
          "type": "string"
        },
        "toVersion": {
          "type": "string"
        }
      }
    },
    "FindingComponentDto": {
      "type": "object",
      "required": [
        "componentId",
        "sourceId",
        "sourceName",
        "sourceKind",
        "name",
        "versionSource",
        "versionVerified",
        "versionState",
        "matchSources",
        "distroBackport"
      ],
      "properties": {
        "affectedRange": {
          "type": [
            "string",
            "null"
          ]
        },
        "componentId": {
          "type": "string"
        },
        "distroBackport": {
          "type": "boolean",
          "description": "A distro banner: verify the package before acting."
        },
        "fixedVersion": {
          "type": [
            "string",
            "null"
          ]
        },
        "matchSources": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/MatchSource"
          }
        },
        "name": {
          "type": "string"
        },
        "observedVersion": {
          "type": [
            "string",
            "null"
          ]
        },
        "readAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time",
          "description": "When the version was last read (age of the reading)."
        },
        "sourceId": {
          "type": "string"
        },
        "sourceKind": {
          "$ref": "#/$defs/SourceKind"
        },
        "sourceName": {
          "type": "string"
        },
        "versionEvidence": {
          "type": [
            "string",
            "null"
          ]
        },
        "versionSource": {
          "$ref": "#/$defs/VersionSource"
        },
        "versionState": {
          "$ref": "#/$defs/VersionState"
        },
        "versionVerified": {
          "type": "boolean"
        }
      }
    },
    "FindingDto": {
      "type": "object",
      "required": [
        "id",
        "cveId",
        "isKev",
        "status",
        "priority",
        "proof",
        "versionState",
        "signalState",
        "detectedAt",
        "statusUpdatedAt",
        "components",
        "relatedCveIds",
        "notices"
      ],
      "properties": {
        "caseId": {
          "type": [
            "string",
            "null"
          ]
        },
        "closedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "closedReason": {
          "oneOf": [
            {
              "type": "null"
            },
            {
              "$ref": "#/$defs/ClosedReason"
            }
          ]
        },
        "commonName": {
          "type": [
            "string",
            "null"
          ]
        },
        "components": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FindingComponentDto"
          }
        },
        "cveId": {
          "type": "string"
        },
        "cvssScore": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "cvssVersion": {
          "type": [
            "string",
            "null"
          ]
        },
        "detectedAt": {
          "type": "string",
          "format": "date-time"
        },
        "epssScore": {
          "type": [
            "number",
            "null"
          ],
          "format": "double"
        },
        "exploitationFirstSeenAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "exploitationStatus": {
          "type": [
            "string",
            "null"
          ]
        },
        "fixGroupKey": {
          "type": [
            "string",
            "null"
          ]
        },
        "fixedVersion": {
          "type": [
            "string",
            "null"
          ]
        },
        "id": {
          "type": "string"
        },
        "isKev": {
          "type": "boolean"
        },
        "kevDateAdded": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "note": {
          "type": [
            "string",
            "null"
          ]
        },
        "notices": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/SourceNotice"
          },
          "description": "Notices the terms of a source behind its components' matches require\nto be shown with it, verbatim: VulnCheck's (§12) when a component\ncarries `VULNCHECK`. Empty otherwise."
        },
        "notifiedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "patchAvailable": {
          "type": [
            "boolean",
            "null"
          ]
        },
        "priority": {
          "$ref": "#/$defs/Priority"
        },
        "proof": {
          "$ref": "#/$defs/Proof"
        },
        "relatedCveIds": {
          "type": "array",
          "items": {
            "type": "string"
          },
          "description": "Other open findings fixed by the same upgrade."
        },
        "severity": {
          "type": [
            "string",
            "null"
          ]
        },
        "signalState": {
          "$ref": "#/$defs/SignalState"
        },
        "snoozedUntil": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "status": {
          "$ref": "#/$defs/FindingStatus"
        },
        "statusUpdatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "title": {
          "type": [
            "string",
            "null"
          ]
        },
        "versionState": {
          "$ref": "#/$defs/VersionState"
        }
      }
    },
    "FindingStatus": {
      "type": "string",
      "description": "`ExposureFinding.status`. `Fixed` is written by a read, never by hand.",
      "enum": [
        "Open",
        "Acknowledged",
        "Snoozed",
        "Patched",
        "Fixed",
        "NotAffected",
        "AcceptedRisk"
      ]
    },
    "LowProbability": {
      "type": "object",
      "required": [
        "count"
      ],
      "properties": {
        "count": {
          "type": "integer",
          "format": "int64"
        }
      }
    },
    "MatchSource": {
      "type": "string",
      "description": "`ExposureFindingComponent.matchSources` entries.",
      "enum": [
        "NvdCpe",
        "Osv",
        "Csaf",
        "VulnCheck",
        "OpenCve",
        "Legacy",
        "Cna"
      ]
    },
    "Priority": {
      "type": "string",
      "description": "`ExposureFinding.priority`: P1 immediate, P2 daily digest, P3 weekly\n(default cadences; the organisation's policy can change them).",
      "enum": [
        "P1",
        "P2",
        "P3"
      ]
    },
    "Proof": {
      "type": "string",
      "description": "`ExposureFinding.proof` — the Exposure group, in display order.",
      "enum": [
        "Exploited",
        "Kev",
        "Likely",
        "Unverified",
        "Low"
      ]
    },
    "RecentlyClosed": {
      "type": "object",
      "required": [
        "findingId",
        "cveId",
        "componentName",
        "sourceName",
        "closedAt"
      ],
      "properties": {
        "closedAt": {
          "type": "string",
          "format": "date-time"
        },
        "componentName": {
          "type": "string"
        },
        "cveId": {
          "type": "string"
        },
        "findingId": {
          "type": "string"
        },
        "sourceName": {
          "type": "string"
        },
        "version": {
          "type": [
            "string",
            "null"
          ]
        }
      }
    },
    "SignalState": {
      "type": "object",
      "description": "`ExposureFinding.signalState` / `notifiedState`. A push-worthy change is a\nfalse→true of `kev`, `exploited`, `poc` or `patch`; `epss_high` false→true\nreopens and goes to the digest, never to an immediate alert; numeric EPSS\nmoves are not state (build spec §2.3.6).",
      "properties": {
        "epssHigh": {
          "type": "boolean",
          "default": false
        },
        "exploited": {
          "type": "boolean",
          "default": false
        },
        "kev": {
          "type": "boolean",
          "default": false
        },
        "patch": {
          "type": "boolean",
          "default": false
        },
        "poc": {
          "type": "boolean",
          "default": false
        }
      }
    },
    "SourceKind": {
      "type": "string",
      "description": "`WatchSource.kind` — the unit of sale.",
      "enum": [
        "Domain",
        "Lockfile",
        "Manual"
      ]
    },
    "SourceNotice": {
      "type": "object",
      "description": "A notice a source's terms ask to be shown with its data, verbatim.",
      "required": [
        "source",
        "matchSource",
        "name",
        "text",
        "url"
      ],
      "properties": {
        "matchSource": {
          "$ref": "#/$defs/MatchSource",
          "description": "The `matchSources` value its data is matched under: `VULNCHECK`."
        },
        "name": {
          "type": "string",
          "description": "`VulnCheck`."
        },
        "source": {
          "type": "string",
          "description": "The source's id in the attribution manifest (`GET /cve/attribution`):\n`vulncheck`."
        },
        "termsUrl": {
          "type": [
            "string",
            "null"
          ],
          "description": "The terms that require the notice."
        },
        "text": {
          "type": "string",
          "description": "Shown as is: « This product uses data from VulnCheck\n(https://vulncheck.com). »"
        },
        "url": {
          "type": "string",
          "description": "The publisher's site."
        }
      }
    },
    "UpgradeGroup": {
      "type": "object",
      "required": [
        "fixGroupKey",
        "componentName",
        "toVersion",
        "findingIds"
      ],
      "properties": {
        "componentName": {
          "type": "string"
        },
        "findingIds": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "fixGroupKey": {
          "type": "string"
        },
        "toVersion": {
          "type": "string"
        }
      }
    },
    "VersionSource": {
      "type": "string",
      "description": "`WatchComponent.versionSource` — where the version was read.",
      "enum": [
        "Header",
        "MetaTag",
        "ScriptPath",
        "PortBanner",
        "Lockfile",
        "Sbom",
        "Manual",
        "LegacyCpe",
        "None"
      ]
    },
    "VersionState": {
      "type": "string",
      "description": "`ExposureFinding.versionState` / `ExposureFindingComponent.versionState`.",
      "enum": [
        "Affected",
        "Unverified",
        "NotAffected",
        "Fixed"
      ]
    },
    "WebhookChannel": {
      "type": "object",
      "required": [
        "count"
      ],
      "properties": {
        "count": {
          "type": "integer",
          "format": "int64",
          "description": "Active webhook endpoints that receive alerts; 0 while they are paused."
        },
        "lastStatus": {
          "type": [
            "string",
            "null"
          ]
        },
        "paused": {
          "type": "boolean",
          "description": "The organisation has active webhooks, paused because its served plan\ncarries none (D7): nothing is sent to them until a paid plan."
        }
      }
    }
  }
}