{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quickiso.app/data-portability/tables/pentest_engagements.schema.json",
  "title": "tables/pentest_engagements.json",
  "description": "The rows of the table pentest_engagements that belong to the workspace, one object per row, keyed by the database's column names.",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "id": {
        "type": "string",
        "format": "uuid"
      },
      "organization_id": {
        "type": "string",
        "format": "uuid"
      },
      "title": {
        "type": "string"
      },
      "kind": {
        "type": "string",
        "enum": [
          "external_infrastructure",
          "internal_infrastructure",
          "web_application",
          "api",
          "mobile_application",
          "cloud",
          "wireless",
          "social_engineering",
          "physical",
          "red_team",
          "tlpt",
          "other"
        ]
      },
      "approach": {
        "type": "string",
        "enum": [
          "black_box",
          "grey_box",
          "white_box"
        ]
      },
      "provider_name": {
        "type": "string"
      },
      "provider_contact": {
        "type": "string"
      },
      "tester_qualifications": {
        "type": "string"
      },
      "status": {
        "type": "string",
        "enum": [
          "planned",
          "authorised",
          "in_progress",
          "reporting",
          "remediation",
          "retest",
          "closed",
          "cancelled"
        ]
      },
      "window_start": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "window_end": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "scope_summary": {
        "type": "string"
      },
      "out_of_scope": {
        "type": "string"
      },
      "rules_of_engagement": {
        "type": "string"
      },
      "drivers": {
        "type": [
          "object",
          "array",
          "string",
          "number",
          "boolean",
          "null"
        ]
      },
      "remediation_days": {
        "type": [
          "object",
          "array",
          "string",
          "number",
          "boolean",
          "null"
        ]
      },
      "recurrence_months": {
        "type": [
          "integer",
          "null"
        ]
      },
      "next_due_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "owner_membership_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "authorised_by": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "authorised_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "authorised_scope_digest": {
        "type": [
          "string",
          "null"
        ]
      },
      "authorisation_evidence_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "rules_evidence_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "report_evidence_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "summary_evidence_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "retest_evidence_id": {
        "type": [
          "string",
          "null"
        ],
        "format": "uuid"
      },
      "started_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "closed_on": {
        "type": [
          "string",
          "null"
        ],
        "format": "date",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}$"
      },
      "cancelled_at": {
        "type": [
          "string",
          "null"
        ],
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "cancel_reason": {
        "type": [
          "string",
          "null"
        ]
      },
      "created_by": {
        "type": "string",
        "format": "uuid"
      },
      "created_at": {
        "type": "string",
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "updated_at": {
        "type": "string",
        "format": "date-time",
        "pattern": "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{3}Z$"
      },
      "revision": {
        "type": "integer"
      }
    },
    "required": [
      "id",
      "organization_id",
      "title",
      "kind",
      "approach",
      "provider_name",
      "provider_contact",
      "tester_qualifications",
      "status",
      "window_start",
      "window_end",
      "scope_summary",
      "out_of_scope",
      "rules_of_engagement",
      "drivers",
      "remediation_days",
      "recurrence_months",
      "next_due_on",
      "owner_membership_id",
      "authorised_by",
      "authorised_at",
      "authorised_scope_digest",
      "authorisation_evidence_id",
      "rules_evidence_id",
      "report_evidence_id",
      "summary_evidence_id",
      "retest_evidence_id",
      "started_at",
      "closed_on",
      "cancelled_at",
      "cancel_reason",
      "created_by",
      "created_at",
      "updated_at",
      "revision"
    ],
    "additionalProperties": false
  }
}
