{ "$schema": "http://json-schema.org/draft-07/schema#", "title": "DataComplianceAuditContract", "description": "Deterministic JSON Schema for regulatory compliance, PII inspection, and dynamic data masking.", "type": "object", "required": [ "audit_id", "risk_level", "pii_detected", "findings", "compliance_frameworks", "masking_recommendations", "verdict" ], "properties": { "audit_id": { "type": "string", "pattern": "^AUDIT-[A-Z0-9_-]+$" }, "risk_level": { "type": "string", "enum": [ "LOW", "MEDIUM", "HIGH", "CRITICAL" ] }, "pii_detected": { "type": "boolean" }, "findings": { "type": "array", "items": { "type": "object", "required": [ "field_name", "category", "sensitivity", "sample_pattern" ], "properties": { "field_name": { "type": "string" }, "category": { "type": "string", "enum": [ "NATIONAL_ID", "FINANCIAL_CARD", "MOBILE_PHONE", "PASSPORT", "LOCATION_GPS", "DEVICE_IDENTIFIER", "PERSON_NAME" ] }, "sensitivity": { "type": "string", "enum": [ "PUBLIC", "INTERNAL", "CONFIDENTIAL", "RESTRICTED" ] }, "sample_pattern": { "type": "string" } } } }, "compliance_frameworks": { "type": "array", "items": { "type": "string" } }, "masking_recommendations": { "type": "array", "items": { "type": "object", "required": [ "field_name", "strategy" ], "properties": { "field_name": { "type": "string" }, "strategy": { "type": "string", "enum": [ "DYNAMIC_PARTIAL_MASK", "SHA256_HASH", "TOKENIZE", "TRUNCATE", "DROP" ] } } } }, "verdict": { "type": "string", "enum": [ "PASSED", "WARNING", "REJECTED_REMEDIATION_REQUIRED" ] } } }