containerd/integration
Sebastiaan van Stijn 2ac9968401
replace uses of os/exec with golang.org/x/sys/execabs
Go 1.15.7 contained a security fix for CVE-2021-3115, which allowed arbitrary
code to be executed at build time when using cgo on Windows. This issue also
affects Unix users who have “.” listed explicitly in their PATH and are running
“go get” outside of a module or with module mode disabled.

This issue is not limited to the go command itself, and can also affect binaries
that use `os.Command`, `os.LookPath`, etc.

From the related blogpost (ttps://blog.golang.org/path-security):

> Are your own programs affected?
>
> If you use exec.LookPath or exec.Command in your own programs, you only need to
> be concerned if you (or your users) run your program in a directory with untrusted
> contents. If so, then a subprocess could be started using an executable from dot
> instead of from a system directory. (Again, using an executable from dot happens
> always on Windows and only with uncommon PATH settings on Unix.)
>
> If you are concerned, then we’ve published the more restricted variant of os/exec
> as golang.org/x/sys/execabs. You can use it in your program by simply replacing

This patch replaces all uses of `os/exec` with `golang.org/x/sys/execabs`. While
some uses of `os/exec` should not be problematic (e.g. part of tests), it is
probably good to be consistent, in case code gets moved around.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2021-08-25 18:11:09 +02:00
..
client replace uses of os/exec with golang.org/x/sys/execabs 2021-08-25 18:11:09 +02:00
cri-api/pkg/apis move up to CRI v1 and support v1alpha in parallel 2021-06-28 09:34:12 -05:00
images integration: Windows volume-copy-up images 2021-06-30 11:19:54 +00:00
remote Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
util Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
addition_gids_test.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
common.go move up to CRI v1 and support v1alpha in parallel 2021-06-28 09:34:12 -05:00
container_log_test.go Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha 2021-07-09 14:07:24 -04:00
container_restart_test.go test integration: Adds a test that restarts a failed container 2021-06-25 10:33:38 +00:00
container_stats_test.go Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha 2021-07-09 14:07:24 -04:00
container_stop_test.go Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha 2021-07-09 14:07:24 -04:00
container_update_resources_test.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
container_volume_test.go Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha 2021-07-09 14:07:24 -04:00
container_without_image_ref_test.go Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha 2021-07-09 14:07:24 -04:00
containerd_image_test.go Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha 2021-07-09 14:07:24 -04:00
duplicate_name_test.go tests: Refactors PodSandbox creation 2021-06-03 16:02:38 +00:00
image_list.sample.toml tests: Refactors container image usage 2021-04-27 08:44:21 +00:00
image_load_test.go replace uses of os/exec with golang.org/x/sys/execabs 2021-08-25 18:11:09 +02:00
imagefs_info_test.go Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha 2021-07-09 14:07:24 -04:00
main_test.go replace uses of os/exec with golang.org/x/sys/execabs 2021-08-25 18:11:09 +02:00
no_metadata_test.go Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha 2021-07-09 14:07:24 -04:00
pod_dualstack_test.go Merge pull request #5619 from mikebrow/cri-add-v1-proxy-alpha 2021-07-09 14:07:24 -04:00
pod_hostname_test.go move up to CRI v1 and support v1alpha in parallel 2021-06-28 09:34:12 -05:00
restart_test.go move up to CRI v1 and support v1alpha in parallel 2021-06-28 09:34:12 -05:00
runtime_handler_test.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
sandbox_clean_remove_test.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
truncindex_test.go move up to CRI v1 and support v1alpha in parallel 2021-06-28 09:34:12 -05:00
volume_copy_up_test.go replace uses of os/exec with golang.org/x/sys/execabs 2021-08-25 18:11:09 +02:00