Repository navigation
PER-14697: fix(docker): bump OPA to 1.21.4 (digest-pinned) and EOPA to v1.45.1 (verified download) to address CVEs - #906
Conversation
- OPA: 1.9.0-static -> 1.16.1-static (fixes CVE-2025-68121, golang/stdlib) - EOPA: v1.44.0 -> v1.45.1 (latest available release) Note: CVE-2026-33815 and CVE-2026-33816 (jackc/pgx/v5@5.7.6) remain unresolved — EOPA v1.45.1 still ships pgx v5.7.6 (fix requires >= 5.9.0). A new EOPA release from Styra is needed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for opal-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
…is archived - OPA 1.16.1 -> 1.21.1 (latest, built with Go 1.27.1). - EOPA: check the downloaded binary against the release's checksums.txt (per arch); a mismatch now fails the build instead of shipping it. - EOPA's upstream repo is archived, so v1.45.1 is the last release and the pgx CVEs it carries won't be fixed upstream. Replace the "waiting for Styra" TODO with that fact. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The starlette <1 cap is gone (raised to >=1.3.1,<2 by #959), so drop it from the downstream note; ddtrace <4 and the gitpython 3.1.32 floor still stand. - The workflow action-version inventory now matches master (no checkout@v4; login-action@v2 added). - Drop an unverifiable claim about GitHub's default cooldown, the OPA version pin that #906 changes, and prefix-development on github-actions (no dev deps). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The version updates and architecture-specific checksum verification are internally consistent and correctly implemented.
Review effort: Balanced
Findings: None
What changed in this PR
Updates embedded OPA/EOPA binaries to address known vulnerabilities and adds integrity verification for EOPA downloads.
Changes:
- Bumps OPA to
1.21.1-static. - Bumps EOPA to
v1.45.1. - Verifies architecture-specific EOPA downloads using pinned SHA-256 checksums.
| File | Description |
|---|---|
docker/Dockerfile |
Updates binary versions, documents residual CVEs, and adds checksum validation. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- skopeo copy picks the TARGET arch explicitly (--override-arch), so arm64 stays correct even if the stage ever runs on the build platform. The documented opa_image/opa_tag build args (#322) keep working. - Note the OPA 1.19-1.21 compiler tightenings that can reject a policy that compiled on 1.9. - EOPA note: v1.45.1 is built with go1.25.4 on OPA v1.10.1, so the Go stdlib and OPA server fixes after those stay missing too, not just pgx. - CI's real-binary argv tests now use OPA 1.21.1, the version the image ships. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zeevmoney
left a comment
There was a problem hiding this comment.
Changes requested — 1 HIGH, 1 MEDIUM, 4 LOW.
Blocking:
- HIGH
docker/Dockerfile:99— OPA 1.21.1 has been superseded by security releases 1.21.2 and 1.21.3; bump here and intests.yml:72
Non-blocking:
- MEDIUM
docker/Dockerfile:97— the policy-compatibility break isn't in the user docs, and "see the release notes" points nowhere - LOW
docker/Dockerfile:101— the OPA image is still resolved by a mutable tag - LOW
docker/Dockerfile:142— the list of unfixed pgx CVEs is incomplete - LOW
docker/Dockerfile:144— the user docs still offeropal-client-eopawithout a caveat - LOW
docker/Dockerfile:157— PR CI never buildseopa-extractoror any arm64 target, so this checksum is first checked at release
Merge readiness (not a code finding):
- The branch is one commit behind
master(#968), which added the requiredCIaggregate job totests.yml. That check can't report on this PR untilmasteris merged in. The PR's CI results date from 2026-10-01.
Details are in the inline comments on each line.
… upgrade and the EOPA caveat; arm64 binary stages in PR CI - OPA 1.21.1 -> 1.21.4 (Go 1.27.3): 1.21.2 and 1.21.4 are Go security rebuilds, 1.21.3 fixes GHSA-g2pf-6v5v-qcc8 (unsigned bundle accepted). tests.yml's real-binary tests use the same version, and their download retries. - The default OPA image is pinned by digest (opa_digest). Overriding opa_tag needs the matching opa_digest, or an empty one; the build stops and says so otherwise. - documentation/docs/tutorials/opa-version-migration.mdx: "OPA bundled in the client image", the three OPA 1.19/1.21 compiler changes that can reject a policy that loaded on 1.9, and how to check a policy repo with opa check before upgrading. - The quickstart's eOPA section warns that upstream eOPA is archived and its image keeps unfixed vulnerabilities. The pgx comment describes the class, not a list. - tests.yml: a binary-stages job builds opa-extractor and eopa-extractor for linux/amd64 and linux/arm64, so a wrong digest or checksum fails a PR, not a release. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ype check Both are in OPA's release notes (1.20.0 highlights; 1.21.0 changelog, #5658), and both can stop a policy that loaded on 1.9 from compiling. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
zeevmoney
left a comment
There was a problem hiding this comment.
Approved — no CRITICAL or HIGH issues found.
Non-blocking:
- MEDIUM
documentation/docs/tutorials/opa-version-migration.mdx:162—opa checkcan't catch the YAML change, but the section presents it as a load-time rejection - LOW
docker/Dockerfile:132— the digest check's error message is wrong in two cases - LOW
.github/workflows/tests.yml:299— the new job pins the docker actions by tag
Details are in the inline comments on each line.
…ts a failed inspect as such; docker actions pinned by SHA - Docs: the YAML 1.2 change moves out of the 'rejected at load' list into 'Not caught by opa check' (it changes data silently), with what to search for, the 1.21.3 bundle-signing change for OPA config files, and a link to OPA's changelog 1.10.0-1.21.4. The section no longer says rc.2 ships OPA 1.21.4. - Dockerfile: the manifest goes to a file, so a failed skopeo inspect (rate limit, auth, missing tag) stops the RUN with skopeo's error instead of a digest mismatch on empty input; the message and comment name opa_image as well as opa_tag. - tests.yml binary-stages: setup-qemu-action and setup-buildx-action pinned by SHA (v3.7.0, v3.12.0), the major on_release.yml uses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- The starlette <1 cap is gone (raised to >=1.3.1,<2 by #959), so drop it from the downstream note; ddtrace <4 and the gitpython 3.1.32 floor still stand. - The workflow action-version inventory now matches master (no checkout@v4; login-action@v2 added). - Drop an unverifiable claim about GitHub's default cooldown, the OPA version pin that #906 changes, and prefix-development on github-actions (no dev deps). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary
OPA:
1.9.0-static→1.21.4-static(2026-10-23, built with Go 1.27.3), the latest security release:The old binary was built with Go 1.25.1, which carries CVE-2025-68121 and later Go stdlib CVEs.
opa_digestdefaults to the1.21.4-staticindex (linux/amd64 and linux/arm64). The build checks that the tag resolves to it, then copies by digest.opa_image/opa_tagbuild args ([enh] Add opa_image Dockerfile build argument #322) keep working. An override needs the matchingopa_digest, or an empty one; otherwise the build stops and says so.skopeo copynow passes--override-arch "${TARGETARCH}", so the arch is explicit rather than an accident of the stage running emulated.EOPA:
v1.44.0→v1.45.1. The download is now checked against the release'schecksums.txtfor each arch; before,wgetoutput went into the image unchecked.CI:
1.21.4, the same version the image ships (they were on1.20.2), and the download retries.binary-stagesjob buildsopa-extractorandeopa-extractorfor linux/amd64 and linux/arm64, so a wrong digest or checksum fails a PR rather than a release.Docs:
opa-version-migration.mdxgets a section, "OPA bundled in the client image", covering the changes below and theopa checkcommands.Merged
masteras of 2026-10-27 (5f0e875).OPA 1.19–1.21 tightened the compiler, and OPAL loads user policies through
PUT /v1/policies. A policy that compiled on 1.9 can therefore be rejected at load time on the new client image, with or without--v0-compatible::=. Policies that unified backwards through:=now fail withrego_unsafe_var_error.{},[],set()) are typed as empty, so selecting from or iterating them fails to compile.inis type-checked (#5658).yes/no/on/offare strings, including in--config-file.and/orkeywords, whichimport future.keywordsnow pulls in.Users should run
opa check(plus--v0-compatibleif they use it) with 1.21.4 against their policy repo before upgrading. The user docs now say so.OPAL's
opa runflags and the REST endpoints it uses (/v1/policies,/v1/data,/health) are unchanged. The real-binary argv tests pass on 1.21.4 (15 passed). OPAL's own policies and fixtures checked identically on 1.9.0 and 1.21.1.Resolved
Measured with Trivy (CRITICAL/HIGH, amd64):
permitio/opal-client:latest(0.9.9) is OPA 1.9.0 and carries 54 findings, including CVE-2025-68121 (CRITICAL, Go stdlib 1.25.1) and CVE-2026-33186 (CRITICAL, grpc 1.75.1).master(5f0e875) and 0.10.0-rc.1 still pin 1.9.0.The image scan of this branch is in the verification below.
permitio/opal-clientgolang/stdlib@1.25.1Not resolvable upstream (EOPA image)
open-policy-agent/eopais archived, so v1.45.1 is its last release. That binary is built with go1.25.4 on OPA v1.10.1 and bundles pgx v5.7.6. Inpermitio/opal-client-eopathese stay unfixed for good:The Dockerfile and the quickstart docs say so, and recommend retiring the EOPA variant.
Verified locally
opa-extractorandeopa-extractorstages build for linux/amd64 and linux/arm64, each with the correct-arch static binary.opa_digeststops with the expected digest and the fix;opa_tag=1.21.3-staticwithout a digest stops with the same message;opa_digestbuilds.EOPA_SHA256_x86_64fails the build atsha256sum -c.Not changed here (already on master)
alpine:latestin the two extractor stages, the tag-onlypermitio/cedar-agent:0.2.1, and the unchecked libgit2 tarball download are floating or unverified inputs. They're worth their own follow-up.Description updated during review to match 66a8c1e: OPA 1.21.4, digest pin, docs, arm64 stages in CI.
🤖 Generated with Claude Code