Skip to content

Commit

Permalink
Add nolint for gosec G204
Browse files Browse the repository at this point in the history
Signed-off-by: Evan Lezar <[email protected]>
  • Loading branch information
elezar committed Jan 28, 2024
1 parent de81383 commit 4ac2c98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/hooks/v1/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/nvidia-mig-parted/util/device.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 4ac2c98

Please sign in to comment.