You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .agents/sow/current/SOW-0014-20260603-maintainability-hotspots.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -969,6 +969,48 @@ Raw cache, Go typed-facade, apps lookup builder, cgroups lookup builder, apps lo
969
969
-`bash .agents/sow/audit.sh` passed.
970
970
- Sensitive-data scan across the touched durable artifacts returned no matches.
971
971
972
+
### 2026-06-04 Expanded CodeQL Findings - Second Slice
973
+
974
+
- After commit `7c590c3`, the open GitHub code-scanning alerts visible during the in-progress CodeQL run dropped from 56 to 19.
975
+
- Remaining GitHub code-scanning evidence:
976
+
-`cpp/path-injection`: 11 high alerts in C interop fixtures, the POSIX benchmark helper, and production POSIX service SHM attach flow.
977
+
-`cpp/stack-address-escape`: 3 warning alerts in the POSIX benchmark helper and production POSIX service managed-session pointer flow.
978
+
-`cpp/unused-local-variable`: 3 note alerts in C protocol/service tests.
979
+
-`cpp/wrong-type-format-argument`: 1 high alert in the C ping-pong test output.
980
+
-`cpp/long-switch`: 1 note alert in a C UDS malformed-response test helper.
981
+
- Root-cause model:
982
+
- The remaining low-severity local-variable, format, and long-switch findings are source hygiene issues and should be fixed directly.
983
+
- The POSIX benchmark stack warnings are source-lifetime issues around a global stop pointer to a stack server object and should be fixed directly.
984
+
- The production service stack warning is an ownership/lifetime pattern: per-session threads store the managed server pointer and the server lifecycle owns thread shutdown before destruction. This needs source review before changing the API shape.
985
+
- The remaining path-injection alerts persist even after helper-side directory validation because CodeQL still tracks command-line `run_dir` into NetIPC APIs and file-opening sinks.
986
+
- Decision:
987
+
- Continue fixing direct source hygiene findings.
988
+
- Do not disable the `cpp/path-injection` rule globally.
989
+
- For path-injection, prefer code changes that make file access relative to trusted directory descriptors. If CodeQL still flags test-only validated runtime directories, record the false-positive evidence before any narrow suppression.
990
+
- Validation plan:
991
+
- Rebuild the touched C targets.
992
+
- Re-run focused CTest slices for protocol, UDS, service, interop, and benchmark-adjacent targets.
993
+
- Re-run Codacy local analysis, whitespace checks, SOW audit, and GitHub CodeQL after push.
994
+
- Implemented:
995
+
- Fixed the C ping-pong test generation formatter by matching `uint64_t generation` with `PRIu64`.
996
+
- Removed remaining stale local variables from C protocol and service tests.
997
+
- Split the long UDS malformed-response switch cases into focused helper functions without changing the malformed bytes sent by the tests.
998
+
- Changed the POSIX benchmark server objects from stack-owned objects exposed through `g_server` to heap-owned objects destroyed and freed on exit.
999
+
- Changed POSIX SHM create/attach directory opening from `open(run_dir, ...)` to `opendir()` plus `dirfd()` and kept file operations directory-relative with `openat()`.
1000
+
- Changed POSIX UDS stale socket unlink recovery from `open(run_dir, ...)` to `opendir()` plus `dirfd()` and kept unlink recovery directory-relative with `unlinkat()`.
1001
+
- Changed the C codec interop fixture to open the validated run directory once and read/write fixture files with `openat()` relative to that directory fd.
1002
+
- Added one narrow `cpp/stack-address-escape` source suppression at the POSIX managed-server session back-pointer assignment, with the lifecycle reason recorded in source. The public API remains stack-friendly and `nipc_server_destroy()` joins session threads before the caller may safely release the server object.
-`codacy-analysis analyze --output-format json` passed with 0 issues and 0 errors across Checkov, Opengrep/Semgrep, Trivy, cppcheck, ShellCheck, and Spectral.
1008
+
-`git diff --check` passed.
1009
+
-`bash .agents/sow/audit.sh` passed.
1010
+
- Sensitive-data scan across touched durable artifacts found only existing synthetic test `AUTH_TOKEN` constants and generic SOW policy text; no raw credentials or private data were added.
1011
+
- GitHub validation:
1012
+
- Pending push and CodeQL reanalysis for this second slice.
0 commit comments