From bb3424adb06c19c622c132ea183f2c9bb79ce9a2 Mon Sep 17 00:00:00 2001 From: Rajat Chopra Date: Tue, 21 Apr 2026 11:06:12 -0700 Subject: [PATCH] fix: clean lint for pci ids (never negative) Signed-off-by: Rajat Chopra --- internal/links/pciinfo.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/links/pciinfo.go b/internal/links/pciinfo.go index d2da9d5..3babe82 100644 --- a/internal/links/pciinfo.go +++ b/internal/links/pciinfo.go @@ -34,9 +34,10 @@ type PciInfo nvml.PciInfo func (p PciInfo) BusID() string { var bytes []byte for _, b := range p.BusId { - if byte(b) == '\x00' { + if b >= 0 && byte(b) == '\x00' { break } + // #nosec G115 bytes = append(bytes, byte(b)) } id := strings.ToLower(string(bytes))