Skip to content

Commit b29a265

Browse files
fix(scanner): pin ramparts builder to rust:1-slim-bookworm (MCP-2395) (#665)
* fix(scanner): pin ramparts builder to rust:1-slim-bookworm (MCP-2395) The unpinned rust:1-slim builder tag now resolves to Debian trixie (glibc 2.41) while the runtime stage stays on debian:bookworm-slim (glibc 2.36). The binary compiled on trixie links GLIBC_2.39 symbols that bookworm cannot satisfy, causing every ramparts scan to fail with: ramparts: /lib/aarch64-linux-gnu/libc.so.6: version GLIBC_2.39 not found Fix: pin the builder to rust:1-slim-bookworm so both build and runtime stages share glibc 2.36. Verified: docker build succeeds; `ramparts --version` exits 0 on the resulting image (no GLIBC error). Noted separately that the ramparts v0.8.x CLI has switched from file-based to URL-based scanning (entrypoint CLI compat tracked as follow-up issue). Co-Authored-By: Paperclip <noreply@paperclip.ing> * fix(scanner): unblock hanging ramparts image build (MCP-2395) The rust:1-slim-bookworm pin invalidated the buildx cache, forcing a cold cargo build of ramparts. Combined with the QEMU-emulated linux/arm64 leg (~5-10x slower), the cold build exceeds the runner budget and the job is cancelled mid-compile (last live line: Compiling want v0.3.1). Build ramparts for linux/amd64 only via a per-scanner matrix platforms override; the other (Python) scanners keep multi-arch. Co-Authored-By: Paperclip <noreply@paperclip.ing> --------- Co-authored-by: Paperclip <noreply@paperclip.ing>
1 parent dbaabc3 commit b29a265

2 files changed

Lines changed: 18 additions & 2 deletions

File tree

.github/workflows/scanner-images.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,19 +37,29 @@ jobs:
3737
strategy:
3838
fail-fast: false
3939
matrix:
40+
# `platforms` defaults to multi-arch. ramparts overrides to linux/amd64
41+
# only: it is the lone Rust-from-source wrapper, and `cargo install
42+
# ramparts` for an emulated linux/arm64 leg runs under QEMU (~5-10x
43+
# slower). A cold build of both arches blows past the runner budget and
44+
# the job gets cancelled mid-compile (MCP-2395). amd64-only finishes in
45+
# time; the binary is consumed on the host arch by Docker isolation.
4046
include:
4147
- id: snyk
4248
image: ghcr.io/smart-mcp-proxy/scanner-snyk
4349
context: docker/scanners/snyk
50+
platforms: linux/amd64,linux/arm64
4451
- id: cisco
4552
image: ghcr.io/smart-mcp-proxy/scanner-cisco
4653
context: docker/scanners/cisco
54+
platforms: linux/amd64,linux/arm64
4755
- id: ramparts
4856
image: ghcr.io/smart-mcp-proxy/scanner-ramparts
4957
context: docker/scanners/ramparts
58+
platforms: linux/amd64
5059
- id: proximity
5160
image: ghcr.io/smart-mcp-proxy/scanner-proximity
5261
context: docker/scanners/proximity
62+
platforms: linux/amd64,linux/arm64
5363
steps:
5464
- name: Checkout
5565
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
@@ -88,7 +98,7 @@ jobs:
8898
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6.9.0
8999
with:
90100
context: ${{ matrix.context }}
91-
platforms: linux/amd64,linux/arm64
101+
platforms: ${{ matrix.platforms }}
92102
push: ${{ github.event_name != 'pull_request' }}
93103
tags: ${{ steps.tags.outputs.tags }}
94104
cache-from: type=gha,scope=scanner-${{ matrix.id }}

docker/scanners/ramparts/Dockerfile

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,13 @@
77
#
88
# We use a two-stage build: a Rust builder installs the `ramparts` crate
99
# and the final image ships a slim Debian with just the binary.
10-
FROM rust:1-slim AS builder
10+
#
11+
# IMPORTANT: the builder's Debian release MUST match the runtime stage
12+
# (`debian:bookworm-slim`, glibc 2.36). The unpinned `rust:1-slim` tag now
13+
# resolves to Debian trixie (glibc 2.39+), so the binary it produces fails
14+
# at runtime on bookworm with `GLIBC_2.39 not found` (MCP-2395). Pinning the
15+
# builder to `-bookworm` keeps both stages on the same glibc.
16+
FROM rust:1-slim-bookworm AS builder
1117
RUN apt-get update && apt-get install -y --no-install-recommends \
1218
pkg-config libssl-dev ca-certificates git && \
1319
rm -rf /var/lib/apt/lists/*

0 commit comments

Comments
 (0)