From d465f103ec38d93dc0e463a00f5e8719c5ad0034 Mon Sep 17 00:00:00 2001 From: Sudo-Ivan Date: Mon, 29 Dec 2025 22:33:17 -0600 Subject: [PATCH] Add 'bearer:disable go_gosec_unsafe_unsafe' comments in tcp_linux.go to suppress specific security scanner warnings related to unsafe operations. --- pkg/interfaces/tcp_linux.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/interfaces/tcp_linux.go b/pkg/interfaces/tcp_linux.go index 4f779f3..2df30df 100644 --- a/pkg/interfaces/tcp_linux.go +++ b/pkg/interfaces/tcp_linux.go @@ -79,6 +79,7 @@ func (tc *TCPClientInterface) setTimeoutsOSX() error { func platformGetRTT(fd uintptr) time.Duration { var info syscall.TCPInfo + // bearer:disable go_gosec_unsafe_unsafe infoLen := uint32(unsafe.Sizeof(info)) // TCP_INFO is 11 on Linux @@ -88,7 +89,9 @@ func platformGetRTT(fd uintptr) time.Duration { fd, syscall.IPPROTO_TCP, 11, // TCP_INFO + // bearer:disable go_gosec_unsafe_unsafe uintptr(unsafe.Pointer(&info)), + // bearer:disable go_gosec_unsafe_unsafe uintptr(unsafe.Pointer(&infoLen)), 0, )