Repository navigation
Releases
v0.8.0
What's Changed
- chore(deps): bump the ci group with 2 updates by @dependabot[bot] in #84
- ci(oci): retry cosign sign when the Rekor upload fails by @kanywst in #85
- chore(deps): bump the ci group with 6 updates by @dependabot[bot] in #86
- chore(deps): bump anthropics/claude-code-action from 1.0.270 to 1.0.278 in the ci group by @dependabot[bot] in #87
- feat: bind the key in some k, v in xs and every k, v in xs by @kanywst in #88
- chore(release): 0.8.0 by @kanywst in #89
Full Changelog: v0.7.0...v0.8.0
v0.7.0
What's Changed
- chore(deps): bump the ci group with 3 updates by @dependabot[bot] in #77
- chore(deps): bump the ci group with 7 updates by @dependabot[bot] in #78
- chore(deps): bump the ci group with 3 updates by @dependabot[bot] in #79
- chore(deps): bump wasmtime from 49.0.0 to 50.0.1 in /test by @dependabot[bot] in #80
- chore(deps): bump the ci group with 5 updates by @dependabot[bot] in #81
- feat: convert standalone some x in xs by @kanywst in #82
Full Changelog: v0.6.1...v0.7.0
v0.6.1
v0.6.0
What's Changed
- docs: record v0.4.x and v0.5.0 on the roadmap by @kanywst in #61
- feat(bench): measure Cedar natively, not just through its wasm binding by @kanywst in #62
- chore(deps): bump the ci group with 2 updates by @dependabot[bot] in #63
- chore(deps): bump wasmtime from 48.0.0 to 49.0.0 in /test by @dependabot[bot] in #64
- chore(deps): bump the ci group with 5 updates by @dependabot[bot] in #65
- chore(deps): bump the ci group with 2 updates by @dependabot[bot] in #66
- fix(json): drop values shadowed by a duplicate key at parse time by @kanywst in #67
- fix(eval): fail the body when a negated call's argument is undefined by @kanywst in #68
- fix: make every agree with OPA (object values, undefined sources) by @kanywst in #69
- feat(eval): add the
inmembership operator by @kanywst in #72 - chore(release): 0.6.0 by @kanywst in #73
Full Changelog: v0.5.0...v0.6.0
v0.5.0
What's Changed
- feat(ast): support array indices in ref paths by @kanywst in #55
- fix: close the review findings that landed after their PRs merged by @kanywst in #56
- feat(ast): support
:=assignment in rule bodies by @kanywst in #57 - feat(proxy-wasm): let a deployment name its targets by @kanywst in #58
- chore(release): 0.5.0 by @kanywst in #59
- fix(release): accept syft's empty-scan sbom shape by @kanywst in #60
Full Changelog: v0.4.1...v0.5.0
v0.4.1
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
v0.4.0
Compiled policies on the generic ABI. Additive — evaluate, evaluate_target and evaluate_addressed are unchanged and every existing caller keeps working.
policy_compile(ast) -> handle
evaluate_compiled(handle, input) -> 1 | 0 | -1
evaluate_compiled_addressed(handle, input, package, rule) -> 1 | 0 | -1
policy_release(handle) -> 1 | 0
Driving the same policy through evaluate costs a JSON parse and an AST build on every decision: the export is handed the policy bytes each call and cannot know they are the ones it parsed last time. Build it once instead and the benchmark's RBAC fixture goes from 5.76 µs to 1.32 µs — ahead of OPA-in-wasm's 2.24 µs, where the one-shot path was behind it. This is the arrangement the proxy-wasm filter has always used internally.
Handles are validated, and carry the generation of the slot they were issued for as well as its index, so a stale handle denies even after its slot has been reused. The host owns the handle and must release it.
A cross-engine benchmark. zig build bench now runs zopa in both shapes, OPA compiled to WASM, and an OPA HTTP sidecar over the same fixtures, and refuses to time anything until all of them return the same decision.
| Per decision (µs) | zopa (evaluate) | zopa (compiled) | OPA (wasm) | OPA (sidecar) |
|---|---|---|---|---|
01_static |
0.36 | 0.08 | 0.82 | 138 |
02_header_eq |
0.97 | 0.19 | 0.96 | 132 |
03_rbac |
5.76 | 1.32 | 2.24 | 149 |
Two corrections the benchmark forced. Both are the kind of thing that only surfaces once you measure instead of assert:
- The README said OPA's WASM build was "~30 MB" and two orders of magnitude larger than zopa. Measured,
opa build -t wasmemits 134 KB for a one-line policy and 149 KB for a sixty-rule one. The ~30 MB figure was the OPA binary (40 MB). The real ratio is about 2x, not 500x — zopa's size advantage is real but different in kind: one module serves every policy, where OPA emits one per policy. - The first cut of the compiled-policy handles could resolve to the wrong policy after a released slot was reused, while the docs claimed a stale handle always denies. Fixed with a generation counter before this release; no shipped version ever carried the bug.
Also: zig build bench used to measure the ~940 KB debug build when run without --release=small, both CI opa downloads now verify a pinned checksum before executing the binary, and the code of conduct no longer implies zopa is a CNCF project.
Full detail in CHANGELOG.md.
What's Changed
- docs(proposals): say which designs actually shipped by @kanywst in #43
- docs: stop hard-wrapping prose across the docs by @kanywst in #44
- feat(bench): compare zopa against OPA in wasm and as a sidecar by @kanywst in #45
- feat(abi): let generic hosts compile a policy once and hold it by @kanywst in #46
- docs: stop implying zopa is a CNCF project by @kanywst in #47
- fix(policy): stop a reused slot from resolving a stale handle by @kanywst in #48
- chore(release): 0.4.0 by @kanywst in #49
Full Changelog: v0.3.1...v0.4.0
v0.3.1
A licensing correction, and nothing else. If you redistribute zopa, take this release. If you only run it, v0.3.0 is the same module.
zopa 0.1.0 through 0.3.0 shipped a LICENSE that was not the Apache License 2.0. Two clauses had been reworded:
- Clause 6 (Trademarks) had lost
reasonable and customary use in, narrowing the trademark carve-out. - Clause 9 (Accepting Warranty or Additional Liability) had replaced the
choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liabilitygrant with different wording.
The README badge, the CHANGELOG, and the image's org.opencontainers.image.licenses="Apache-2.0" label all pointed at that file. Anyone who redistributed zopa under those terms was passing on text the project never meant to grant. The intended license was always Apache 2.0, and that has not changed.
What this release does
LICENSEis the canonical Apache License 2.0 again, byte for byte — SHA-256cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30.- The copyright assertion moved to a new
NOTICE, where the license appendix says to put it. Clause 4(d) makesNOTICEtravel with the Work, so it now ships in the Zig package (build.zig.zon.paths) and in the OCI image, which previously carried neither file. - GitHub reports the repository license as
Apache-2.0again instead ofNOASSERTION.
The module is unchanged, and that is checkable
zopa-v0.3.1.wasm has SHA-256 3513c6319aec36fa8a84c96117097189ab0cbac5a557cf444cb55c41924ed34f — identical to zopa-v0.3.0.wasm. No source, AST, or evaluation semantics changed; zig build --release=small on this tag reproduces the earlier artifact exactly.
What's Changed
- chore(deps): bump docker/setup-buildx-action from 4.2.0 to 4.3.0 in the ci group by @dependabot[bot] in #36
- chore(deps): bump wasmtime from 47.0.1 to 48.0.0 in /test by @dependabot[bot] in #37
- chore(deps): bump the ci group with 2 updates by @dependabot[bot] in #38
- chore(deps): bump the ci group with 4 updates by @dependabot[bot] in #39
- chore(deps): bump the ci group with 2 updates by @dependabot[bot] in #40
- fix(license): restore the canonical Apache 2.0 text and add NOTICE by @kanywst in #41
- chore(release): 0.3.1 by @kanywst in #42
Full Changelog: v0.3.0...v0.3.1
v0.3.0
What's Changed
- chore(deps): bump step-security/harden-runner from 2.19.1 to 2.19.3 in the ci group by @dependabot[bot] in #17
- chore(deps): bump the ci group with 3 updates by @dependabot[bot] in #18
- chore(deps): bump wasmtime from 44.0.0 to 45.0.0 in /test by @dependabot[bot] in #19
- chore(deps): bump the ci group with 4 updates by @dependabot[bot] in #20
- chore(deps): bump the ci group with 2 updates by @dependabot[bot] in #21
- chore(deps): bump actions/checkout from 6.0.3 to 7.0.0 in the ci group by @dependabot[bot] in #22
- chore(deps): bump the ci group with 2 updates by @dependabot[bot] in #23
- chore(deps): bump wasmtime from 45.0.0 to 46.0.1 in /test by @dependabot[bot] in #24
- chore(deps): bump the ci group with 5 updates by @dependabot[bot] in #25
- chore(deps): bump the ci group with 4 updates by @dependabot[bot] in #26
- bump the ci group with 3 updates by @dependabot[bot] in #27
- chore(deps): bump wasmtime from 46.0.1 to 47.0.1 in /test by @dependabot[bot] in #28
- chore(deps): bump the ci group with 6 updates by @dependabot[bot] in #29
- chore(deps): bump docker/login-action from 4.5.0 to 4.5.2 in the ci group by @dependabot[bot] in #30
- chore(deps): bump the ci group with 3 updates by @dependabot[bot] in #31
- chore(deps): bump the ci group with 2 updates by @dependabot[bot] in #32
- chore(deps): bump the ci group with 2 updates by @dependabot[bot] in #33
- fix: close the fail-open paths, fix package-scoped rule dispatch by @kanywst in #34
- chore(release): 0.3.0 by @kanywst in #35
Full Changelog: v0.2.0...v0.3.0
v0.2.0
What's Changed
- chore(deps): bump the ci group with 2 updates by @dependabot[bot] in #5
- proposal: OPA conformance harness by @kanywst in #9
- proposal: proxy-wasm 0.3.x support by @kanywst in #14
- proposal: distroless OCI image by @kanywst in #13
- proposal: string and collection builtins by @kanywst in #11
- proposal: composite ref iteration by @kanywst in #10
- proposal: multiple policies per VM by @kanywst in #12
- proposal: streaming evaluation by @kanywst in #15
- proposal: benchmark harness vs OPA / Cedar by @kanywst in #8
- proposal: response-side policies by @kanywst in #7
- proposal: body-aware policies by @kanywst in #6
- chore(release): prep v0.2.0 by @kanywst in #16
Full Changelog: v0.1.0...v0.2.0