diff --git a/core/pkg/resultshandling/printer/v2/controltable.go b/core/pkg/resultshandling/printer/v2/controltable.go index 2834e9808b..2c10c9a888 100644 --- a/core/pkg/resultshandling/printer/v2/controltable.go +++ b/core/pkg/resultshandling/printer/v2/controltable.go @@ -54,7 +54,7 @@ func getComplianceScoreColumn(controlSummary reportsummary.IControlSummary, info if controlSummary.GetStatus().IsSkipped() { return fmt.Sprintf("%s %s", "Action Required", getInfoColumn(controlSummary, infoToPrintInfo)) } - return fmt.Sprintf("%d", cautils.Float32ToInt(controlSummary.GetScore())) + "%" + return fmt.Sprintf("%d", cautils.Float32ToInt(controlSummary.GetComplianceScore())) + "%" } func getSeverityColumn(controlSummary reportsummary.IControlSummary) string { diff --git a/go.mod b/go.mod index d339303254..5939293c36 100644 --- a/go.mod +++ b/go.mod @@ -19,7 +19,7 @@ require ( github.com/kubescape/go-git-url v0.0.24 github.com/kubescape/go-logger v0.0.11 github.com/kubescape/k8s-interface v0.0.116 - github.com/kubescape/opa-utils v0.0.245 + github.com/kubescape/opa-utils v0.0.246 github.com/kubescape/rbac-utils v0.0.20 github.com/kubescape/regolibrary v1.0.250 github.com/libgit2/git2go/v33 v33.0.9 @@ -29,6 +29,7 @@ require ( github.com/open-policy-agent/opa v0.45.0 github.com/owenrumney/go-sarif/v2 v2.1.2 github.com/schollz/progressbar/v3 v3.13.0 + github.com/sergi/go-diff v1.2.0 github.com/sigstore/cosign v1.13.1 github.com/spf13/cobra v1.6.1 github.com/stretchr/testify v1.8.1 @@ -48,7 +49,6 @@ require ( k8s.io/utils v0.0.0-20221128185143-99ec85e7a448 sigs.k8s.io/kustomize/api v0.11.4 sigs.k8s.io/kustomize/kyaml v0.13.6 - sigs.k8s.io/yaml v1.3.0 ) require github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect @@ -264,7 +264,6 @@ require ( github.com/sassoftware/relic v0.0.0-20210427151427-dfb082b79b74 // indirect github.com/secure-systems-lab/go-securesystemslib v0.4.0 // indirect github.com/segmentio/ksuid v1.0.4 // indirect - github.com/sergi/go-diff v1.2.0 // indirect github.com/shibumi/go-pathspec v1.3.0 // indirect github.com/shopspring/decimal v1.2.0 // indirect github.com/sigstore/fulcio v0.6.0 // indirect @@ -363,6 +362,7 @@ require ( sigs.k8s.io/json v0.0.0-20220713155537-f223a00ba0e2 // indirect sigs.k8s.io/release-utils v0.7.3 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect + sigs.k8s.io/yaml v1.3.0 // indirect ) replace github.com/libgit2/git2go/v33 => ./git2go diff --git a/go.sum b/go.sum index 1972b41df8..7f34219c70 100644 --- a/go.sum +++ b/go.sum @@ -1092,8 +1092,8 @@ github.com/kubescape/go-logger v0.0.11 h1:oucpq2S7+DT7O+UclG5IrmHado/tj6+IkYf9cz github.com/kubescape/go-logger v0.0.11/go.mod h1:yGiKBJ2lhq/kxzY/MVYDREL9fLV3RGD6gv+UFjslaew= github.com/kubescape/k8s-interface v0.0.116 h1:Sn76gsMLAArc5kbHZVoRMS6QlM4mOz9Dolpym9BOul8= github.com/kubescape/k8s-interface v0.0.116/go.mod h1:ENpA9SkkS6E3PIT+AaMu/JGkuyE04aUamY+a7WLqsJQ= -github.com/kubescape/opa-utils v0.0.245 h1:7CCVhlIIQF59cPMNHTZRTvFpCx276FkOWCBsJS9jl+k= -github.com/kubescape/opa-utils v0.0.245/go.mod h1:aaAPHjaIJDoAK6RvAcUDXrXkja0ZTy0qSfnoxkE9z34= +github.com/kubescape/opa-utils v0.0.246 h1:WCCtkOD9ar8nSh7dUAGwuBsm+zOcVBbYE1jLQeo6wvo= +github.com/kubescape/opa-utils v0.0.246/go.mod h1:aaAPHjaIJDoAK6RvAcUDXrXkja0ZTy0qSfnoxkE9z34= github.com/kubescape/rbac-utils v0.0.20 h1:1MMxsCsCZ3ntDi8f9ZYYcY+K7bv50bDW5ZvnGnhMhJw= github.com/kubescape/rbac-utils v0.0.20/go.mod h1:t57AhSrjuNGQ+mpZWQM/hBzrCOeKBDHegFoVo4tbikQ= github.com/kubescape/regolibrary v1.0.250 h1:BKoH89Cex+5rsD+vn1ILxULcJ++aA/KEhV5jJ4Wgp/8= diff --git a/httphandler/go.mod b/httphandler/go.mod index 3056016645..5aee0dc13a 100644 --- a/httphandler/go.mod +++ b/httphandler/go.mod @@ -13,7 +13,7 @@ require ( github.com/kubescape/go-logger v0.0.11 github.com/kubescape/k8s-interface v0.0.116 github.com/kubescape/kubescape/v2 v2.0.0-00010101000000-000000000000 - github.com/kubescape/opa-utils v0.0.245 + github.com/kubescape/opa-utils v0.0.246 github.com/stretchr/testify v1.8.1 go.opentelemetry.io/contrib/instrumentation/github.com/gorilla/mux/otelmux v0.38.0 go.opentelemetry.io/otel v1.12.0 diff --git a/httphandler/go.sum b/httphandler/go.sum index c5a2001c1c..818685c94a 100644 --- a/httphandler/go.sum +++ b/httphandler/go.sum @@ -1097,8 +1097,8 @@ github.com/kubescape/go-logger v0.0.11 h1:oucpq2S7+DT7O+UclG5IrmHado/tj6+IkYf9cz github.com/kubescape/go-logger v0.0.11/go.mod h1:yGiKBJ2lhq/kxzY/MVYDREL9fLV3RGD6gv+UFjslaew= github.com/kubescape/k8s-interface v0.0.116 h1:Sn76gsMLAArc5kbHZVoRMS6QlM4mOz9Dolpym9BOul8= github.com/kubescape/k8s-interface v0.0.116/go.mod h1:ENpA9SkkS6E3PIT+AaMu/JGkuyE04aUamY+a7WLqsJQ= -github.com/kubescape/opa-utils v0.0.245 h1:7CCVhlIIQF59cPMNHTZRTvFpCx276FkOWCBsJS9jl+k= -github.com/kubescape/opa-utils v0.0.245/go.mod h1:aaAPHjaIJDoAK6RvAcUDXrXkja0ZTy0qSfnoxkE9z34= +github.com/kubescape/opa-utils v0.0.246 h1:WCCtkOD9ar8nSh7dUAGwuBsm+zOcVBbYE1jLQeo6wvo= +github.com/kubescape/opa-utils v0.0.246/go.mod h1:aaAPHjaIJDoAK6RvAcUDXrXkja0ZTy0qSfnoxkE9z34= github.com/kubescape/rbac-utils v0.0.20 h1:1MMxsCsCZ3ntDi8f9ZYYcY+K7bv50bDW5ZvnGnhMhJw= github.com/kubescape/rbac-utils v0.0.20/go.mod h1:t57AhSrjuNGQ+mpZWQM/hBzrCOeKBDHegFoVo4tbikQ= github.com/kubescape/regolibrary v1.0.250 h1:BKoH89Cex+5rsD+vn1ILxULcJ++aA/KEhV5jJ4Wgp/8=