gosec fixes and added #nosec where necassary

This commit is contained in:
2025-07-06 00:33:50 -05:00
parent ffb3c3d4f4
commit b9aebc8406
19 changed files with 109 additions and 55 deletions

View File

@@ -168,7 +168,7 @@ func (d *Destination) Announce(appData []byte) error {
// Add app data with length prefix
appDataLen := make([]byte, 2)
binary.BigEndian.PutUint16(appDataLen, uint16(len(appData)))
binary.BigEndian.PutUint16(appDataLen, uint16(len(appData))) // #nosec G115
packet = append(packet, appDataLen...)
packet = append(packet, appData...)
log.Printf("[DEBUG-4] Added %d bytes of app data to announce", len(appData))