fix: harden the CMCP runtime container - #505
Merged
Merged
Conversation
imran-siddique
force-pushed
the
agent/package-catalog-schema
branch
from
August 11, 2026 19:11
1ca1377 to
2b3df4c
Compare
imran-siddique
changed the base branch from
agent/package-catalog-schema
to
main
August 11, 2026 19:15
imran-siddique
force-pushed
the
agent/harden-runtime-container
branch
from
August 11, 2026 19:18
a5015e1 to
ae3ba9f
Compare
Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
Signed-off-by: Imran Siddique <imran.siddique@opaque.co>
imran-siddique
force-pushed
the
agent/harden-runtime-container
branch
from
August 11, 2026 19:22
ae3ba9f to
7f65e87
Compare
imran-siddique
marked this pull request as ready for review
August 11, 2026 19:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Replace the single-stage editable development install with a two-stage production build. The builder creates a runtime-only wheelhouse; the final image installs it offline, contains no development extras or build source, and runs as numeric UID/GID 10001 from a writable application-data directory.
The base is pinned to the current Python 3.11 patch and Debian suite (
python:3.11.15-slim-bookworm), and.dockerignoreexcludes tests, docs, VCS metadata, databases, logs, and other non-build context.Root cause
The release image used
pip install -e ".[dev]"directly in its final root-owned stage. That shipped test/security/build tools and an editable source tree into production, expanded the dependency and filesystem attack surface, and ran the network gateway as root. It also omitted the repository schema directory, which is why this PR is stacked on #503's packaged-schema fix.Validation
git diff --check: cleanDocker is not installed in the local Windows environment, so the actual multi-stage build is delegated to the repository's existing Docker build-and-push workflow after the prerequisite branch is merged/retargeted.
Dependency
Stacked on draft PR #503 because the final wheel must contain the mandatory catalog schema.
Documentation