Preview. This part of the console is still being built. What you see here describes the intended behavior and can change before general availability.
Import Rego policies
If you already run Open Policy Agent, you have spent real effort on those policies. You should not have to rewrite them, and you should not be locked in once they move.
Where Rego can come from
Use Guard Center, then Policies, then Import Rego. It accepts Rego from the editor, files, an OPA bundle, OCI, Git, a Gatekeeper template, Conftest or Conforma.
What the import does
- Dwaar validates the Rego and reports errors, warnings and information.
- Each
deny,violationandwarnrule becomes a control. - You choose the checkpoint, and that choice sets the family.
- You dry run it.
- You save it in observe or audit, never directly in enforce.
Getting policies back out
Export gives any policy back as an OPA bundle, as Rego files, or as Dwaar JSON. A policy you can export is a policy you actually own.
Try this next
Import a single policy you already trust and compare its dry run with what you expect it to catch. Then read Guard Center for how to roll it out.