CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Failing after 5m53s
The Rust HTTP clients (reqwest rustls-tls, ureq, the MongoDB driver) trust the roots compiled in from webpki-roots, which still included "emSign ECC Root CA - G3" (Mozilla bug 2083449: eight intermediates under it have trivially recoverable keys). The host-bundle mounts in prod cannot reach those roots; only a rebuild can. - webpki-roots 1.0.10 (root removed), rustls-webpki 0.103.16. - Every final stage fails the build if the Debian store still ships the root; this also stops CI from reusing a cached layer with the old ca-certificates (20230311+deb12u1, which trusts the forged chain; 20250419~deb12u2 rejects it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
38 lines
1.5 KiB
Docker
38 lines
1.5 KiB
Docker
FROM rust:1.94-bookworm AS builder
|
|
|
|
WORKDIR /app
|
|
COPY . .
|
|
# compliance-agent (a workspace member) depends on the private firmwerk git
|
|
# repo, so the workspace resolve needs it even to build the mcp binary.
|
|
# Authenticate the fetch with a PAT passed as a BuildKit secret.
|
|
RUN --mount=type=secret,id=git_token \
|
|
if [ -s /run/secrets/git_token ]; then \
|
|
git config --global \
|
|
url."https://platform-ci:$(cat /run/secrets/git_token)@git.breakpilot.com/".insteadOf \
|
|
"ssh://git@git.breakpilot.com:22222/"; \
|
|
fi && \
|
|
CARGO_NET_GIT_FETCH_WITH_CLI=true cargo build --release -p compliance-mcp
|
|
|
|
FROM debian:bookworm-slim
|
|
# curl only serves the healthcheck.
|
|
RUN apt-get update \
|
|
&& apt-get install -y --no-install-recommends ca-certificates libssl3 curl \
|
|
&& rm -rf /var/lib/apt/lists/* \
|
|
&& useradd --uid 10001 --user-group --no-create-home --shell /usr/sbin/nologin app
|
|
# eMudhra (Mozilla bug 2083449, Oct 2026): fail the build if the image still
|
|
# trusts the compromised root. Also keeps a cached layer with the old store
|
|
# from being reused.
|
|
RUN test ! -e /usr/share/ca-certificates/mozilla/emSign_ECC_Root_CA_-_G3.crt
|
|
|
|
COPY --from=builder /app/target/release/compliance-mcp /usr/local/bin/compliance-mcp
|
|
|
|
ENV MCP_PORT=8090
|
|
# The MCP server writes nothing to its filesystem.
|
|
USER app
|
|
EXPOSE 8090
|
|
|
|
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
|
|
CMD curl -fsS "http://127.0.0.1:${MCP_PORT}/health" || exit 1
|
|
|
|
ENTRYPOINT ["compliance-mcp"]
|