Skip to content

fix(security): clear the v0.1.0 Trivy gate — CVE upgrades + pip-less runtime images - #166

Merged
alovladi007 merged 1 commit into
mainfrom
fix/cve-dependency-bumps
Jul 30, 2026
Merged

fix(security): clear the v0.1.0 Trivy gate — CVE upgrades + pip-less runtime images#166
alovladi007 merged 1 commit into
mainfrom
fix/cve-dependency-bumps

Conversation

@alovladi007

Copy link
Copy Markdown
Owner

The Trivy gate stopped the release on 11 fixable findings per image — all cleared honestly

  • python-jose 3.5.0 (CRITICAL ECDSA algorithm-confusion CVE in our JWT library), python-multipart 0.0.32 (5 DoS HIGHs on the login-form path), fastapi 0.141.1 / starlette 1.3.1 (3 HIGHs; coupled jump), pydantic 2.13.4, instrumentator ≥8 (6.x can't walk starlette 1.x — the one upgrade break, caught by the suites), cryptography 48.0.1, msgpack/setuptools floors.
  • Runtime images drop pip entirely: pip 26.2 vendors msgpack 1.1.2 + setuptools 70.3.0 with no patched release to move to — and runtime containers shouldn't install packages anyway. Rebuilt image scans zero fixable HIGH/CRITICAL with the gate's exact flags.
  • CD gains security-events: write (SARIF upload was failing).
  • Tracing test fixture made collection-order-proof.

Verified

Full compose stack rebuilt on the new set: migrate 0, backends healthy, smoke 4/4. Suites 304/440/68/88. After merge: re-point v0.1.0 → third CD firing should clear every stage.

🤖 Generated with Claude Code

…+ pip-less runtime images

The second CD firing did its job: the Trivy HIGH/CRITICAL gate stopped the
release on 11 fixable findings per image. All cleared, the honest way:

Dependency upgrades (full suites green on the new set):
- python-jose 3.3.0 → 3.5.0 — CRITICAL CVE-2024-33663 (ECDSA algorithm
  confusion) in OUR JWT LIBRARY.
- python-multipart 0.0.6 → 0.0.32 (5 HIGH DoS CVEs — login form parsing
  runs through this).
- fastapi 0.104.1 → 0.141.1 / starlette <0.28 → 1.3.1 (3 HIGH CVEs;
  starlette is fastapi-pinned so this is the coupled jump), pydantic
  2.5.0 → 2.13.4, prometheus-fastapi-instrumentator >=8 (6.x cannot walk
  starlette 1.x routes — the one break the upgrade caused, caught by the
  lims suite going 66-red until the bump).
- cryptography pinned 48.0.1 (2 HIGHs fixed vs 44.x; 49.0.0's macOS wheel
  is broken — 48.0.1 imports clean on every platform we build on).
- msgpack >=1.2.1, setuptools >=78.1.1 explicit floors.

Runtime images (all three backends):
- Upgrade pip/setuptools/wheel BEFORE dependency install (stale toolchain
  carried fixable HIGHs into every image).
- Then REMOVE pip from the runtime image entirely: pip 26.2 VENDORS
  msgpack 1.1.2 + setuptools 70.3.0 (pip/_vendor) with no patched pip
  release to move to — and runtime containers have no business installing
  packages anyway. Zero fixable HIGH/CRITICAL findings on the rebuilt
  image, verified with a --pull --no-cache build + local Trivy using the
  same flags as the gate.

CD workflow: security-events: write on the build job (the SARIF upload
failed "Resource not accessible by integration" without it).

Tests: the shared tracing fixture now attaches its exporter to whichever
tracer provider actually won the single-shot global slot, so the suite
holds under any pytest collection order (the instrumentator upgrade
surfaced a cross-suite pollution only reachable in combined invocations
CI never runs — fixed anyway).

Verified live: full compose stack rebuilt on the new set — migrate exit 0,
all backends healthy, 4-test smoke green. Suites: analysis 304, pc 440,
lims 68, shared 88.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@alovladi007
alovladi007 merged commit 490f35d into main Jul 30, 2026
17 checks passed
@alovladi007
alovladi007 deleted the fix/cve-dependency-bumps branch July 30, 2026 23:56
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