diff --git a/go.mod b/go.mod index 3e1b9b091..9dcc9ad1d 100644 --- a/go.mod +++ b/go.mod @@ -125,8 +125,8 @@ require ( // replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230828134416-f0db33dd9344 -replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903133754-ccb508c7c860 +replace github.com/jfrog/jfrog-cli-core/v2 => github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904072609-688e69354a3d -replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230903070657-5e95ddc4e0e1 +replace github.com/jfrog/jfrog-client-go => github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46 replace github.com/jfrog/build-info-go => github.com/jfrog/build-info-go v1.8.9-0.20230831151231-e5e7bd035ddc diff --git a/go.sum b/go.sum index c11b39a30..6be4eb4f1 100644 --- a/go.sum +++ b/go.sum @@ -133,10 +133,10 @@ github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1m github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903133754-ccb508c7c860 h1:s/uosfzm1S8xqiT/qNa5bxfsIcH/WOiz0tadQnpoV7U= -github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230903133754-ccb508c7c860/go.mod h1:QBDbnE5CXac+jKvLHGocEYgqT6+VcfCGYhyxRmwXD7Q= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230903070657-5e95ddc4e0e1 h1:X/ltOWcM0+dhYQ0XRJjsNkEzzDXaGC+DLZGov6Z7t3E= -github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230903070657-5e95ddc4e0e1/go.mod h1:uUnMrqHX7Xi+OCaZEE4b3BtsmGeOSCB7XqaEWVXEH/E= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904072609-688e69354a3d h1:SFZ8xDWYCsUYPd9NGEBe29L31aa2bMry92r4ZOkf2Qw= +github.com/eyaldelarea/jfrog-cli-core/v2 v2.0.0-20230904072609-688e69354a3d/go.mod h1:XXfPmqg9mgS7eR8cgvKplyTWLfsv3IO2rnX3jmPkbb0= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46 h1:9IqNDt2xaBhzyFXILsC5xaKQZUDT6Rx5UmStDtpTPTE= +github.com/eyaldelarea/jfrog-client-go v1.28.4-0.20230904072239-1e6715ddfa46/go.mod h1:uUnMrqHX7Xi+OCaZEE4b3BtsmGeOSCB7XqaEWVXEH/E= github.com/forPelevin/gomoji v1.1.8 h1:JElzDdt0TyiUlecy6PfITDL6eGvIaxqYH1V52zrd0qQ= github.com/forPelevin/gomoji v1.1.8/go.mod h1:8+Z3KNGkdslmeGZBC3tCrwMrcPy5GRzAD+gL9NAwMXg= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= diff --git a/scan/cli.go b/scan/cli.go index a99b94e1d..eb4ab3e1c 100644 --- a/scan/cli.go +++ b/scan/cli.go @@ -1,6 +1,7 @@ package scan import ( + "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit" "github.com/jfrog/jfrog-cli-core/v2/xray/commands/curation" xrCmdUtils "github.com/jfrog/jfrog-cli-core/v2/xray/commands/utils" xrutils "github.com/jfrog/jfrog-cli-core/v2/xray/utils" @@ -16,7 +17,6 @@ import ( corecommondocs "github.com/jfrog/jfrog-cli-core/v2/docs/common" coreconfig "github.com/jfrog/jfrog-cli-core/v2/utils/config" "github.com/jfrog/jfrog-cli-core/v2/utils/coreutils" - audit "github.com/jfrog/jfrog-cli-core/v2/xray/commands/audit/generic" "github.com/jfrog/jfrog-cli-core/v2/xray/commands/scan" "github.com/jfrog/jfrog-cli/docs/common" auditdocs "github.com/jfrog/jfrog-cli/docs/scan/audit" @@ -234,7 +234,7 @@ func CurationCmd(c *cli.Context) error { return progressbar.ExecWithProgress(curationAuditCommand) } -func createGenericAuditCmd(c *cli.Context) (*audit.GenericAuditCommand, error) { +func createGenericAuditCmd(c *cli.Context) (*audit.AuditCommand, error) { auditCmd := audit.NewGenericAuditCommand() err := validateXrayContext(c) if err != nil { diff --git a/xray_test.go b/xray_test.go index c10ede906..ed28812a6 100644 --- a/xray_test.go +++ b/xray_test.go @@ -706,9 +706,9 @@ func verifySimpleJsonJasResults(t *testing.T, content string, minIacViolations, assert.GreaterOrEqual(t, len(results.Iacs), minIacViolations, "Found less IaC then expected") var applicableResults, notApplicableResults int for _, vuln := range results.Vulnerabilities { - if vuln.Applicable == utils.NotApplicableStringValue { + if utils.ApplicabilityStatus(vuln.Applicable) == utils.NotApplicable { notApplicableResults++ - } else if vuln.Applicable == utils.ApplicableStringValue { + } else if utils.ApplicabilityStatus(vuln.Applicable) == utils.Applicable { applicableResults++ } }