{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://crawlcheck.io/schemas/policy.json","title":"crawlcheck-policy v1","type":"object","additionalProperties":false,"properties":{"kind":{"const":"crawlcheck-policy"},"v":{"const":1},"name":{"type":"string","maxLength":120},"description":{"type":"string","maxLength":600},"defaults":{"$ref":"#/$defs/rules"},"actions":{"type":"object","additionalProperties":false,"properties":{"read":{"$ref":"#/$defs/rules"},"cite":{"$ref":"#/$defs/rules"},"connect":{"$ref":"#/$defs/rules"},"transact":{"$ref":"#/$defs/rules"},"administer":{"$ref":"#/$defs/rules"}}},"tests":{"type":"array","maxItems":50,"items":{"type":"object","required":["domain","expect"],"properties":{"domain":{"type":"string"},"action":{"enum":["read","cite","connect","transact","administer"]},"agent":{"type":"string"},"note":{"type":"string"},"expect":{"oneOf":[{"$ref":"#/$defs/decision"},{"type":"array","items":{"$ref":"#/$defs/decision"},"minItems":1}]}}}}},"$defs":{"decision":{"enum":["allow","warn","require_confirmation","block","unsupported"]},"rules":{"type":"object","additionalProperties":false,"properties":{"max_age_hours":{"type":["number","null"],"minimum":0,"maximum":8760},"on_warn":{"enum":["warn","require_confirmation","block"]},"require_entity":{"type":"boolean"},"human_approval":{"type":"array","items":{"enum":["read","cite","connect","transact","administer"]}},"allow":{"type":"array","items":{"type":"string"},"maxItems":500},"deny":{"type":"array","items":{"type":"string"},"maxItems":500}}}}}