RiskScore class
The transparent scoring result for a dependency.
- Annotations
-
- @immutable
Constructors
-
RiskScore({required RiskSignals signals, required RiskComponents components, required RiskWeights baseWeights, required RiskWeights adjustedWeights, required double baseScore, required double finalScore, required RiskClassification classification, required double trustFactor, required bool sherpaPolicyApplied, required List<
String> hardRiskTriggers}) -
Creates a scored dependency result.
const
Properties
- adjustedWeights → RiskWeights
-
The trust-adjusted component weights.
final
- baseScore → double
-
The unadjusted weighted score on a
0-100scale.final - baseWeights → RiskWeights
-
The base component weights before trust adjustment.
final
- classification → RiskClassification
-
The final score classification.
final
- components → RiskComponents
-
The normalized risk components.
final
- finalScore → double
-
The trust-adjusted weighted score on a
0-100scale.final -
hardRiskTriggers
→ List<
String> -
The hard-risk triggers that were activated.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- isHighRisk → bool
-
Whether the dependency is classified as high or critical risk.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sherpaPolicyApplied → bool
-
Whether the Sherpa package safety policy changed the classification.
final
- signals → RiskSignals
-
The raw input signals.
final
- trustFactor → double
-
The computed trust factor in the range
[0, 1].final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, Object?> - Serializes the complete score transparency payload.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited