Skip to content

fix(toolbox): unbreak main on CVE-2026-56854, fix syft, VEX the rest - #62

Merged
garymike merged 1 commit into
mainfrom
fix/crypto-cve-vex-and-syft
Sep 7, 2026
Merged

garymike merged 1 commit into
mainfrom
fix/crypto-cve-vex-and-syft

Conversation

@garymike

@garymike garymike commented Sep 7, 2026

Copy link
Copy Markdown
Owner

main has been failing since 2026-09-07 and the published images have been stale since 2026-08-31.

What broke

Trivy's CRITICAL gate started firing on CVE-2026-56854 (golang.org/x/crypto/ssh, authentication bypass via unenforced source-address restrictions) in three vendored Go binaries. The CVE landed in Trivy's database after the last green build, so nothing in the repo changed. The gate simply learned about it and did its job.

Dependabot #60 and #61 are blocked by this same failure and have nothing to do with it. #59 is unrelated and clean.

Fixed what is fixable

syft 1.46.0 to 1.51.1. That release ships x/crypto 0.55.0, which is the fix version. Verified by rebuilding the image and rescanning: syft now reports zero. The upstream release publishes checksums the Dockerfile already verifies, so the ARG bump is the entire change.

Excepted only what is not fixable

Tool Latest x/crypto Fixed?
syft 1.51.1 0.55.0 yes, bumped
osv-scanner 2.5.1 0.54.0 no, below fix
betterleaks 1.8.1 0.53.0 no, below fix

No upgrade resolves the latter two today. Rather than blanket-suppress, this adds an OpenVEX document declaring not_affected with justification vulnerable_code_not_in_execute_path:

  • The vulnerable path is the SSH server enforcing authorized_keys source-address restrictions. These images run no SSH server.
  • Both are short-lived CLI processes over a read-only source tree; neither listens on a socket.
  • betterleaks contains no reference to crypto/ssh at all (upstream code search: zero results).
  • x/crypto is an indirect dependency of both.

The exception is deliberately narrow. It is scoped to the two affected x/crypto versions, so a tool that upgrades past 0.55.0 stops matching and the gate re-arms on its own. That is precisely why syft is absent from the document despite having been affected.

Verification

  • Reproduced the CRITICAL on the published image, and on a fresh local build
  • After the syft bump: syft 0 findings, betterleaks and osv-scanner 1 each
  • Scan exits 1 without the VEX and 0 with it
  • Confirmed via both --vex and the TRIVY_VEX env var, since trivy-action v0.36.0 has no vex input; its entrypoint passes TRIVY_* through
  • Wired into all three Trivy steps (2 in build-toolbox.yml, 1 in dogfood-scan.yml); both workflows still parse as valid YAML
  • Every added line em-dash and en-dash free; commit signed as MG <[email protected]>

Follow-ups, not in this PR

Upstream issues asking betterleaks and osv-scanner to bump x/crypto (the VEX action_statement records this). Separately, check-tool-updates.sh reports 9 of 11 pinned tools behind, none visible to Dependabot because they are URL and commit pins rather than manifests.

main has been failing since 2026-09-07 and the published images have been
stale since 2026-08-31. Trivy's CRITICAL gate started firing on
CVE-2026-56854 (golang.org/x/crypto/ssh, authentication bypass via
unenforced source-address restrictions) in three vendored Go binaries. The
CVE landed in Trivy's database after the last green build, so nothing in
the repo changed; the gate simply learned about it. Dependabot PRs #60 and
#61 are blocked by the same thing and have nothing to do with it.

Fixed what is fixable. syft 1.46.0 to 1.51.1, because 1.51.1 ships
x/crypto 0.55.0, which is the fix version. Verified by building the image
and rescanning: syft now reports zero. The upstream release publishes
checksums that the Dockerfile already verifies, so the ARG bump is the
whole change.

Excepted only what is not fixable. betterleaks 1.8.1 and osv-scanner 2.5.1
still ship x/crypto 0.53.0 and 0.54.0, both below the 0.55.0 fix, so no
upgrade resolves them today. Rather than suppress the finding, this adds an
OpenVEX document declaring not_affected with justification
vulnerable_code_not_in_execute_path: the vulnerable path is the SSH SERVER
enforcing authorized_keys source-address restrictions, and these images run
no SSH server. Both binaries are short-lived CLI processes over a read-only
source tree, neither listens on a socket, and betterleaks contains no
reference to crypto/ssh at all.

The exception is deliberately narrow. It is scoped to the two affected
x/crypto versions, so a tool that upgrades past 0.55.0 stops matching and
the gate re-arms by itself. That is why syft is absent from the document
despite having been affected.

Verified locally against both the published image and a fresh build: the
scan exits 1 without the VEX and 0 with it, via the file path and via the
TRIVY_VEX environment variable the action passes through, since
trivy-action v0.36.0 has no vex input.
@garymike
garymike merged commit b79a8be into main Sep 7, 2026
9 checks passed
@garymike
garymike deleted the fix/crypto-cve-vex-and-syft branch September 7, 2026 23:50
garymike added a commit that referenced this pull request Oct 21, 2026
…#87)

GHSA-6q48-6c7w-9gw2 (CRITICAL): certifi bundles emSign root CAs whose
intermediate keys were compromised. Fixed in certifi 2026.10.19.

The vulnerable copy is pip's vendored one, which `pip install` cannot reach.
Three different versions were in play, which is what made this confusing to
read off a Trivy table:

  site-packages/certifi              2026.10.19  already fine, resolves on its own
  pip/_vendor/certifi                2026.6.17   from the python base layer, flagged

pip 26.2.2 vendors certifi 2026.10.19, so this is a fix and not a VEX
exception. .trivy/toolbox.openvex.json already states the rule: a fixable
finding is fixed, not excepted.

Done in the base final stage because all five domain images inherit
FROM ${BASE}, and the vulnerable copy came from the shared python layer
rather than from anything they install. Pinned as ARG PIP_VERSION with a
tools.lock row rather than a bare --upgrade, so the drift gate tracks it and
apply-tool-bumps.py can move it later: arg_name("pip") is PIP_VERSION, which
matches the applier's convention.

Verified: base reports pip 26.2.2 with vendored certifi 2026.10.19 and all
four scanners still run. A derived skill-audit image built on it has BOTH
copies at 2026.10.19, so the fix survives FROM and the derived pip install
does not pull an older certifi into site-packages, which would have moved the
finding rather than removed it. Drift check reports pip up to date.

No changelog entry, matching #75 and #62, the two previous CVE unbreak-main
fixes.

Co-authored-by: Claude Opus 5 <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant