This pull request implemented the policy package loader. The package loader loads a collection of policy rules (bundle / package) from file system. The main logic is similar to conftest, we compile the rules with OPA, then traversal all rules under the main namespace, and filter out rules start with deny_ / warn_ / violation_. These rules will be annotated with source location etc for later querying and inspection.
This pull request implemented the policy package loader. The package loader loads a collection of policy rules (bundle / package) from file system. The main logic is similar to conftest, we compile the rules with OPA, then traversal all rules under the main namespace, and filter out rules start with
deny_
/warn_
/violation_
. These rules will be annotated with source location etc for later querying and inspection.