lint: Flatten lint image entry points
What changed, and why it matters
This commit is a routine cleanup of how Bitcoin Core's automated code-checking (lint) container is set up. It removes a wrapper script and runs the lint script directly, while moving a couple of environment settings to different files. There is no indication this changes anything security-relevant.
No security action needed; this is a normal lint CI refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch refactors the CI lint Docker image entrypoint: it deletes ci/lint/container-entrypoint.sh, removes the ENTRYPOINT and an alias from the lint_imagefile, and instead has ci/lint.py invoke ci/lint/06_script.sh directly. It also moves DEBIAN_FRONTEND=noninteractive from the Dockerfile into ci/lint/01_install.sh and moves the git safe.directory and PATH setup from the deleted entrypoint into ci/lint/06_script.sh. These are structural/organizational changes to the lint CI pipeline, not functional security changes.
Changed components
ci/lint.pyci/lint/01_install.shci/lint/06_script.shci/lint/container-entrypoint.shci/lint_imagefileInspect captured patch +8 / −23
diff --git a/ci/lint.py b/ci/lint.py
index e7720fc1..6c7e0e8a 100755
--- a/ci/lint.py
+++ b/ci/lint.py
@@ -73,6 +73,7 @@ def main():
*get_worktree_mounts(repo_root),
*([] if is_ci else ["-it"]),
container,
+ "./ci/lint/06_script.sh",
*sys.argv[1:],
]
)
diff --git a/ci/lint/01_install.sh b/ci/lint/01_install.sh
index 64400fd8..44563d42 100755
--- a/ci/lint/01_install.sh
+++ b/ci/lint/01_install.sh
@@ -8,6 +8,7 @@ export LC_ALL=C
set -o errexit -o pipefail -o xtrace
+export DEBIAN_FRONTEND=noninteractive
export CI_RETRY_EXE="/ci_retry"
pushd "/"
diff --git a/ci/lint/06_script.sh b/ci/lint/06_script.sh
index ffbf68ea..1b36fada 100755
--- a/ci/lint/06_script.sh
+++ b/ci/lint/06_script.sh
@@ -8,6 +8,12 @@ export LC_ALL=C
set -o errexit -o pipefail -o xtrace
+# Fixes permission issues when there is a container UID/GID mismatch with the owner
+# of the mounted bitcoin src dir.
+git config --global --add safe.directory /bitcoin
+
+export PATH="/python_build/bin:${PATH}"
+
if [ -n "${LINT_CI_IS_PR}" ]; then
export COMMIT_RANGE="HEAD~..HEAD"
if [ "$(git rev-list -1 HEAD)" != "$(git rev-list -1 --merges HEAD)" ]; then
diff --git a/ci/lint/container-entrypoint.sh b/ci/lint/container-entrypoint.sh
deleted file mode 100755
index 6edb74a2..00000000
--- a/ci/lint/container-entrypoint.sh
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env bash
-#
-# Copyright (c) The Bitcoin Core developers
-# Distributed under the MIT software license, see the accompanying
-# file COPYING or https://opensource.org/license/mit/.
-
-export LC_ALL=C
-
-# Fixes permission issues when there is a container UID/GID mismatch with the owner
-# of the mounted bitcoin src dir.
-git config --global --add safe.directory /bitcoin
-
-export PATH="/python_build/bin:${PATH}"
-
-./ci/lint/06_script.sh "$@"
diff --git a/ci/lint_imagefile b/ci/lint_imagefile
index b3238076..77e9688c 100644
--- a/ci/lint_imagefile
+++ b/ci/lint_imagefile
@@ -6,19 +6,11 @@
FROM mirror.gcr.io/ubuntu:24.04
-ENV DEBIAN_FRONTEND=noninteractive
-ENV LC_ALL=C.UTF-8
-
COPY ./ci/retry/retry /ci_retry
COPY ./.python-version /.python-version
-COPY ./ci/lint/container-entrypoint.sh /entrypoint.sh
COPY ./ci/lint/01_install.sh /install.sh
RUN /install.sh && \
- echo 'alias lint="./ci/lint/06_script.sh"' >> ~/.bashrc && \
- chmod 755 /entrypoint.sh && \
rm -rf /var/lib/apt/lists/*
-
WORKDIR /bitcoin
-ENTRYPOINT ["/entrypoint.sh"]
Why this scored 15/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.