Repository navigation
dockerproxy: measure DOCKER_BUILDKIT=1 through the proxy; hold BuildKit refusals (fixes #690) - #703
Merged
Merged
Conversation
…it refusals (fixes #690) Measured, docker 29.7.2-ce / buildx 0.36.1 inside @podman-build @net: - docker build with DOCKER_BUILDKIT=1 and buildx build both open with POST /grpc (Connection: Upgrade, Upgrade: h2c); the route allowlist refuses it, as it does /session and /build?version=2. - buildx then falls back to the docker-container driver. A builder container is created through the create filter (Privileged and SecurityOpt refused) and driven over the exec/{id}/start hijack. A pre-created moby/buildkit:buildx-stable-1 booted; the build failed: "failed to mount /tmp/buildkit-mount...: operation not permitted". - With the allowlist entry removed, podman 6.1.2 itself answers 404 to /grpc and /session. So the BuildKit session is not inspected but reaches only what the builder container reaches. Rewrite the containerEnv, envNotes and CONTAINER-CLIENT.md claims that it was an unfiltered channel; the DOCKER_BUILDKIT annotation changes accordingly (golden updated). Tests: TestBuildKitEntryPointsNeverReachTheEngine (unit, both podman modes) and TestBuildKitEntryPointsAreRefusedAtTheProxy (integration, with a /_ping control). Both fail with "grpc"/"session" added to allowed(). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Fixes #690.
Claim "BuildKit session not filtered" measured: false in effect. BuildKit reaches nothing
docker runthrough proxy cannot.Measured, docker 29.7.2-ce / buildx 0.36.1 / podman 6.1.2, inside
@podman-build @net:DOCKER_BUILDKIT=1 docker buildanddocker buildx buildfirst sendPOST /grpc(Connection: Upgrade,Upgrade: h2c) — recorded verbatim. Route allowlist refuses (default-deny), same for/session./build?version=2refused bycheckBuilderVersion. With allowlist widened, podman itself answers 404 to/grpc,/session.docker-containerdriver. First requestGET /containers/buildx_buildkit_default/jsonrefused by ownership gate (engine 404). Hand-createdmoby/buildkit:buildx-stable-1 --oci-worker-no-process-sandboxpasses create filter and boots; build fails:failed to mount /tmp/buildkit-mount...: operation not permitted(noCAP_SYS_ADMIN).Privileged,SecurityOptrefused at create.RUN --mount=type=bind,source=../../../../etcfails, resolved inside buildah context copy.Changes:
internal/cli/container.gocontainerEnv,internal/policy/envtypes.goDOCKER_BUILDKITnote,.claude/design/CONTAINER-CLIENT.md: rewrite "unfiltered channel" claim to measured one.DOCKER_BUILDKIT=0stays, as convenience.internal/policy/testdata/annotations.txt: golden for newDOCKER_BUILDKITannotation text.TestBuildKitEntryPointsNeverReachTheEngine(unit, socket + build modes),TestBuildKitEntryPointsAreRefusedAtTheProxy(integration,/_pingcontrol). Both fail with"grpc", "session"added toallowed().Checks:
make gategreen;make integration311 pass / 60 skip / 0 fail;make verify5 pass / 4 skip / 0 fail. Redteam round on 16a058c: no escape; its two wording notes fixed in 98191c6.docs/srcuntouched; book facts + draft forcontainers.mdin #700.🤖 Generated with Claude Code