priority

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package priority computes composite risk scores combining capability, reachability, CVE, and taint analysis signals.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompositeScore

type CompositeScore struct {
	CapabilityScore float64 // Base capability score
	ReachabilityMod float64 // 1.0=unknown, 0.5=unreachable, 1.3=reachable
	CVEMod          float64 // 1.0 + 0.3 per HIGH CVE, capped at 2.0
	TaintMod        float64 // 1.0 + 0.25 per HIGH + 0.15 per MEDIUM taint
	Composite       float64 // Product of all modifiers, capped at 100
	Level           string  // Derived from Composite using standard thresholds (LOW, MEDIUM, HIGH)
}

CompositeScore combines multiple risk signals into a single prioritization score.

func Compute

func Compute(
	caps capability.CapabilitySet,
	reachable *bool,
	cveCount int,
	taintFindings []taint.TaintFinding,
) CompositeScore

Compute calculates the composite score from capability set, reachability, CVE count, and taint findings.

Parameters:

  • caps: the capability set with its base score
  • reachable: nil = unknown (mod 1.0), false = unreachable (mod 0.5), true = reachable (mod 1.3)
  • cveCount: number of CVEs affecting the package/module
  • taintFindings: taint findings for this package

Returns:

CompositeScore with all modifiers and final composite value

Jump to

Keyboard shortcuts

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