diff --git a/go.mod b/go.mod index a6669e956..4016d8e31 100644 --- a/go.mod +++ b/go.mod @@ -3,9 +3,11 @@ module github.com/checkmarx/ast-cli go 1.23.3 require ( + github.com/Checkmarx/containers-images-extractor v1.0.2 + github.com/Checkmarx/containers-resolver v1.0.2 + github.com/Checkmarx/containers-syft-packages-extractor v1.0.2 github.com/Checkmarx/gen-ai-prompts v0.0.0-20240807143411-708ceec12b63 github.com/Checkmarx/gen-ai-wrapper v1.0.2 - github.com/Checkmarx/containers-resolver v1.0.1 github.com/MakeNowJust/heredoc v1.0.0 github.com/bouk/monkey v1.0.0 github.com/gofrs/flock v0.8.1 @@ -37,8 +39,6 @@ require ( github.com/AdamKorcz/go-118-fuzz-build v0.0.0-20240914100643-eb91380d8434 // indirect github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect github.com/BurntSushi/toml v1.4.0 // indirect - github.com/Checkmarx/containers-images-extractor v1.0.0 // indirect - github.com/Checkmarx/containers-syft-packages-extractor v1.0.1 // indirect github.com/Checkmarx/containers-types v1.0.0 // indirect github.com/CycloneDX/cyclonedx-go v0.9.1 // indirect github.com/DataDog/zstd v1.5.6 // indirect @@ -49,7 +49,7 @@ require ( github.com/Masterminds/squirrel v1.5.4 // indirect github.com/Microsoft/go-winio v0.6.2 // indirect github.com/Microsoft/hcsshim v0.12.9 // indirect - github.com/ProtonMail/go-crypto v1.1.2 // indirect + github.com/ProtonMail/go-crypto v1.1.3 // indirect github.com/acobaugh/osrelease v0.1.0 // indirect github.com/adrg/xdg v0.5.3 // indirect github.com/anchore/clio v0.0.0-20241115144204-29e89f9fa837 // indirect @@ -61,7 +61,7 @@ require ( github.com/anchore/go-version v1.2.2-0.20200701162849-18adb9c92b9b // indirect github.com/anchore/packageurl-go v0.1.1-0.20241018175412-5c22e6360c4f // indirect github.com/anchore/stereoscope v0.0.10-0.20241126202235-be5deed44b7c // indirect - github.com/anchore/syft v1.17.1-0.20241202163009-c3619422bb0b // indirect + github.com/anchore/syft v1.17.1-0.20241204202107-25e5d555efcd // indirect github.com/andybalholm/brotli v1.1.0 // indirect github.com/aquasecurity/go-pep440-version v0.0.0-20210121094942-22b2f8951d46 // indirect github.com/aquasecurity/go-version v0.0.0-20210121072130-637058cfe492 // indirect diff --git a/go.sum b/go.sum index f3d1f4e4b..84ed4e317 100644 --- a/go.sum +++ b/go.sum @@ -62,12 +62,12 @@ github.com/BurntSushi/toml v1.2.1/go.mod h1:CxXYINrC8qIiEnFrOxCa7Jy5BFHlXnUU2pbi github.com/BurntSushi/toml v1.4.0 h1:kuoIxZQy2WRRk1pttg9asf+WVv6tWQuBNVmK8+nqPr0= github.com/BurntSushi/toml v1.4.0/go.mod h1:ukJfTF/6rtPPRCnwkur4qwRxa8vTRFBF0uk2lLoLwho= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= -github.com/Checkmarx/containers-images-extractor v1.0.0 h1:FD1OsTp3HRr+oATO0qy5OKM0Jv2aFE4OpOI8VyOFbCI= -github.com/Checkmarx/containers-images-extractor v1.0.0/go.mod h1:cHtEnS5wlG7bTImOkhTjyZQ9mRurNLWPbnVqmQl94dk= -github.com/Checkmarx/containers-resolver v1.0.1 h1:3fZmrbDVY0du8qBQe8cQ54UaMG5UY7NzkrDLBayMHrU= -github.com/Checkmarx/containers-resolver v1.0.1/go.mod h1:0qnNGRo7h6VmI3m4bWU/HJRW6l68D1g168UuDC4QGeo= -github.com/Checkmarx/containers-syft-packages-extractor v1.0.1 h1:kUZjC5Cvr9YO5brjMwjBD3zUsAFF/PfLsvXrnc9yeDA= -github.com/Checkmarx/containers-syft-packages-extractor v1.0.1/go.mod h1:5AwGpnDTPEOO96/yAB98ozpykCOMuuPF+MW5bXAFu1c= +github.com/Checkmarx/containers-images-extractor v1.0.2 h1:YeIYO3IONUxRh10dmOV1fR+ghC6YHKspNOXk6Z8AEYg= +github.com/Checkmarx/containers-images-extractor v1.0.2/go.mod h1:cHtEnS5wlG7bTImOkhTjyZQ9mRurNLWPbnVqmQl94dk= +github.com/Checkmarx/containers-resolver v1.0.2 h1:U4rmjnCh9s05K2xu5OoGUBrKMXqAboqDNDxp1NCFT/Y= +github.com/Checkmarx/containers-resolver v1.0.2/go.mod h1:DHBdNIo7CwO/GFdCzo387ojO/BBaxgwX5/hprGeK5ss= +github.com/Checkmarx/containers-syft-packages-extractor v1.0.2 h1:hglNeaNINX7HlOsB4DBFpb4RznG2uttKU5p0Qlohu+g= +github.com/Checkmarx/containers-syft-packages-extractor v1.0.2/go.mod h1:g3HBc0hg/aIxlznuqDm6VmTDGmUMg2DDQMl8r60thI0= github.com/Checkmarx/containers-types v1.0.0 h1:H3bAbFnb4GqrAuYww63Ts1S3XmiLt+m8aqLuL/D9pz8= github.com/Checkmarx/containers-types v1.0.0/go.mod h1:yp956K0amnEYogUnVOjuVTe1euNr/0qkgB+NhaqW4M8= github.com/Checkmarx/gen-ai-prompts v0.0.0-20240807143411-708ceec12b63 h1:SCuTcE+CFvgjbIxUNL8rsdB2sAhfuNx85HvxImKta3g= @@ -101,8 +101,8 @@ github.com/Microsoft/hcsshim v0.12.9/go.mod h1:fJ0gkFAna6ukt0bLdKB8djt4XIJhF/vEP github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/OneOfOne/xxhash v1.2.8 h1:31czK/TI9sNkxIKfaUfGlU47BAxQ0ztGgd9vPyqimf8= github.com/OneOfOne/xxhash v1.2.8/go.mod h1:eZbhyaAYD41SGSSsnmcpxVoRiQ/MPUTjUdIIOT9Um7Q= -github.com/ProtonMail/go-crypto v1.1.2 h1:A7JbD57ThNqh7XjmHE+PXpQ3Dqt3BrSAC0AL0Go3KS0= -github.com/ProtonMail/go-crypto v1.1.2/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= +github.com/ProtonMail/go-crypto v1.1.3 h1:nRBOetoydLeUb4nHajyO2bKqMLfWQ/ZPwkXqXxPxCFk= +github.com/ProtonMail/go-crypto v1.1.3/go.mod h1:rA3QumHc/FZ8pAHreoekgiAbzpNsfQAosU5td4SnOrE= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d h1:UrqY+r/OJnIp5u0s1SbQ8dVfLCZJsnvazdBP5hS4iRs= github.com/Shopify/logrus-bugsnag v0.0.0-20171204204709-577dee27f20d/go.mod h1:HI8ITrYtUY+O+ZhtlqUnD8+KwNPOyugEhfP9fdUIaEQ= github.com/acobaugh/osrelease v0.1.0 h1:Yb59HQDGGNhCj4suHaFQQfBps5wyoKLSSX/J/+UifRE= @@ -134,8 +134,8 @@ github.com/anchore/packageurl-go v0.1.1-0.20241018175412-5c22e6360c4f h1:dAQPIrQ github.com/anchore/packageurl-go v0.1.1-0.20241018175412-5c22e6360c4f/go.mod h1:KoYIv7tdP5+CC9VGkeZV4/vGCKsY55VvoG+5dadg4YI= github.com/anchore/stereoscope v0.0.10-0.20241126202235-be5deed44b7c h1:RUoJcTZ/Yb1LS+OLmt6+FoJd7pvo/RLSf19ZBMmSQHI= github.com/anchore/stereoscope v0.0.10-0.20241126202235-be5deed44b7c/go.mod h1:YJ8tya+p3USBZUP7o3aRGuF0uCfmOxcG9fU1VvUdhjc= -github.com/anchore/syft v1.17.1-0.20241202163009-c3619422bb0b h1:S0nEk2g0MeCQDOieMNppCWJFj/+kQi9Q/iMKsQmcmgU= -github.com/anchore/syft v1.17.1-0.20241202163009-c3619422bb0b/go.mod h1:jhbi9WPo3iihmoMCk6Jc+SHH3yjEDwSRQvmntMVcGio= +github.com/anchore/syft v1.17.1-0.20241204202107-25e5d555efcd h1:3cvxaYvvAyeGyZG6o6hutrg/LqNV7tsxsEWr/waLKro= +github.com/anchore/syft v1.17.1-0.20241204202107-25e5d555efcd/go.mod h1:jhbi9WPo3iihmoMCk6Jc+SHH3yjEDwSRQvmntMVcGio= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883/go.mod h1:rCTlJbsFo29Kk6CurOXKm700vrz8f0KW0JNfpkRJY/8= github.com/andybalholm/brotli v1.0.1/go.mod h1:loMXtMfwqflxFJPmdbJO0a3KNoPuLBgiu3qAvBg8x/Y= github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M= diff --git a/internal/wrappers/container-resolver.go b/internal/wrappers/container-resolver.go index c299cc49a..a761386e4 100644 --- a/internal/wrappers/container-resolver.go +++ b/internal/wrappers/container-resolver.go @@ -1,14 +1,19 @@ package wrappers +import containersResolver "github.com/Checkmarx/containers-resolver/pkg/containerResolver" + type ContainerResolverWrapper interface { Resolve(scanPath string, resolutionFilePath string, images []string, isDebug bool) error } type ContainerResolverImpl struct { + containersResolver.ContainersResolver } func NewContainerResolverWrapper() ContainerResolverWrapper { - return &ContainerResolverImpl{} + return &ContainerResolverImpl{ + containersResolver.NewContainerResolver(), + } } func (c *ContainerResolverImpl) Resolve(scanPath, resolutionFilePath string, images []string, isDebug bool) error {