score

package
v1.0.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 28, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadWeights

func LoadWeights(policyPath, repoRoot string) (scoremodel.Weights, error)

Types

type Breakdown

type Breakdown struct {
	PolicyPassRate       float64 `json:"policy_pass_rate"`
	ApprovalCoverage     float64 `json:"approval_coverage"`
	SeverityDistribution float64 `json:"severity_distribution"`
	ProfileCompliance    float64 `json:"profile_compliance"`
	DriftRate            float64 `json:"drift_rate"`
}

type Input

type Input struct {
	Findings        []model.Finding
	Identities      []manifest.IdentityRecord
	ProfileResult   profileeval.Result
	TransitionCount int
	Weights         scoremodel.Weights
	Previous        *Result
}

type Result

type Result struct {
	Score             float64            `json:"score"`
	Grade             string             `json:"grade"`
	Breakdown         Breakdown          `json:"breakdown"`
	WeightedBreakdown WeightedBreakdown  `json:"weighted_breakdown"`
	Weights           scoremodel.Weights `json:"weights"`
	TrendDelta        float64            `json:"trend_delta"`
}

func Compute

func Compute(in Input) Result

type WeightedBreakdown

type WeightedBreakdown struct {
	PolicyPassRate       float64 `json:"policy_pass_rate"`
	ApprovalCoverage     float64 `json:"approval_coverage"`
	SeverityDistribution float64 `json:"severity_distribution"`
	ProfileCompliance    float64 `json:"profile_compliance"`
	DriftRate            float64 `json:"drift_rate"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL