containerd/oci
Henry Wang b8bf504e94 Enable gosec linter for golangci-lint
`gosec` linter is able to identify issues described in #6584

e.g.

$ git revert 54e95e6b88
[gosec dfc8ca1ec] Revert "fix Implicit memory aliasing in for loop"
 2 files changed, 2 deletions(-)

$ make check
+ proto-fmt
+ check
GOGC=75 golangci-lint run
containerstore.go:192:54: G601: Implicit memory aliasing in for loop. (gosec)
		containers = append(containers, containerFromProto(&container))
		                                                   ^
image_store.go:132:42: G601: Implicit memory aliasing in for loop. (gosec)
		images = append(images, imageFromProto(&image))
		                                       ^
make: *** [check] Error 1

I also disabled following two settings which prevent the linter to show a complete list of issues.

* max-issues-per-linter (default 50)
* max-same-issues (default 3)

Furthermore enabling gosec revealed many other issues. For now I blacklisted the ones except G601.

Will create separate tasks to address them one by one moving next.

Signed-off-by: Henry Wang <henwang@amazon.com>
2022-03-14 22:50:54 +00:00
..
client.go Licence header added 2018-02-19 10:32:26 +09:00
mounts_freebsd.go Add ruleset=4 option 2021-05-25 09:17:16 +02:00
mounts.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
spec_opts_linux_test.go refactor: move from io/ioutil to io and os package 2021-09-21 09:50:38 +08:00
spec_opts_linux.go Adds support for Windows ArgsEscaped images 2022-03-01 13:40:44 -08:00
spec_opts_nonlinux.go feat: replace github.com/pkg/errors to errors 2022-01-07 10:27:03 +08:00
spec_opts_test.go Enable gosec linter for golangci-lint 2022-03-14 22:50:54 +00:00
spec_opts_unix_test.go Run go fmt with Go 1.17 2021-08-22 09:31:50 +09:00
spec_opts_unix.go Adds support for Windows ArgsEscaped images 2022-03-01 13:40:44 -08:00
spec_opts_windows_test.go Adds support for Windows ArgsEscaped images 2022-03-01 13:40:44 -08:00
spec_opts_windows.go Adds support for Windows ArgsEscaped images 2022-03-01 13:40:44 -08:00
spec_opts.go Plumb CRI Devices through to OCI WindowsDevices 2022-03-12 08:16:43 +11:00
spec_test.go oci.WithPrivileged: set the current caps, not the known caps 2021-02-10 17:14:17 +09:00
spec.go Fix mounts for FreeBSD 2021-05-10 21:49:46 +02:00
utils_unix_go116_test.go OCI: Mount (accessible) host devices in privileged rootless containers 2021-12-10 12:16:59 +01:00
utils_unix_go117_test.go OCI: Mount (accessible) host devices in privileged rootless containers 2021-12-10 12:16:59 +01:00
utils_unix_test.go OCI: Mount (accessible) host devices in privileged rootless containers 2021-12-10 12:16:59 +01:00
utils_unix.go feat: replace github.com/pkg/errors to errors 2022-01-07 10:27:03 +08:00