|
| 1 | +# Runtime image Trivy remediation — 2026-07-30 |
| 2 | + |
| 3 | +## Scope |
| 4 | + |
| 5 | +This record covers the API runtime image only. It does not claim a signed |
| 6 | +registry release, an external penetration test, or production acceptance. |
| 7 | + |
| 8 | +## Trigger |
| 9 | + |
| 10 | +GitHub Actions Security Scan run |
| 11 | +[`30570556301`](https://github.com/brownjuly2003-code/agentflow/actions/runs/30570556301) |
| 12 | +scanned commit `72b960930302ecbced46c89479a5b09082f0a406` with Trivy `0.70.0`. |
| 13 | +The image job reported: |
| 14 | + |
| 15 | +- `GHSA-6v7p-g79w-8964`: vendored `msgpack 1.1.2`; |
| 16 | +- `CVE-2025-47273`: stale `setuptools 70.3.0`. |
| 17 | + |
| 18 | +The uploaded CycloneDX SBOM associated both findings with the final installer |
| 19 | +layer and no application package path. The same layer listed other packages |
| 20 | +vendored by `pip`, while the actual installed setuptools distribution was the |
| 21 | +already-fixed `82.0.1`. Neither vulnerable version came from |
| 22 | +`requirements-docker.lock`. |
| 23 | + |
| 24 | +## Remediation |
| 25 | + |
| 26 | +`Dockerfile.api` still performs the hash-locked dependency install, installs |
| 27 | +the AgentFlow wheel with `--no-deps`, and runs `pip check`. It then removes |
| 28 | +runtime-only installer tooling: |
| 29 | + |
| 30 | +```dockerfile |
| 31 | +python -m pip uninstall --yes pip setuptools wheel |
| 32 | +``` |
| 33 | + |
| 34 | +The builder stage is unchanged. A unit contract requires the uninstall to |
| 35 | +remain in the final stage and after `pip check`. |
| 36 | + |
| 37 | +## Independent Mac validation |
| 38 | + |
| 39 | +Validation used an isolated clone at |
| 40 | +`/tmp/agentflow-security-72b9609-codex-01`, based on exact commit |
| 41 | +`72b960930302ecbced46c89479a5b09082f0a406`, plus the candidate |
| 42 | +image-affecting files: |
| 43 | + |
| 44 | +- `Dockerfile.api` blob `9cc33d81a88802991f632225a45f9422ab8e4358`; |
| 45 | +- `src/quality/monitors/metrics_collector.py` blob |
| 46 | + `475c656b0c7de9418e2447bd6b5cca36b9026146`. |
| 47 | + |
| 48 | +The image was built from the pinned `python:3.11-slim` digest already declared |
| 49 | +in `Dockerfile.api`: |
| 50 | + |
| 51 | +```text |
| 52 | +agentflow-api:security-codex-72b9609 |
| 53 | +manifest list sha256:934357fe14e8f6ed3a712eb7ae8bec1a369aad06f54691eadd2b8aa7e2cd1591 |
| 54 | +``` |
| 55 | + |
| 56 | +Build output confirmed that `pip 26.2`, `setuptools 82.0.1`, and `wheel 0.47.0` |
| 57 | +were uninstalled only after `pip check` returned |
| 58 | +`No broken requirements found`. |
| 59 | + |
| 60 | +Runtime checks: |
| 61 | + |
| 62 | +- `python -m pip --version` failed with `No module named pip` as intended; |
| 63 | +- `from src.serving.api.main import app` succeeded (`AgentFlow Query API`); |
| 64 | +- Trivy `0.70.0`, with `HIGH,CRITICAL`, `--ignore-unfixed`, and |
| 65 | + `--exit-code 1`, exited `0`; |
| 66 | +- Trivy summary: Debian `13.5` vulnerabilities `0`; every detected Python |
| 67 | + package vulnerabilities `0`. |
| 68 | + |
| 69 | +## Evidence boundary |
| 70 | + |
| 71 | +This is content-level local acceptance of the candidate runtime image. The |
| 72 | +next pushed SHA must still pass the repository's GitHub Security Scan and all |
| 73 | +other required checks. Published-image signing and external penetration-test |
| 74 | +evidence remain separate gates. |
0 commit comments