@@ -709,3 +709,88 @@ Artifact updates:
709709- SOW lifecycle: this regression was appended after the prior SOW content; the
710710 SOW is marked ` completed ` and will be moved back to ` done/ ` in the same
711711 commit as the implementation and docs.
712+
713+ ## Regression - 2026-06-03 Residual Remote CodeQL Alerts
714+
715+ What broke:
716+
717+ - Commit ` 8a23810394997b0d6752c837d11a43343d85506b ` fixed most restored
718+ GitHub Code Scanning findings, but the remote CodeQL run still reported nine
719+ open C alerts after SARIF ingestion: seven constant-comparison alerts and two
720+ TOCTOU stale-unlink alerts.
721+
722+ Evidence:
723+
724+ - GitHub Code Scanning reported the residual constant-comparison alerts in
725+ ` src/libnetdata/netipc/src/protocol/netipc_protocol.c ` and
726+ ` src/libnetdata/netipc/src/service/netipc_service.c ` ; each was an overflow
727+ guard that is only reachable on 32-bit ` size_t ` builds because the affected
728+ counts are already capped by ` uint32_t ` .
729+ - GitHub Code Scanning reported the two residual TOCTOU alerts at the POSIX
730+ stale cleanup ` unlink() ` calls in
731+ ` src/libnetdata/netipc/src/transport/posix/netipc_shm.c ` and
732+ ` src/libnetdata/netipc/src/transport/posix/netipc_uds.c ` .
733+ - The stale cleanup race cannot be fully eliminated with POSIX path unlink
734+ semantics while preserving automatic stale socket/shared-memory cleanup. The
735+ implemented product constraint is that automatic stale unlink only runs in a
736+ process-owned run directory that is not group/world writable; the remaining
737+ CodeQL finding is intentionally narrow and source-documented.
738+ - The previous inline ` // codeql[cpp/toctou-race-condition] ` comments did not
739+ affect GitHub SARIF because the CodeQL configuration did not include the
740+ C/C++ ` AlertSuppression.ql ` query.
741+
742+ Why previous validation missed it:
743+
744+ - The local environment does not have the CodeQL CLI installed, so the only
745+ authoritative CodeQL validation point is the GitHub run after push.
746+ - The prior local validation proved the code built and local tools were clean,
747+ but it did not prove CodeQL SARIF suppression handling.
748+
749+ Repair plan:
750+
751+ - Keep the CodeQL rule enabled globally and add the C/C++ alert suppression
752+ query so the two reviewed stale-unlink suppressions are represented in SARIF.
753+ - Compile the remaining addition-overflow guards only on 32-bit ` size_t `
754+ platforms, where they are real portability checks, so the 64-bit CodeQL build
755+ no longer sees constant-false comparisons.
756+
757+ Validation:
758+
759+ - ` make ` passed.
760+ - ` actionlint ` passed.
761+ - ` git diff --check ` passed.
762+ - ` cmake -S . -B build-static -DCMAKE_BUILD_TYPE=Debug -DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
763+ passed.
764+ - ` cmake --build build-static --parallel --target netipc_protocol netipc_uds netipc_shm netipc_service `
765+ passed.
766+ - ` clang-tidy -p build-static ` on the C library sources passed with the
767+ repository's existing warning-only baseline.
768+ - The first attempted ` cppcheck --project=build-static/compile_commands.json `
769+ validation failed because it scanned the whole compile database and surfaced
770+ existing test/benchmark findings unrelated to this SOW; that is not the
771+ workflow command shape.
772+ - The workflow-equivalent scoped cppcheck command passed:
773+ ` cppcheck --enable=warning,performance,portability --error-exitcode=1 --force --inline-suppr --std=c11 --suppress=missingIncludeSystem --suppress=unmatchedSuppression -Isrc/libnetdata/netipc/include src/libnetdata/netipc ` .
774+ - ` flawfinder --minlevel=5 --error-level=5 src/libnetdata/netipc tests `
775+ passed with no level-5 findings.
776+ - ` /usr/bin/ctest --test-dir build --output-on-failure ` passed all 46 tests.
777+ - ` osv-scanner scan --recursive --format sarif --output-file /tmp/plugin-ipc-osv-final.sarif . `
778+ exited 0, and the SARIF result count was 0.
779+ - ` codacy-analysis analyze . --install-dependencies --output-format json --output /tmp/plugin-ipc-codacy-final.json --parallel-tools 2 --tool-timeout 900000 `
780+ exited 0 with 0 issues and 0 tool errors.
781+
782+ Artifact updates:
783+
784+ - AGENTS.md: no update needed; project scanner workflow requirements remain
785+ accurate.
786+ - Runtime project skills: no update needed; the repository still has no runtime
787+ ` project-* ` skill.
788+ - Specs: no update needed; the stale cleanup behavior was already documented in
789+ the prior regression update.
790+ - End-user/operator docs: no update needed; this follow-up only makes CodeQL
791+ suppression handling explicit and preserves the already documented behavior.
792+ - End-user/operator skills: no update needed; the public integrator skill was
793+ already updated for the private runtime directory requirement.
794+ - SOW lifecycle: this residual remote CodeQL regression was appended after the
795+ prior SOW content; the SOW remains ` completed ` in ` done/ ` with the follow-up
796+ implementation and validation recorded.
0 commit comments