From 4859f5513adae2bd1e7ecb8b7557d75cb38123af Mon Sep 17 00:00:00 2001 From: Ivan Date: Thu, 20 Nov 2025 18:04:22 -0600 Subject: [PATCH] fix: add security comment for Unix timestamp handling in CreatePacket function --- pkg/announce/announce.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/announce/announce.go b/pkg/announce/announce.go index baa2f3c..52aecc9 100644 --- a/pkg/announce/announce.go +++ b/pkg/announce/announce.go @@ -355,6 +355,7 @@ func (a *Announce) CreatePacket() []byte { } // Add 5 bytes of timestamp timeBytes := make([]byte, 8) + // #nosec G115 - Unix timestamp is always positive, no overflow risk binary.BigEndian.PutUint64(timeBytes, uint64(time.Now().Unix())) copy(randomHash[5:], timeBytes[:5])