clang-tidy: Disable `ArrayBound` check in src/ipc and src/test
What changed, and why it matters
This commit only changes static-analysis configuration files. It tells the clang-tidy tool to stop flagging a particular array-bounds warning in two directories (ipc and test). No actual Bitcoin Core code is modified, so this cannot directly introduce or fix a security vulnerability in the running software.
No security action required. Treat as a normal build-system/maintenance change. If desired, verify that the disabled clang-tidy check remains enabled elsewhere in the codebase so real bugs are still caught.
Security signals we found
No compiled code changed
Only static-analysis suppression configuration modified
References upstream capnproto false-positive fixes
No functional or behavioral change to Bitcoin Core
Evidence from the diff
The diff adds .clang-tidy.in files (or edits an existing one) to disable the clang-analyzer-security.ArrayBound check in src/ipc and src/test. It also wires src/test/.clang-tidy.in into the CMake build via configure_file. The referenced upstream capnproto pull requests explain why the warning is a false positive in generated/test code. There is no change to compiled source, runtime behavior, or the Bitcoin protocol.
Changed components
src/ipc/.clang-tidy.insrc/test/.clang-tidy.insrc/test/CMakeLists.txtInspect captured patch +10 / −3
diff --git a/src/ipc/.clang-tidy.in b/src/ipc/.clang-tidy.in
index 2fc880ed..68dcb297 100644
--- a/src/ipc/.clang-tidy.in
+++ b/src/ipc/.clang-tidy.in
@@ -1,3 +1,5 @@
-Checks: '
--clang-analyzer-core.UndefinedBinaryOperatorResult,
-'
+Checks:
+ # See: https://github.com/capnproto/capnproto/pull/2334.
+ - "-clang-analyzer-core.UndefinedBinaryOperatorResult"
+ # See: https://github.com/capnproto/capnproto/pull/2417.
+ - "-clang-analyzer-security.ArrayBound"
diff --git a/src/test/.clang-tidy.in b/src/test/.clang-tidy.in
new file mode 100644
index 00000000..92d24f6f
--- /dev/null
+++ b/src/test/.clang-tidy.in
@@ -0,0 +1,3 @@
+Checks:
+ # See: https://github.com/capnproto/capnproto/pull/2417.
+ - "-clang-analyzer-security.ArrayBound"
diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt
index 3b9dafc5..c9d3d7a4 100644
--- a/src/test/CMakeLists.txt
+++ b/src/test/CMakeLists.txt
@@ -180,6 +180,8 @@ if(ENABLE_IPC)
ipc_tests.cpp
)
target_link_libraries(test_bitcoin bitcoin_ipc_test bitcoin_ipc)
+
+ configure_file(.clang-tidy.in .clang-tidy USE_SOURCE_PERMISSIONS COPYONLY)
endif()
function(add_boost_test source_file)
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.