Skip to content

v0.4.1

Choose a tag to compare

@github-actions github-actions released this 12 Sep 12:53
· 72 commits to main since this release

The module does not change. zopa-v0.4.1.wasm is byte-for-byte zopa-v0.4.0.wasm — SHA-256 d60e29fa1f26aa8037b05e66b1864435a6f1935c2dbfc8de510d5032f23e0082 — and nothing under src/ was touched. Upgrading changes nothing a deployment runs.

Everything here is the toolchain, the benchmark, and what a release ships alongside the wasm.

⚠️ One thing breaks, deliberately

tools/rego2ast.py now refuses four Rego constructs it used to convert:

Construct What it used to do
with input.y as ... Dropped the modifier. OPA evaluates the body against a rewritten input; zopa against the original.
deny contains msg if ... Flattened to a boolean rule. The collected set was lost, and definitions OPA unions became ones zopa reports as conflicting.
p[k] = v if ... Discarded the key, keeping only the value.
allow if a else = b if c Kept the first branch and dropped the fallback — an allow path or a deny path, depending.
f(x) if x == 1 Became a rule whose parameter resolved against the input document instead of binding, so f(x) silently became a test on input.x.

All of them converted with exit 0. If your build starts failing on one, it was already producing an AST that answered a different question than the Rego you wrote.

A patch and not a minor because no artifact moves and the refusals correct a wrong answer rather than withdraw a working feature — but it is a toolchain break and worth reading before upgrading.

Releases now carry a signed SBOM

zopa-<tag>.wasm.cdx.json (CycloneDX) plus its own cosign bundle. It is scanned against the built artifact, not the source tree: a dir:. scan of this repo reports 63 components — the Actions pinned in the workflows, plus false positives read out of .zig-cache — none of which the wasm depends on. Scanning the wasm reports zero dependency components, which is the accurate answer, annotated with the artifact's hash, licence and the Zig version that built it.

SECURITY.md documents verification end to end. Every step of it was run against this release:

zopa-v0.4.1.wasm: OK                          # checksum
cosign zopa-v0.4.1.wasm          Verified OK  # artifact signature
cosign zopa-v0.4.1.wasm.cdx.json Verified OK  # SBOM signature
slsa-verifier                        PASSED   # build provenance
sbom hash == artifact hash            MATCH

How fast is it, really

Cedar joins the benchmark — an earlier note claiming no Node-reachable Cedar binding existed was simply wrong. Per decision, microseconds:

fixture zopa (evaluate) zopa (compiled) OPA (wasm) Cedar (wasm) OPA (sidecar)
01_static 0.34 0.08 1.27 13.0 176
02_header_eq 1.05 0.21 1.09 15.7 171
03_rbac 7.20 1.57 2.52 77.2 183

A committed baseline now gates CI on these ratios, so a per-request policy parse creeping back into the compiled path fails a PR instead of shipping.

"A useful subset of Rego" is a table now

zig build test-coverage records reach over 48 constructs — currently 32 — with the gaps named in the README and CI failing on drift in either direction. Building that probe is what found the five silent conversions above.

Also: zig build bench no longer quietly measures the ~940 KB debug build, both CI opa downloads verify a pinned checksum before executing, and the release workflow keeps tag names out of the shell.

Full detail in CHANGELOG.md.


What's Changed

  • feat(bench): measure Cedar, and correct the claim that it was unreachable by @kanywst in #50
  • feat(release): attach a signed SBOM to every release by @kanywst in #51
  • feat(bench): gate CI on a committed performance baseline by @kanywst in #52
  • fix(rego2ast): stop silently changing what a policy means by @kanywst in #53
  • chore(release): 0.4.1 by @kanywst in #54

Full Changelog: v0.4.0...v0.4.1