golangci-lint: The parameters passed to exec.Command are safe
None of these parameters are user controlled, they are either constructed from paths or are constants.
This commit is contained in:
parent
29fb97f3d6
commit
dfb69dc8e7
2 changed files with 4 additions and 0 deletions
|
|
@ -180,6 +180,7 @@ func WithBootedQemuImage(image string, ns NetNS, f func() error) error {
|
|||
// WithBootedNspawnImage boots the specified image in the specified namespace
|
||||
// using nspawn. The VM is killed immediately after function returns.
|
||||
func WithBootedNspawnImage(image string, ns NetNS, f func() error) error {
|
||||
//nolint:gosec
|
||||
cmd := exec.Command(
|
||||
"systemd-nspawn",
|
||||
"--boot", "--register=no",
|
||||
|
|
@ -205,6 +206,7 @@ func WithBootedNspawnImage(image string, ns NetNS, f func() error) error {
|
|||
// WithBootedNspawnImage boots the specified directory in the specified namespace
|
||||
// using nspawn. The VM is killed immediately after function returns.
|
||||
func WithBootedNspawnDirectory(dir string, ns NetNS, f func() error) error {
|
||||
//nolint:gosec
|
||||
cmd := exec.Command(
|
||||
"systemd-nspawn",
|
||||
"--boot", "--register=no",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue