github open-policy-agent/opa v0.66.0

3 days ago

v0.66.0

This release contains a mix of features, performance improvements, and bugfixes.

Improved Test Reports (2546)

The opa test command now includes a new --var-values flag that enriches reporting of failed tests with the values and locations for variables in the failing expression.
E.g.:

FAILURES
--------------------------------------------------------------------------------
data.test.test_my_policy: FAIL (0ms)

  test.rego:8:
    	x == y + z
    	|    |   |
    	|    |   3
    	|    y + z: 5
    	|    y: 2
    	1

SUMMARY
--------------------------------------------------------------------------------
test.rego:
data.test.test_foo: FAIL (0ms)
--------------------------------------------------------------------------------
FAIL: 1/1

Authored by @johanfylling, reported by @grosser.

Reading stdin in opa exec (#6538)

The opa exec command now supports reading input documents from stdin with the --stdin-input (-I) flag.
E.g.:

$ echo '{"user": "alice"}' | opa exec --stdin-input --bundle my_bundle

Authored by @colinjlacy, reported by @humbertoc-silva.

Topdown and Rego

Runtime, Tooling, SDK

  • build: Use chainguard images from dockerhub (#6830) authored by @srenatus
  • bundle: Preallocate buffers for file contents. (#6818) authored by @philipaconrad
  • plugins: Reduce locks during decision logging (#6797) authored by @mjungsbluth
  • plugins/rest: Do local map modification in OAuth2 client credentials flow (#6769) authored and reported by @eubaranov
  • loader: Use a better error message when trying to merge non-objects (#6803) authored by @anderseknert
  • server/authorizer: Fix gzip payload handling (#6804) authored by @philipaconrad reported by @nevumx

Docs, Website, Ecosystem

Miscellaneous

  • Dependency updates; notably:
    • build(go): bump golang from 1.22.3 to 1.22.4
    • build(deps): bump github.com/containerd/containerd from 1.7.17 to 1.7.18
    • build(deps): bump golang.org/x/net from 0.25.0 to 0.26.0

Don't miss a new opa release

NewReleases is sending notifications on new releases.