Skip to content

Commit

Permalink
Merge pull request kubescape#1209 from kubescape/new-threshold-flag
Browse files Browse the repository at this point in the history
Add compliance score to controls
  • Loading branch information
David Wertenteil authored May 1, 2023
2 parents 5ae421d + f322585 commit dce1d76
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion core/pkg/resultshandling/printer/v2/controltable.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
2 changes: 1 addition & 1 deletion httphandler/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions httphandler/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down

0 comments on commit dce1d76

Please sign in to comment.