Repository navigation
ci(_Issue565): allow host network scan builds - #580
Conversation
|
CLD-1783680662 Review: correct pattern, but the actual open question from the issue isn't answered yetThe code change itself is right: But issue #565's actual open question was whether classic Not blocking on this since the change is safe either way (correct if needed, harmless no-op if not, and only reachable on the rare secret-backed host-network path) -- but would be good to actually confirm with a real run that has |
|
CLD-1783681254 Follow-up: researched this, the fix as written is likely incompleteChecked Docker's actual documentation and the
Checked which driver this specific step actually uses: the So as written, Suggested fixRather than depending on runner-daemon-level dockerd flags (fragile, easy to silently drift if a runner gets reprovisioned), add a Sources:
|
--allow network.host on a plain 'docker build' invocation only works if the runner's Docker daemon was separately started with --allow-insecure-entitlement network.host -- an infrastructure-level flag this workflow doesn't control. The docker-container builder driver has had network.host entitlement enabled by default since buildx v0.13 (docker/buildx#2266), with no daemon-side dependency, so add an explicit docker/setup-buildx-action step and switch from 'docker build' to 'docker buildx build --load' for this scan step. Addresses the review finding that the entitlement flag's actual effect was asserted, not verified, on the plain docker driver.
|
CLD-1783683828 Fix pushed: switched to an explicit docker-container Buildx builderPushed Added a governance guard confirming the setup-buildx-action step and This should now fully resolve the original technical uncertainty, not just move the flag around. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Summary
--allow network.hostto the localDOCKER_BUILDKIT=1 docker buildscan path when Rust acceleration selects host networking.--network hostwithout the matching entitlement wiring.Fixes #565
Why
The buildx-action publish paths already pass
allow: network.hostwhenRUST_BUILDX_NETWORK=host. The local scan build used the same host network selection but did not pass the matching BuildKit entitlement, so trusted secret-backed Rust acceleration could diverge between scan and publish paths.Risk / Rollback
host; bridge/default behavior is unchanged.Validation
docker build --helpanddocker buildx build --helpboth expose--allowon this runner.docker run --rm -v "$PWD:/work" -w /work ghcr.io/wiki-mod/lancache-ng/build-tools:latest actionlint .github/workflows/build-push.ymlallow_args+=(--allow network.host)and"${allow_args[@]}"are wired into the local scan build.git diff --checkFollow-up