Skip to content

Commit d39705b

Browse files
committed
fix: add nolint:gosec for sysfs ReadFile in NVMe recovery check
1 parent 8ae8a83 commit d39705b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

pkg/driver/node_recovery.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ func isNVMeDeviceRecovering(devicePath string) bool {
291291
}
292292

293293
// Only check fabrics controllers
294-
transport, err := os.ReadFile("/sys/class/nvme/" + ctrlName + "/transport")
294+
transport, err := os.ReadFile("/sys/class/nvme/" + ctrlName + "/transport") //nolint:gosec // path constructed from device name
295295
if err != nil || strings.TrimSpace(string(transport)) == "" {
296296
return false
297297
}

0 commit comments

Comments
 (0)