Documentation
¶
Overview ¶
Package grade runs once after the engine barrier: it computes the A to F grade per target and overall, with the reasons for each grade.
Index ¶
Constants ¶
const ( CodeLiveOverThreshold = "live_over_threshold" CodeLivePublic = "live_public" CodeLiveKey = "live_key" CodeUnverifiedHighConfidence = "unverified_high_confidence" CodeOtherFinding = "other_finding" CodeClean = "clean" )
Reason codes. Each reason string starts with its code and ": ".
const Default = "default"
Default is the name of the AD-15 grader. Per target, first match wins: F for a live key when the summed live dollars at risk per day reach the threshold or the target is public, D for any live key, C for an unverified high-confidence key, B for any other finding and A for none.
const DefaultFThresholdUSDPerDay = 500
DefaultFThresholdUSDPerDay is the live dollars at risk per day at which a target gets grade F when Options.FThresholdUSDPerDay is 0 or unset.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Grader ¶
type Grader interface {
Grade(findings []model.Finding, targets []model.Target) ([]model.TargetGrade, model.Grade, []string)
}
Grader is the grade stage interface. Grade returns the grade of each target, in the order given, and the overall grade with its reasons. Suppressed findings are never graded. Every reason has the form "code: ASCII sentence".