Skip to content

Add a Conftest evaluation example #23

@kmadan

Description

@kmadan

Goal

Demonstrate evaluating GOPAL policies via Conftest — the most common OPA front-end for non-Kubernetes use cases.

Why this matters

Many platform teams already use Conftest in CI for Terraform, Kubernetes manifests, or Dockerfiles. Showing Conftest + GOPAL widens the addressable user base directly into the OPA ecosystem without asking anyone to learn new tooling.

Files likely involved

  • `examples/conftest/README.md` (new) — Conftest mental model vs raw `opa eval`
  • `examples/conftest/policy/` (new) — symlink, vendor, or import-only Rego pointing at GOPAL
  • `examples/conftest/input.json` (new) — sample AI-system payload
  • `examples/conftest/run.sh` (new) — wraps `conftest test input.json -p policy/`

Acceptance criteria

  • `./run.sh` runs Conftest against a GOPAL policy and produces a structured pass/fail
  • README documents the Conftest install step and any caveats (e.g., bundle path, namespace)
  • At least one failing-case input demonstrates a non-zero exit code
  • `examples/README.md` links to the new example

Get help

Comment here. Existing Conftest experience helpful but not required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    examplesRunnable demos and example payloadshelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions