diff --git a/.golangci.yaml b/.golangci.yaml index 84dec84b..65a0a22c 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -36,7 +36,7 @@ linters: # - gocritic # - gofmt - goheader -# - goimports + - goimports - gomoddirectives - gomodguard - goprintffuncname diff --git a/artifact/image/image.go b/artifact/image/image.go index d8969400..17f9e7dd 100644 --- a/artifact/image/image.go +++ b/artifact/image/image.go @@ -23,7 +23,7 @@ import ( "strings" "github.com/google/go-containerregistry/pkg/name" - "github.com/google/go-containerregistry/pkg/v1" + v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/remote" "github.com/google/osv-scalibr/artifact/image/require" "github.com/google/osv-scalibr/artifact/image/unpack" diff --git a/artifact/image/layerscanning/image.go b/artifact/image/layerscanning/image.go index d27770b1..bf7e6d45 100644 --- a/artifact/image/layerscanning/image.go +++ b/artifact/image/layerscanning/image.go @@ -27,7 +27,8 @@ import ( "strings" "archive/tar" - "github.com/google/go-containerregistry/pkg/v1" + + v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/remote" "github.com/google/go-containerregistry/pkg/v1/tarball" scalibrImage "github.com/google/osv-scalibr/artifact/image" diff --git a/artifact/image/tar/tar.go b/artifact/image/tar/tar.go index 952ef2a8..c6c91a4a 100644 --- a/artifact/image/tar/tar.go +++ b/artifact/image/tar/tar.go @@ -21,7 +21,7 @@ import ( "os" "strings" - "github.com/google/go-containerregistry/pkg/v1" + v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/mutate" "github.com/google/osv-scalibr/log" ) diff --git a/artifact/image/tar/tar_test.go b/artifact/image/tar/tar_test.go index 8aed44d9..ded41961 100644 --- a/artifact/image/tar/tar_test.go +++ b/artifact/image/tar/tar_test.go @@ -24,7 +24,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/google/go-containerregistry/pkg/v1" + v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/tarball" "github.com/google/osv-scalibr/artifact/image/tar" ) diff --git a/artifact/image/unpack/unpack.go b/artifact/image/unpack/unpack.go index 1a9ab8c2..f8cac45e 100644 --- a/artifact/image/unpack/unpack.go +++ b/artifact/image/unpack/unpack.go @@ -27,7 +27,8 @@ import ( "strings" "archive/tar" - "github.com/google/go-containerregistry/pkg/v1" + + v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/osv-scalibr/artifact/image/require" "github.com/google/osv-scalibr/artifact/image/symlink" scalibrtar "github.com/google/osv-scalibr/artifact/image/tar" diff --git a/artifact/image/unpack/unpack_test.go b/artifact/image/unpack/unpack_test.go index b5c69873..427597d4 100644 --- a/artifact/image/unpack/unpack_test.go +++ b/artifact/image/unpack/unpack_test.go @@ -26,9 +26,10 @@ import ( "testing" "archive/tar" + "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "github.com/google/go-containerregistry/pkg/v1" + v1 "github.com/google/go-containerregistry/pkg/v1" "github.com/google/go-containerregistry/pkg/v1/empty" "github.com/google/go-containerregistry/pkg/v1/mutate" "github.com/google/go-containerregistry/pkg/v1/tarball" diff --git a/detector/weakcredentials/winlocal/samreg/samreg.go b/detector/weakcredentials/winlocal/samreg/samreg.go index a0c66e9c..2b5aaf0f 100644 --- a/detector/weakcredentials/winlocal/samreg/samreg.go +++ b/detector/weakcredentials/winlocal/samreg/samreg.go @@ -17,6 +17,7 @@ package samreg import ( "fmt" + "github.com/google/osv-scalibr/common/windows/registry" )