Skip to content

fix(deploy): rebase SMCP image on Amazon Linux 2023 (eliminates base-image CVEs)#5

Merged
taferh merged 1 commit into
swiss-rocketsfrom
feat/al2023-base
Jun 11, 2026
Merged

fix(deploy): rebase SMCP image on Amazon Linux 2023 (eliminates base-image CVEs)#5
taferh merged 1 commit into
swiss-rocketsfrom
feat/al2023-base

Conversation

@taferh

@taferh taferh commented Jun 11, 2026

Copy link
Copy Markdown
Collaborator

What

Rebase the SMCP image from python:3.12-slim (Debian) onto public.ecr.aws/amazonlinux/amazonlinux:2023.

Why

The first Harbor scan of the CI-built image flagged 2 CRITICAL + 8 HIGH, all in the Debian base userland (perl-base ×2 crit + ×4 high, ncurses family ×1 high). Every one is marked affected / fix_deferred with no Fixed Version — they cannot be patched in place (apt upgrade is a no-op). Per Michal's recommendation, AL2023 (Squirro's house base for mcp/*, rebuilt ~daily and patched) is the fix.

How

  • aptdnf, RPM package names (gcc-c++, capitalised libX*, expat, libgomp).
  • TU needs only Python ≥3.10 (requires-python), so install AL2023's python3.11 (3.11.15) — which also matches the cluster's documented Python 3.11 runtime.
  • Explicit python3.11 -m pip install (AL2023's default python3 is 3.9) so the tooluniverse-smcp console-script shebang binds 3.11.
  • Build toolchain removed after install to trim the scan surface.
  • Everything downstream (compact-mode CMD, --exclude-tools, served-skills glob, healthcheck, port 8000) is unchanged.

Verification (local — trivy 0.71.0, podman 4.9.3)

Image CRITICAL/HIGH
python:3.12-slim (before) 2 CRITICAL, 8 HIGH
amazonlinux:2023 (bare base) 0
final built image 0 at every severity

./smoke.sh against the AL2023 container: PASS — MCP handshake, 7 compact meta-tools, get_skill serves the disease-research body (10 427 chars), execute_tool reaches CT.gov.

Merging re-arms the CI pipeline (build → Harbor push → Trivy scan), so the Harbor re-scan is the authoritative confirmation.

Decision record: ADR-0011 in swiss-rockets-delivery.

… CVEs)

The first Harbor scan of the CI-built image flagged 2 CRITICAL + 8 HIGH,
all in the python:3.12-slim (Debian) base userland (perl-base, ncurses) and
all marked affected/fix_deferred with no Fixed Version -- unpatchable in place.

Rebase onto public.ecr.aws/amazonlinux/amazonlinux:2023 (Squirro's house base
for mcp/*, rebuilt ~daily and actively patched). TU needs only Python >=3.10,
so AL2023's dnf python3.11 (3.11.15) is used -- which also matches the cluster
runtime. apt->dnf package-name translation; explicit python3.11 -m pip so the
tooluniverse-smcp console-script shebang binds 3.11 (default python3 is 3.9).
Build toolchain removed post-install to trim the scan surface.

Verified locally (trivy 0.71.0 / podman): final image 0 CVEs at every severity
(down from 2C+8H); smoke.sh PASS (MCP handshake, 7 compact meta-tools, get_skill
serves a body, execute_tool reaches CT.gov). Downstream contract unchanged.

Decision recorded in swiss-rockets-delivery ADR-0011.
@taferh taferh merged commit 849a0b2 into swiss-rockets Jun 11, 2026
1 check passed
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.

2 participants