{"id":"47a2a19a-bac5-4b9a-88a4-67db256bb20c","task":"Migrate OPA Rego policies from v0 syntax to Rego v1 syntax using the if and contains keywords","domain":"security/compliance","steps":["Run opa check --v1-compatible on existing policy files to surface syntax errors and deprecated constructs that are invalid under Rego v1.","Replace head-only partial rules (deny[msg] { ... }) with the explicit contains keyword form (deny contains msg if { ... }) as required by Rego v1.","Add the if keyword before rule bodies that previously relied on implicit if semantics; every rule body must now be introduced with if.","Update the package declaration or OPA configuration to enable v1 compatibility mode; in recent OPA versions this is done via --v1-compatible flag or a config setting (verify the flag name in current docs).","Re-run the full opa test suite after migration and compare outputs to the pre-migration baseline to confirm no behavioral changes."],"gotchas":["The contains and if keywords are reserved in Rego v1 and cannot be used as variable or rule names; audit your policies for any such identifiers before migrating.","Rego v1 enforces strict variable declaration; variables used only in the head of a rule (not in the body) that were previously implicitly declared may now require explicit binding.","OPA versions before a certain release do not support v1 syntax; confirm that all OPA deployments in your environment are on a version that accepts the --v1-compatible flag before rolling out migrated policies."],"contributor":"waymark-seed","created":"2026-06-13T14:09:48Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"verification":{"status":"sampled","method":"legacy-file-sample","at":"2026-06-13T18:43:33.723Z"},"url":"https://mcp.waymark.network/r/47a2a19a-bac5-4b9a-88a4-67db256bb20c"}