Skip to content
Open
Show file tree
Hide file tree
Changes from 14 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
efeaa27
Remove ContainersEngineCLIEnabled Flag
cx-alex-cohen Jan 29, 2025
3f1361a
Remove ContainersEngineCLIEnabled Flag
cx-alex-cohen Jan 29, 2025
51b3e2c
Remove ContainersEngineCLIEnabled Flag
cx-alex-cohen Jan 29, 2025
01b2f6d
Handling Tar and starting cloud flow
cx-alex-cohen Jan 30, 2025
23bfa96
Fix containers resolver temp folder cleanup
cx-alex-cohen Jan 30, 2025
3d04367
Fix containers resolver temp folder cleanup
cx-alex-cohen Feb 3, 2025
8639152
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Feb 3, 2025
bdfbf30
Fix containers resolver temp folder cleanup
cx-alex-cohen Feb 3, 2025
589a60d
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Feb 4, 2025
2c27185
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Feb 5, 2025
9ab4152
Update Container-Resolver
cx-alex-cohen Feb 5, 2025
4956b0e
Fix local resolve condition handling
cx-alex-cohen Feb 5, 2025
1998a8f
fix unitest
cx-alex-cohen Feb 5, 2025
14c2c8d
fix unitest
cx-alex-cohen Feb 5, 2025
89f1cbd
fix unitest
cx-alex-cohen Feb 6, 2025
52b5807
fix unitest
cx-alex-cohen Feb 6, 2025
5d9d983
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Feb 6, 2025
5e3fade
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Feb 10, 2025
f298715
fix unitest
cx-alex-cohen Feb 10, 2025
6118644
fix unitest
cx-alex-cohen Feb 10, 2025
530ff4d
fix unitest
cx-alex-cohen Feb 10, 2025
f5e1f9e
fix unitest
cx-alex-cohen Feb 11, 2025
99b2e2c
add path validation for tar files
cx-alex-cohen Feb 11, 2025
072eef7
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Feb 11, 2025
748e6a3
fix
cx-alex-cohen Feb 11, 2025
9c1cd46
fix
cx-alex-cohen Feb 11, 2025
b36d547
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Feb 12, 2025
7feb0c7
Add tests
cx-alex-cohen Feb 12, 2025
f63f08f
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Feb 12, 2025
f5514d7
Merge branch 'main' into feature/alex-containers-default-cloud
cx-ben-alvo Feb 13, 2025
2b5830c
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Feb 13, 2025
0dc7602
Fix Code Review
cx-alex-cohen Feb 13, 2025
5ada6b5
Fix Code Review
cx-alex-cohen Feb 17, 2025
077963a
Merge branch 'main' into feature/alex-containers-default-cloud
cx-ben-alvo Feb 17, 2025
62a25d7
rename the flag
cx-alex-cohen Feb 18, 2025
89dbaef
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Feb 25, 2025
7fc1be7
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Mar 3, 2025
9d1cf00
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Mar 26, 2025
9c0bbbe
fix merge issues
cx-alex-cohen Mar 26, 2025
f5e3eb3
update resolver
cx-alex-cohen Mar 26, 2025
1868604
Merge branch 'main' into feature/alex-containers-default-cloud
cx-alex-cohen Mar 28, 2025
907f714
zip file done
cx-dmitri-rivin Apr 23, 2025
0ee032d
code done
cx-dmitri-rivin May 22, 2025
5176670
merge with main
cx-dmitri-rivin May 22, 2025
1d48604
fix for UserCustomImages
cx-dmitri-rivin May 22, 2025
a21ce6a
test for images added
cx-dmitri-rivin May 22, 2025
f75f39c
Merge branch 'main' into feature/alex-containers-default-cloud
cx-dmitri-rivin May 22, 2025
622bc50
Merge remote-tracking branch 'origin/feature/alex-containers-default-…
cx-dmitri-rivin May 22, 2025
7275638
test for images added
cx-dmitri-rivin May 22, 2025
a971c9b
test log fix
cx-dmitri-rivin May 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ module github.com/checkmarx/ast-cli
go 1.23.3

require (
github.com/Checkmarx/containers-resolver v1.0.6-0.20250130184119-42af4015f216
github.com/Checkmarx/containers-resolver v1.0.6
github.com/Checkmarx/gen-ai-prompts v0.0.0-20240807143411-708ceec12b63
github.com/Checkmarx/gen-ai-wrapper v1.0.2
github.com/MakeNowJust/heredoc v1.0.0
Expand All @@ -25,7 +25,7 @@ require (
golang.org/x/crypto v0.32.0
golang.org/x/sync v0.10.0
golang.org/x/text v0.21.0
google.golang.org/grpc v1.67.3
google.golang.org/grpc v1.70.1-0.20250123180834-11fb3d8f570c
google.golang.org/protobuf v1.36.3
gopkg.in/yaml.v3 v3.0.1
gotest.tools v2.2.0+incompatible
Expand All @@ -37,9 +37,9 @@ 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.3 // indirect
github.com/Checkmarx/containers-syft-packages-extractor v1.0.6-0.20250130183701-3874a3497983 // indirect
github.com/Checkmarx/containers-types v1.0.0 // indirect
github.com/Checkmarx/containers-images-extractor v1.0.4 // indirect
github.com/Checkmarx/containers-syft-packages-extractor v1.0.6 // indirect
github.com/Checkmarx/containers-types v1.0.1 // indirect
github.com/CycloneDX/cyclonedx-go v0.9.2 // indirect
github.com/DataDog/zstd v1.5.6 // indirect
github.com/Masterminds/goutils v1.1.1 // indirect
Expand All @@ -56,7 +56,7 @@ require (
github.com/anchore/archiver/v3 v3.5.3-0.20241210171143-5b1d8d1c7c51 // indirect
github.com/anchore/clio v0.0.0-20241115144204-29e89f9fa837 // indirect
github.com/anchore/fangs v0.0.0-20241125225345-c73f048692d3 // indirect
github.com/anchore/go-collections v0.0.0-20240216214351-5baf374cca6f // indirect
github.com/anchore/go-collections v0.0.0-20241211140901-567f400e9a46 // indirect
github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a // indirect
github.com/anchore/go-macholibre v0.0.0-20220308212642-53e6d0aaf6fb // indirect
github.com/anchore/go-struct-converter v0.0.0-20240925125616-a0883641c664 // indirect
Expand Down Expand Up @@ -211,9 +211,9 @@ require (
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pkg/profile v1.7.0 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.2 // indirect
github.com/prometheus/client_golang v1.20.4 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/common v0.62.1-0.20250120134357-7684929007b4 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rivo/uniseg v0.4.7 // indirect
github.com/rs/zerolog v1.33.0 // indirect
Expand Down
34 changes: 18 additions & 16 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,14 @@ github.com/BurntSushi/toml v0.4.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.3 h1:v/F9PxR0YxVHY5I3mizgpBhARQXKFVwDsNz/d8AKQow=
github.com/Checkmarx/containers-images-extractor v1.0.3/go.mod h1:cHtEnS5wlG7bTImOkhTjyZQ9mRurNLWPbnVqmQl94dk=
github.com/Checkmarx/containers-resolver v1.0.6-0.20250130184119-42af4015f216 h1:JJAEf+9i56L0juokmM0XmRuayEQ6aH9HoX5+LhDL0vI=
github.com/Checkmarx/containers-resolver v1.0.6-0.20250130184119-42af4015f216/go.mod h1:ZrbHg7GeHvHi4hxMmv5DL9bXJuBHMU+1hUH0omt67zM=
github.com/Checkmarx/containers-syft-packages-extractor v1.0.6-0.20250130183701-3874a3497983 h1:jPFfsFsfCx9NPKTskVkzW1XZCkE9ISSpJ4Dd+hddKgM=
github.com/Checkmarx/containers-syft-packages-extractor v1.0.6-0.20250130183701-3874a3497983/go.mod h1:cYpRbQpG/7zSC+NCnKbm3omFpP2dNJ4FFUwVPJmrtsU=
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/containers-images-extractor v1.0.4 h1:7kJ8k7vFJmRYVObeEEKb2PfYt/RwS5z9EgLgVSHAwo8=
github.com/Checkmarx/containers-images-extractor v1.0.4/go.mod h1:LG6PUJg68oPYuVXMi2NGWpoRQ+yCbBST5J1qfV6iIAU=
github.com/Checkmarx/containers-resolver v1.0.6 h1:W5hUuMfzohFx1/gUTk0djMpox9efiLreulQvE7g0bj0=
github.com/Checkmarx/containers-resolver v1.0.6/go.mod h1:0sVMhhXYLBlC3ccZG5M0QWGr+alQsM4ktQfTyfBr4fo=
github.com/Checkmarx/containers-syft-packages-extractor v1.0.6 h1:Q/5XgWeOvEfUqT8YHiZcY2tGFiuBHFil5kHdaYEW5Sc=
github.com/Checkmarx/containers-syft-packages-extractor v1.0.6/go.mod h1:k+pq16ATCgmwIPTttDE0MT0q6nLsWi9nJiPeWJNsymI=
github.com/Checkmarx/containers-types v1.0.1 h1:hNMn7tEz08adHcZzMQla2xqf0XeTsAeKz1MG0RK31MY=
github.com/Checkmarx/containers-types v1.0.1/go.mod h1:yp956K0amnEYogUnVOjuVTe1euNr/0qkgB+NhaqW4M8=
github.com/Checkmarx/gen-ai-prompts v0.0.0-20240807143411-708ceec12b63 h1:SCuTcE+CFvgjbIxUNL8rsdB2sAhfuNx85HvxImKta3g=
github.com/Checkmarx/gen-ai-prompts v0.0.0-20240807143411-708ceec12b63/go.mod h1:MI6lfLerXU+5eTV/EPTDavgnV3owz3GPT4g/msZBWPo=
github.com/Checkmarx/gen-ai-wrapper v1.0.2 h1:T6X40+4hYnwfDsvkjWs9VIcE6s1O+8DUu0+sDdCY3GI=
Expand Down Expand Up @@ -120,8 +120,8 @@ github.com/anchore/clio v0.0.0-20241115144204-29e89f9fa837 h1:bIG3WsfosZsJ5LMC7P
github.com/anchore/clio v0.0.0-20241115144204-29e89f9fa837/go.mod h1:tRQVKkjYeejrh9AdM0s1esbwtMU7rdHAHSQWkv4qskE=
github.com/anchore/fangs v0.0.0-20241125225345-c73f048692d3 h1:GaErkA967XCOkqfOgZ+ijU0rswhIJ3py9kH1LfQKDMs=
github.com/anchore/fangs v0.0.0-20241125225345-c73f048692d3/go.mod h1:PWdaRnahkGJ+56c9Q5TMmMeEEKgVT7vZHmL/wg0E8aw=
github.com/anchore/go-collections v0.0.0-20240216214351-5baf374cca6f h1:6XOqdySEfZC90kgx95CuAj7olASfl895cHjX091vv6U=
github.com/anchore/go-collections v0.0.0-20240216214351-5baf374cca6f/go.mod h1:1aiktV46ATCkuVg0O573ZrH56BUawTECPETbZyBcqT8=
github.com/anchore/go-collections v0.0.0-20241211140901-567f400e9a46 h1:huvprHsfzhrIIkk7kja1Fm5Wn3mnwPv4CeHrGlGD3ds=
github.com/anchore/go-collections v0.0.0-20241211140901-567f400e9a46/go.mod h1:1aiktV46ATCkuVg0O573ZrH56BUawTECPETbZyBcqT8=
github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a h1:nJ2G8zWKASyVClGVgG7sfM5mwoZlZ2zYpIzN2OhjWkw=
github.com/anchore/go-logger v0.0.0-20230725134548-c21dafa1ec5a/go.mod h1:ubLFmlsv8/DFUQrZwY5syT5/8Er3ugSr4rDFwHsE3hg=
github.com/anchore/go-macholibre v0.0.0-20220308212642-53e6d0aaf6fb h1:iDMnx6LIjtjZ46C0akqveX83WFzhpTD3eqOthawb5vU=
Expand Down Expand Up @@ -784,8 +784,8 @@ github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXP
github.com/prometheus/client_golang v1.0.0/go.mod h1:db9x61etRT2tGnBNRi70OPL5FsnadC4Ky3P0J6CfImo=
github.com/prometheus/client_golang v1.1.0/go.mod h1:I1FGZT9+L76gKKOs5djB6ezCbFQP1xR9D75/vuwEF3g=
github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
github.com/prometheus/client_golang v1.20.2 h1:5ctymQzZlyOON1666svgwn3s6IKWgfbjsejTMiXIyjg=
github.com/prometheus/client_golang v1.20.2/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_golang v1.20.4 h1:Tgh3Yr67PaOv/uTqloMsCEdeuFTatm5zIq5+qNN23vI=
github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE=
github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
Expand All @@ -795,8 +795,8 @@ github.com/prometheus/client_model v0.6.1/go.mod h1:OrxVMOVHjw3lKMa8+x6HeMGkHMQy
github.com/prometheus/common v0.4.1/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
github.com/prometheus/common v0.6.0/go.mod h1:eBmuwkDJBwy6iBfxCBob6t6dR6ENT/y+J+Zk0j9GMYc=
github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
github.com/prometheus/common v0.55.0 h1:KEi6DK7lXW/m7Ig5i47x0vRzuBsHuvJdi5ee6Y3G1dc=
github.com/prometheus/common v0.55.0/go.mod h1:2SECS4xJG1kd8XF9IcM1gMX6510RAEL65zxzNImwdc8=
github.com/prometheus/common v0.62.1-0.20250120134357-7684929007b4 h1:emZ6jCeAn83YKH8Gf90ZmEqoa3scnE/IBSb5LDAmnj0=
github.com/prometheus/common v0.62.1-0.20250120134357-7684929007b4/go.mod h1:Owq/qgGhmzO3ztwEJCp82dr1xr4XUAb1Jw8FFvEOsOo=
github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA=
github.com/prometheus/procfs v0.0.3/go.mod h1:4A/X28fw3Fc593LaREMrKMqOKvUAntwMDaekg4FpcdQ=
Expand Down Expand Up @@ -984,6 +984,8 @@ go.opentelemetry.io/otel/metric v1.33.0 h1:r+JOocAyeRVXD8lZpjdQjzMadVZp2M4WmQ+5W
go.opentelemetry.io/otel/metric v1.33.0/go.mod h1:L9+Fyctbp6HFTddIxClbQkjtubW6O9QS3Ann/M82u6M=
go.opentelemetry.io/otel/sdk v1.33.0 h1:iax7M131HuAm9QkZotNHEfstof92xM+N8sr3uHXc2IM=
go.opentelemetry.io/otel/sdk v1.33.0/go.mod h1:A1Q5oi7/9XaMlIWzPSxLRWOI8nG3FnzHJNbiENQuihM=
go.opentelemetry.io/otel/sdk/metric v1.32.0 h1:rZvFnvmvawYb0alrYkjraqJq0Z4ZUJAiyYCU9snn1CU=
go.opentelemetry.io/otel/sdk/metric v1.32.0/go.mod h1:PWeZlq0zt9YkYAp3gjKZ0eicRYvOh1Gd+X99x6GHpCQ=
go.opentelemetry.io/otel/trace v1.33.0 h1:cCJuF7LRjUFso9LPnEAHJDB2pqzp+hbO8eu1qqW2d/s=
go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37CbGV4fr1f2nBck=
go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
Expand Down Expand Up @@ -1425,8 +1427,8 @@ google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnD
google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
google.golang.org/grpc v1.42.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
google.golang.org/grpc v1.67.3 h1:OgPcDAFKHnH8X3O4WcO4XUc8GRDeKsKReqbQtiCj7N8=
google.golang.org/grpc v1.67.3/go.mod h1:YGaHCc6Oap+FzBJTZLBzkGSYt/cvGPFTPxkn7QfSU8s=
google.golang.org/grpc v1.70.1-0.20250123180834-11fb3d8f570c h1:zso4cTwwJAu7b9EWl/He8hKt423SRyGO6UOJXOajFlc=
google.golang.org/grpc v1.70.1-0.20250123180834-11fb3d8f570c/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
Expand Down
8 changes: 3 additions & 5 deletions internal/commands/result.go
Original file line number Diff line number Diff line change
Expand Up @@ -1047,10 +1047,8 @@ func setIsSCSEnabled(featureFlagsWrapper wrappers.FeatureFlagsWrapper) {
wrappers.IsSCSEnabled = scsEngineCLIEnabled.Status
}

func setIsContainersEnabled(agent string, featureFlagsWrapper wrappers.FeatureFlagsWrapper) {
agentSupported := !containsIgnoreCase(containerEngineUnsupportedAgents, agent)
containerEngineCLIEnabled, _ := wrappers.GetSpecificFeatureFlag(featureFlagsWrapper, wrappers.ContainerEngineCLIEnabled)
wrappers.IsContainersEnabled = containerEngineCLIEnabled.Status && agentSupported
func setIsContainersEnabled(agent string) {
wrappers.IsContainersEnabled = !containsIgnoreCase(containerEngineUnsupportedAgents, agent)
}

func filterResultsByType(results *wrappers.ScanResultsCollection, excludedTypes map[string]struct{}) *wrappers.ScanResultsCollection {
Expand Down Expand Up @@ -1109,7 +1107,7 @@ func CreateScanReport(
reportList := strings.Split(reportTypes, ",")
results := &wrappers.ScanResultsCollection{}
setIsSCSEnabled(featureFlagsWrapper)
setIsContainersEnabled(agent, featureFlagsWrapper)
setIsContainersEnabled(agent)
summary, err := convertScanToResultsSummary(scan, resultsWrapper)
if err != nil {
return nil, err
Expand Down
Loading
Loading