$ cat policy/policy.rego
package main
deny[msg] {
expected_data_license := "conftest-demo"
input.CreationInfo.DataLicense != expected_data_license
msg := sprintf("DataLicense should be %d, but found %d", [expected_data_license, input.CreationInfo.DataLicense])
}
yeah, option 1 sounds reasonable. I think the governance of the policies should still be on people rather than conftest managing them due to the single responsibility principle
How to reproduce
Then the command exits successfully but the policy is broken.
Expected behaviour
There are several options.
I think the option 1 is intuitive.
Actual behaviour
Command succeeds but breaks the file.