Documentation ¶
Index ¶
- type ControlScoreWeights
- type ScoreUtil
- func (su *ScoreUtil) Calculate(frameworksReports []reporthandling.FrameworkReport) error
- func (su *ScoreUtil) CalculateFrameworkScore(framework *reporthandling.FrameworkReport) error
- func (su *ScoreUtil) CalculatePostureReportV2(report *v2.PostureReport) error
- func (su *ScoreUtil) ControlScore(ctrlReport *reporthandling.ControlReport, frameworkName string) (float32, float32)
- func (su *ScoreUtil) ControlV2Score(ctrl reportsummary.IControlSummary, frameworkName string) (ctrlScore float32, unormalizedScore float32, wcsScore float32)
- func (su *ScoreUtil) ControlsSummariesScore(ctrls *reportsummary.ControlSummaries, frameworkName string) (totalUnormalizedScore float32, totalWcsScore float32)
- func (su *ScoreUtil) GetScore(v map[string]interface{}) float32
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ControlScoreWeights ¶
type ScoreUtil ¶
type ScoreUtil struct { // ResourceTypeScores map[string]float32 // FrameworksScore map[string]map[string]ControlScoreWeights K8SApoObj *k8sinterface.KubernetesApi // contains filtered or unexported fields }
func (*ScoreUtil) Calculate ¶
func (su *ScoreUtil) Calculate(frameworksReports []reporthandling.FrameworkReport) error
func (*ScoreUtil) CalculateFrameworkScore ¶
func (su *ScoreUtil) CalculateFrameworkScore(framework *reporthandling.FrameworkReport) error
func (*ScoreUtil) CalculatePostureReportV2 ¶
func (su *ScoreUtil) CalculatePostureReportV2(report *v2.PostureReport) error
func (*ScoreUtil) ControlScore ¶
func (su *ScoreUtil) ControlScore(ctrlReport *reporthandling.ControlReport, frameworkName string) (float32, float32)
ControlScore: @input: ctrlReport - reporthandling.ControlReport object, must contain down the line the Input resources and the output resources frameworkName - calculate this control according to a given framework weights
ctrl.score = baseScore * SUM_resource (resourceWeight*min(#replicas*replicaweight,1)(nodes if daemonset)
returns wcsscore,ctrlscore(unnormalized)
func (*ScoreUtil) ControlV2Score ¶
func (su *ScoreUtil) ControlV2Score(ctrl reportsummary.IControlSummary, frameworkName string) (ctrlScore float32, unormalizedScore float32, wcsScore float32)
*/
func (*ScoreUtil) ControlsSummariesScore ¶
func (su *ScoreUtil) ControlsSummariesScore(ctrls *reportsummary.ControlSummaries, frameworkName string) (totalUnormalizedScore float32, totalWcsScore float32)
Click to show internal directories.
Click to hide internal directories.