From 4ac2c984527d144d40dacb468b835ef7d4e4861b Mon Sep 17 00:00:00 2001 From: Evan Lezar Date: Sun, 28 Jan 2024 14:24:25 +0100 Subject: [PATCH] Add nolint for gosec G204 Signed-off-by: Evan Lezar --- api/hooks/v1/hooks.go | 2 +- cmd/nvidia-mig-parted/util/device.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/hooks/v1/hooks.go b/api/hooks/v1/hooks.go index c09f1754..e9e74df4 100644 --- a/api/hooks/v1/hooks.go +++ b/api/hooks/v1/hooks.go @@ -66,7 +66,7 @@ func (h HooksMap) Run(name string, envs EnvsMap, output bool) error { // It injects the environment variables associated with the provided EnvMap, // and optionally prints the output for each hook to stdout and stderr. func (h *HookSpec) Run(envs EnvsMap, output bool) error { - cmd := exec.Command(h.Command, h.Args...) + cmd := exec.Command(h.Command, h.Args...) //nolint:gosec cmd.Env = h.Envs.Combine(envs).Format() cmd.Dir = h.Workdir if output { diff --git a/cmd/nvidia-mig-parted/util/device.go b/cmd/nvidia-mig-parted/util/device.go index 5b835bf8..0e5eb3d8 100644 --- a/cmd/nvidia-mig-parted/util/device.go +++ b/cmd/nvidia-mig-parted/util/device.go @@ -150,7 +150,7 @@ func nvmlResetAllGPUs() (string, error) { return "No GPUs to reset...", nil } - cmd := exec.Command("nvidia-smi", "-r", "-i", strings.Join(pciBusIDs, ",")) + cmd := exec.Command("nvidia-smi", "-r", "-i", strings.Join(pciBusIDs, ",")) //nolint:gosec output, err := cmd.CombinedOutput() return string(output), err }