lint: Add missing --platform=linux to docker build command
What changed, and why it matters
This commit fixes a build script used by Bitcoin Core's automated code-quality checks. It tells Docker to always build the linting container for Linux, rather than potentially picking a different computer architecture (like IBM's s390x) if a developer recently used a non-Linux container. The change prevents confusing build failures during development and CI, but it does not fix a vulnerability in the Bitcoin network or wallet software itself.
No urgent action required. Treat as a routine CI reliability improvement. Developers running lint CI locally on multi-arch container setups should ensure they pull the updated script.
Security signals we found
CI/build script hardening
Architecture/platform confusion mitigation
Non-deterministic build environment addressed
Evidence from the diff
The patch adds --platform=linux to the docker buildx build invocation in ci/lint.py. Without this flag, Docker/Podman may default to the platform of the most recently used image. On systems where a non-x86/non-linux container was last active (e.g., s390x), the lint image would be built for the wrong architecture, causing CI lint jobs to fail or behave unexpectedly. The fix aligns with the existing CI_IMAGE_PLATFORM behavior used elsewhere in the project’s CI.
Changed components
ci/lint.pyInspect captured patch +1 / −0
diff --git a/ci/lint.py b/ci/lint.py
index e94a26af..e7720fc1 100755
--- a/ci/lint.py
+++ b/ci/lint.py
@@ -44,6 +44,7 @@ def main():
"docker",
"buildx",
"build",
+ "--platform=linux",
f"--tag={container}",
*shlex.split(os.environ.get("DOCKER_BUILD_CACHE_ARG", "")),
f"--file={repo_root}/ci/lint_imagefile",
Why this scored 18/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.