Summary
make check-static (the cppcheck CI job) fails on a clean, unmodified v3/master checkout. No source change is involved: Homebrew updated cppcheck 2.20.0 → 2.21.0, and 2.21 reports additional style/warning findings on existing code. The target runs cppcheck with --error-exitcode=1, so any finding fails the job. Because the job installs cppcheck unpinned, the result is non-deterministic across runs.
Happy to open a small PR to pin the cppcheck version if that's useful.
Reproduction (pristine checkout, no patch)
git clone --branch v3/master https://github.com/owasp-modsecurity/ModSecurity.git
cd ModSecurity
git submodule update --init others/libinjection
git submodule update --init --recursive others/mbedtls
sh build.sh && ./configure # any flags
make check-static # cppcheck 2.20.0 -> passes ; cppcheck 2.21.0 -> fails
Verified on a fresh clone (HEAD 2fd4929, 0 local modifications):
| cppcheck |
make check-static |
| 2.20.0 |
0 findings, exit 0 ✅ |
| 2.21.0 |
31 findings, exit 2 ❌ |
This matches CI: the v3/master run on 2026-06-08 used cppcheck 2.20.0 and passed; runs on 2026-06-10 used 2.21.0 and fail.
Findings newly reported by 2.21.0 (all pre-existing code)
uninitMemberVarNoCtor (warning):
src/request_body_processor/xml.h:72
src/utils/shared_files.h:58,62
test/common/modsecurity_test_results.h:28
test/regression/regression_test.h:45,46,63,64,78
test/unit/unit_test.h:30,48,49,50,51
funcArgNamesDifferentUnnamed (style):
src/modsecurity.cc:394, src/request_body_processor/xml.cc:40, src/transaction.cc:197
test/common/modsecurity_test.cc:136, test/regression/regression_test.cc:106,272, test/unit/unit_test.cc:109
shadowVariable (style):
examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h:99-104
Root cause
The cppcheck job installs cppcheck unpinned (brew install cppcheck), so the analyzer version — and therefore the set of enabled checks — drifts over time, making make check-static non-deterministic.
Suggested direction
Pinning the cppcheck version in CI would restore deterministic results. The newly-surfaced findings can then be handled (fixed, or added to test/cppcheck_suppressions.txt) on their own.
Environment
- ModSecurity:
v3/master @ 2fd4929
- cppcheck 2.21.0 (Homebrew bottle
cppcheck--2.21.0); reproduced locally with cppcheck 2.21.0 built from source
- CI runner: GitHub Actions macOS;
make check-static → cppcheck … --error-exitcode=1
Summary
make check-static(thecppcheckCI job) fails on a clean, unmodifiedv3/mastercheckout. No source change is involved: Homebrew updated cppcheck 2.20.0 → 2.21.0, and 2.21 reports additionalstyle/warningfindings on existing code. The target runs cppcheck with--error-exitcode=1, so any finding fails the job. Because the job installs cppcheck unpinned, the result is non-deterministic across runs.Happy to open a small PR to pin the cppcheck version if that's useful.
Reproduction (pristine checkout, no patch)
Verified on a fresh clone (HEAD
2fd4929, 0 local modifications):make check-staticThis matches CI: the
v3/masterrun on 2026-06-08 used cppcheck 2.20.0 and passed; runs on 2026-06-10 used 2.21.0 and fail.Findings newly reported by 2.21.0 (all pre-existing code)
uninitMemberVarNoCtor(warning):src/request_body_processor/xml.h:72src/utils/shared_files.h:58,62test/common/modsecurity_test_results.h:28test/regression/regression_test.h:45,46,63,64,78test/unit/unit_test.h:30,48,49,50,51funcArgNamesDifferentUnnamed(style):src/modsecurity.cc:394,src/request_body_processor/xml.cc:40,src/transaction.cc:197test/common/modsecurity_test.cc:136,test/regression/regression_test.cc:106,272,test/unit/unit_test.cc:109shadowVariable(style):examples/reading_logs_via_rule_message/reading_logs_via_rule_message.h:99-104Root cause
The cppcheck job installs cppcheck unpinned (
brew install cppcheck), so the analyzer version — and therefore the set of enabled checks — drifts over time, makingmake check-staticnon-deterministic.Suggested direction
Pinning the cppcheck version in CI would restore deterministic results. The newly-surfaced findings can then be handled (fixed, or added to
test/cppcheck_suppressions.txt) on their own.Environment
v3/master@2fd4929cppcheck--2.21.0); reproduced locally with cppcheck 2.21.0 built from sourcemake check-static→cppcheck … --error-exitcode=1