{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://syntheticforensics.org/downloads/artifact-report.schema.json",
  "title": "Synthetic Forensics Artifact Report, Draft 0.1",
  "description": "Interoperability specification; CC BY 4.0. Demonstrations must be marked. Nulls represent unknown or untested values, not negative findings.",
  "type": "object",
  "required": [
    "application",
    "application_version",
    "platform",
    "operating_system",
    "artifact_type",
    "artifact_location",
    "file_type",
    "database_schema",
    "timestamp_format",
    "creation_behavior",
    "persistence",
    "deletion_behavior",
    "synchronization_behavior",
    "dataset_repository_reference",
    "artifact_report_id",
    "title",
    "version",
    "demonstration",
    "forensic_significance",
    "validation_status",
    "last_verified",
    "relevant_fields",
    "sources",
    "hashes"
  ],
  "properties": {
    "application": {
      "type": [
        "string",
        "null"
      ]
    },
    "application_version": {
      "type": [
        "string",
        "null"
      ]
    },
    "platform": {
      "type": [
        "string",
        "null"
      ]
    },
    "operating_system": {
      "type": [
        "string",
        "null"
      ]
    },
    "artifact_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "artifact_location": {
      "type": [
        "string",
        "null"
      ]
    },
    "file_type": {
      "type": [
        "string",
        "null"
      ]
    },
    "database_schema": {
      "type": [
        "string",
        "null"
      ]
    },
    "timestamp_format": {
      "type": [
        "string",
        "null"
      ]
    },
    "creation_behavior": {
      "type": [
        "string",
        "null"
      ]
    },
    "persistence": {
      "type": [
        "string",
        "null"
      ]
    },
    "deletion_behavior": {
      "type": [
        "string",
        "null"
      ]
    },
    "synchronization_behavior": {
      "type": [
        "string",
        "null"
      ]
    },
    "dataset_repository_reference": {
      "type": [
        "string",
        "null"
      ]
    },
    "artifact_report_id": {
      "type": "string",
      "pattern": "^SF-AR-[0-9]{4,}$"
    },
    "title": {
      "type": "string",
      "minLength": 1
    },
    "version": {
      "type": "string"
    },
    "demonstration": {
      "type": "boolean"
    },
    "forensic_significance": {
      "type": "string"
    },
    "validation_status": {
      "enum": [
        "Preliminary",
        "Observed",
        "Replicated",
        "Validated",
        "Superseded",
        "Inconclusive"
      ]
    },
    "last_verified": {
      "anyOf": [
        {
          "type": "string",
          "format": "date"
        },
        {
          "type": "null"
        }
      ]
    },
    "relevant_fields": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "sources": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "title",
          "url"
        ],
        "properties": {
          "title": {
            "type": "string"
          },
          "url": {
            "type": "string",
            "format": "uri"
          },
          "source_class": {
            "enum": [
              "Primary",
              "Peer-reviewed",
              "Technical",
              "Vendor",
              "Secondary"
            ]
          }
        },
        "additionalProperties": true
      }
    },
    "hashes": {
      "type": "array",
      "items": {
        "type": "object",
        "required": [
          "file",
          "sha256"
        ],
        "properties": {
          "file": {
            "type": "string"
          },
          "sha256": {
            "type": "string",
            "pattern": "^[a-f0-9]{64}$"
          },
          "bytes": {
            "type": "integer",
            "minimum": 0
          }
        },
        "additionalProperties": false
      }
    },
    "license": {
      "type": "string"
    },
    "canonical_url": {
      "type": "string",
      "format": "uri"
    },
    "published": {
      "type": "string",
      "format": "date"
    },
    "updated": {
      "type": "string",
      "format": "date"
    }
  },
  "additionalProperties": false
}
