ci: refactor: Avoid warning: INSTALL_BCC_TRACING_TOOLS: unbound variable
What changed, and why it matters
This is a harmless shell-script cleanup in Bitcoin Core's internal continuous integration (CI) setup. It adds a default empty value for an environment variable so that running the CI script locally no longer prints a warning. It does not change behavior, fix a vulnerability, or affect the Bitcoin software users run.
No security action needed. This is a routine CI hygiene refactor.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The patch changes one line in ci/test/00_setup_env_native_asan.sh from ${INSTALL_BCC_TRACING_TOOLS} to ${INSTALL_BCC_TRACING_TOOLS:-}. The :- default-value syntax in bash expands to an empty string when the variable is unset, suppressing the ‘unbound variable’ warning under set -u. The variable is only ever set to ‘true’ via a sed substitution during GitHub Actions image builds; otherwise it is unset. The conditional logic remains identical: the BCC packages are still installed only when the value is ‘true’.
Changed components
ci/test/00_setup_env_native_asan.shInspect captured patch +1 / −1
diff --git a/ci/test/00_setup_env_native_asan.sh b/ci/test/00_setup_env_native_asan.sh
index 2465c70b..58be89fa 100755
--- a/ci/test/00_setup_env_native_asan.sh
+++ b/ci/test/00_setup_env_native_asan.sh
@@ -9,7 +9,7 @@ export LC_ALL=C.UTF-8
export CI_IMAGE_NAME_TAG="mirror.gcr.io/ubuntu:24.04"
# Only install BCC tracing packages in CI. Container has to match the host for BCC to work.
-if [[ "${INSTALL_BCC_TRACING_TOOLS}" == "true" ]]; then
+if [[ "${INSTALL_BCC_TRACING_TOOLS:-}" == "true" ]]; then
# Required for USDT functional tests to run
BPFCC_PACKAGE="bpfcc-tools linux-headers-$(uname --kernel-release)"
export CI_CONTAINER_CAP="--privileged -v /sys/kernel:/sys/kernel:rw"
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.