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
Pre-push Netdata PR #22649 sync found nine SonarCloud security hotspots on the old PR head:
599
+
600
+
-`src/libnetdata/netipc/src/transport/posix/netipc_uds_lifecycle.c`: four `strncpy` hotspot reports around socket path copies.
601
+
-`src/libnetdata/netipc/src/service/netipc_service_common.c`: one `strlen` hotspot in service context field copying.
602
+
-`src/libnetdata/netipc/src/service/netipc_service_posix_server.c`: two `strlen` hotspots in server config field copying.
603
+
-`src/libnetdata/netipc/src/service/netipc_service_win_server.c`: two `strlen` hotspots in Windows server config field copying.
604
+
605
+
Implemented SDK follow-up:
606
+
607
+
- Replaced POSIX UDS `strncpy` socket/path copies with a checked NUL-terminated bounded copy helper and a `sockaddr_un` fill helper.
608
+
- Replaced repeated POSIX and Windows service server `strlen`/`memcpy` config-field copies with `nipc_service_common_copy_cstr_field()`.
609
+
- Changed the common service copy helper to avoid open-ended `strlen` while preserving previous truncating field-copy behavior.
610
+
- Same-pattern search found two additional `strncpy` copies in POSIX SHM context path storage; those were changed to checked bounded copies in the same increment.
611
+
612
+
Validation completed for this hotspot follow-up:
613
+
614
+
-`git diff --check`: passed.
615
+
-`rg "strncpy\\(|strlen\\(run_dir\\)|strlen\\(service_name\\)|size_t len = strlen" src/libnetdata/netipc/src src/libnetdata/netipc/include`: only the unrelated Windows named-pipe hash input remains.
- Win11 temp-copy focused C validation: MSYS CMake build of `test_win_service`, `test_win_service_extra`, and `test_win_service_payload_limits` passed; CTest for those three tests passed.
619
+
596
620
## Validation
597
621
598
622
Acceptance criteria evidence:
@@ -606,6 +630,7 @@ Acceptance criteria evidence:
606
630
- Vendor script now copies the full vendored C include/source subtrees so split C files are not missed.
607
631
- Netdata PR #22649 review and SonarCloud findings were verified against SDK source and addressed in the SDK before re-vendoring.
608
632
- Plugin-ipc Go modules now match Netdata's Go version, `go 1.26.0`.
633
+
- Netdata PR #22649 SonarCloud security hotspots for C string/path copying were verified and addressed in the SDK before re-vendoring.
609
634
610
635
Tests or equivalent validation:
611
636
@@ -617,6 +642,7 @@ Tests or equivalent validation:
617
642
-`cd src/go && go test -count=1 ./...`: passed after restoring the required protocol-level lookup dispatch guard.
- Win11 temp-copy Go service/raw and transport/windows validation: passed.
645
+
- Win11 temp-copy C service validation: `test_win_service`, `test_win_service_extra`, and `test_win_service_payload_limits` built and passed under MSYS.
-`codacy-analysis analyze --files ... --output-format json`: 0 issues; known local Revive adapter invocation error remains.
@@ -632,6 +658,7 @@ Reviewer findings:
632
658
- GitHub AI findings for `netipc_uds_send.c` were manually verified and addressed.
633
659
- GitHub review-thread findings from Netdata PR #22649 were manually verified and addressed where they were real.
634
660
- SonarCloud PR findings for Netdata PR #22649 were queried and addressed in the SDK source before re-vendoring.
661
+
- SonarCloud PR security hotspots for C `strncpy` and open-ended config field length/copy patterns were queried and addressed in the SDK source before re-vendoring.
635
662
- No external AI reviewer was used for this increment.
636
663
637
664
Same-failure scan:
@@ -641,6 +668,7 @@ Same-failure scan:
641
668
- Same benchmark batch sizing nondeterminism pattern was found and fixed in POSIX and Windows Go benchmark drivers.
642
669
- Same dead Go service-level lookup dispatch guard was found and removed in apps lookup and cgroups lookup.
643
670
- Similar Go protocol-level lookup dispatch guards were tested and kept because regression coverage proves they still guard an overflow state.
671
+
- Same C `strncpy` path-copy pattern was found beyond the reported UDS lifecycle file in POSIX SHM context path storage and fixed in the same increment.
0 commit comments