dind passthrough: add per-repository allowlist (DIND_HOST_PASSTHROUGH_IMAGES)#99
Conversation
Adding .gitkeep for PR creation (default mode). This file will be removed when the task is complete. Issue: #97
… (issue #97) Add a space-separated allowlist of image references / globs that scopes host-image passthrough to specific repositories / image names, composed with the existing mode gate (so 'public' still requires a public RepoDigest). Empty/unset preserves the prior mode + registry behavior. Patterns match against several normalized forms of each host reference, so 'konard/hive-mind' matches 'konard/hive-mind:latest' and the docker.io-qualified 'docker.io/konard/hive-mind:latest' alike; globs and explicit tags work too. This is one level finer than DIND_HOST_PASSTHROUGH_REGISTRIES, letting a deployment seed the inner daemon with only the images it owns instead of every public host image. Covered by new cases in experiments/preload-unit-test.sh and tests/dind/example-preload-images.sh; documented in docs/dind/USAGE.md and README.md. Removes the stray .gitkeep PR-creation artifact.
Working session summaryStill running. I'll await the completion notification from the background monitor rather than polling repeatedly. While waiting, here's a summary of what I've implemented for issue #97: Summary of work completedI added Implementation (
Tests:
Docs & release:
CI checkpoints already green: changeset check, version-change guard, This summary was automatically extracted from the AI working session output. |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $3.000494📊 Context and tokens usage:
Total: (3.3K new + 119.7K cache writes + 3.2M cache reads) input tokens, 26.0K output tokens, $3.000495 cost 🤖 Models used:
📎 Log file uploaded as Gist (1569KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
|
https://github.com/link-foundation/box/actions/runs/27295905722 we also need to make sure we fully fix all false positives and errors found in logs of the CI/CD run. |
|
🤖 AI Work Session Started Starting automated work session at 2026-06-10T22:16:58.260Z The PR has been converted to draft mode while work is in progress. This comment marks the beginning of an AI work session. Please wait for the session to finish, and provide your feedback. |
…97) Run 27295905722 (release.yml on main) failed not from a code defect but from a transient Docker Hub registry timeout while booting BuildKit in build-essentials-amd64: #1 pulling image moby/buildkit:buildx-stable-1 ERROR: Get "https://registry-1.docker.io/v2/": ... Client.Timeout exceeded Because the amd64 essentials image was never built/pushed, every dependent amd64 dind build then failed the cascade symptom "box-essentials:2.2.1-amd64: not found" (and its 3x push-retry kept re-failing for the same reason). The PR's own pull_request CI is fully green, so this is a pre-existing infra flake, but it is exactly the kind of false-positive failure the release pipeline should absorb. Add a local composite action that pre-pulls the pinned BuildKit image with retry + exponential backoff before docker/setup-buildx-action and pins the docker-container driver to that image, so the boot reuses the cached image instead of hitting the registry. The pre-pull is non-fatal: if it still can't pull, it falls through to setup-buildx's own boot pull, preserving prior behavior in the worst case. Wired into all 12 buildx setups in release.yml.
CI investigation — run 27295905722I traced every failure in that run. None are caused by this PR — its own Root cause (one transient flake → a cascade of false-positive failures)
The docker-container buildx driver pulls and the existing 3× push-retry kept re-failing for the same reason (the base genuinely wasn't there). The remaining log noise ( FixAdded a local composite action This absorbs exactly this class of transient Docker-Hub false positive in the release pipeline. Pushed in |
🤖 Solution Draft LogThis log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $2.813344📊 Context and tokens usage:
Total: (3.1K new + 91.8K cache writes + 3.0M cache reads) input tokens, 29.7K output tokens, $2.813344 cost 🤖 Models used:
📎 Log file uploaded as Gist (1478KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
🔄 Auto-restart triggered (iteration 1)Reason: CI failures detected Starting new session to address the issues. Auto-restart-until-mergeable mode is active. This run will stop after 5 restart iterations. |
Working session summaryI'll wait for the background monitors to notify me when the re-run finishes. The job typically takes ~30 minutes to build the full chain. This summary was automatically extracted from the AI working session output. |
🔄 Auto-restart-until-mergeable Log (iteration 1)This log file contains the complete execution trace of the AI solution draft process. 💰 Cost: $1.702415📊 Context and tokens usage:
Total: (3.0K new + 60.3K cache writes + 1.8M cache reads) input tokens, 17.1K output tokens, $1.702415 cost 🤖 Models used:
📎 Log file uploaded as Gist (2900KB)Now working session is ended, feel free to review and add any feedback on the solution draft. |
✅ Ready to mergeThis pull request is now ready to be merged:
Monitored by hive-mind with --auto-restart-until-mergeable flag |
Summary
Adds
DIND_HOST_PASSTHROUGH_IMAGES— a per-repository (image-name) allowlist for dind-box host-image passthrough (issue #97). It scopes passthrough to specific repositories / image names, one level finer than the registry allowlist (DIND_HOST_PASSTHROUGH_REGISTRIES), so a deployment can seed the inner daemon with only the images it owns rather than every public image on the host.Fixes #97.
Behavior
off/public/all) + registry filter only.publicstill requires a publicRepoDigest, so the security guarantee is preserved even if a local/private image matches a pattern.konard/hive-mindmatcheskonard/hive-mind:latestand the registry-qualifieddocker.io/konard/hive-mind:latestalike. Globs and explicit tags work too.Changes
ubuntu/24.04/dind/dind-entrypoint.sh— newDIND_HOST_PASSTHROUGH_IMAGESvar +host_image_matches_images_filter(), composed intohost_image_passes_filter(); the passthrough log line now reports the active allowlist.experiments/preload-unit-test.sh— 5 new cases (14–18): allowlist scoping, composition with the mode gate, globs / docker.io-qualified / tagged patterns, empty-list back-compat, and direct helper-normalization checks. 41/41 pass locally.tests/dind/example-preload-images.sh— new integration case:allmode + an allowlist scoped to one repo copies only that repo and skips the public host image, proving the allowlist (not the mode) is what narrows the set.docs/dind/USAGE.md,README.md— documented the new knob (env table row + "Scoping to specific images" section)..changeset/dind-host-passthrough-images.md—bump: minor.How to verify
Filed from
link-assistant/hive-mind#1879.