Table of Contents

Class ThreatAssessment

Namespace
AsiBackbone.Core.ThreatModeling
Assembly
AsiBackbone.Core.dll

Represents a structured threat-aware assessment contributed during policy evaluation.

public sealed class ThreatAssessment
Inheritance
ThreatAssessment
Inherited Members

Constructors

ThreatAssessment(ThreatSeverity, string, string, string, GovernanceDecisionOutcome, double, IReadOnlyDictionary<string, string>?)

Initializes a new instance of the ThreatAssessment class.

public ThreatAssessment(ThreatSeverity severity, string category, string reasonCode, string description, GovernanceDecisionOutcome recommendedOutcome, double confidence = 1, IReadOnlyDictionary<string, string>? metadata = null)

Parameters

severity ThreatSeverity

The severity reported by the contributor.

category string

The threat category reported by the contributor.

reasonCode string

The machine-readable reason code.

description string

The human-readable threat description.

recommendedOutcome GovernanceDecisionOutcome

The governance outcome recommended by the contributor.

confidence double

The contributor confidence from 0.0 to 1.0.

metadata IReadOnlyDictionary<string, string>

Optional contributor-supplied metadata retained on generated operation reasons. Keys beginning with threat. are reserved for framework-generated provenance.

Exceptions

ArgumentException

Thrown when category, reasonCode, or description is null, empty, or whitespace, or when metadata contains a key in the reserved threat. namespace.

ArgumentOutOfRangeException

Thrown when severity or recommendedOutcome is undefined, or when confidence is outside the supported range.

Fields

MaximumConfidence

Defines the maximum confidence value accepted by a threat assessment.

public const double MaximumConfidence = 1

Field Value

double

MinimumConfidence

Defines the minimum confidence value accepted by a threat assessment.

public const double MinimumConfidence = 0

Field Value

double

Properties

Category

Gets the threat category reported by the contributor.

public string Category { get; }

Property Value

string

Confidence

Gets the contributor confidence from 0.0 to 1.0.

public double Confidence { get; }

Property Value

double

Description

Gets the human-readable threat description.

public string Description { get; }

Property Value

string

IsActionable

Gets a value indicating whether the assessment should influence the composed decision.

public bool IsActionable { get; }

Property Value

bool

Metadata

Gets optional contributor-supplied metadata retained on generated operation reasons.

public IReadOnlyDictionary<string, string> Metadata { get; }

Property Value

IReadOnlyDictionary<string, string>

ReasonCode

Gets the machine-readable reason code.

public string ReasonCode { get; }

Property Value

string

RecommendedOutcome

Gets the governance outcome recommended by the contributor.

public GovernanceDecisionOutcome RecommendedOutcome { get; }

Property Value

GovernanceDecisionOutcome

Severity

Gets the severity reported by the contributor.

public ThreatSeverity Severity { get; }

Property Value

ThreatSeverity

Methods

Create(ThreatSeverity, string, string, string, GovernanceDecisionOutcome, double, IReadOnlyDictionary<string, string>?)

Creates a threat assessment.

public static ThreatAssessment Create(ThreatSeverity severity, string category, string reasonCode, string description, GovernanceDecisionOutcome recommendedOutcome, double confidence = 1, IReadOnlyDictionary<string, string>? metadata = null)

Parameters

severity ThreatSeverity

The severity reported by the contributor.

category string

The threat category reported by the contributor.

reasonCode string

The machine-readable reason code.

description string

The human-readable threat description.

recommendedOutcome GovernanceDecisionOutcome

The governance outcome recommended by the contributor.

confidence double

The contributor confidence from 0.0 to 1.0.

metadata IReadOnlyDictionary<string, string>

Optional contributor-supplied metadata retained on generated operation reasons. Keys beginning with threat. are reserved for framework-generated provenance.

Returns

ThreatAssessment

A threat assessment.

Exceptions

ArgumentException

Thrown when category, reasonCode, or description is null, empty, or whitespace, or when metadata contains a key in the reserved threat. namespace.

ArgumentOutOfRangeException

Thrown when severity or recommendedOutcome is undefined, or when confidence is outside the supported range.

NoThreat()

Creates a no-threat assessment.

public static ThreatAssessment NoThreat()

Returns

ThreatAssessment

A no-threat assessment that does not influence decision composition.

ToOperationReason(string?, GovernanceDecisionOutcome?)

Converts the assessment into an operation reason with threat metadata.

public OperationReason ToOperationReason(string? contributorName = null, GovernanceDecisionOutcome? effectiveOutcome = null)

Parameters

contributorName string

Optional contributor name to include in metadata.

effectiveOutcome GovernanceDecisionOutcome?

Optional effective outcome selected by the evaluator after safety promotion.

Returns

OperationReason

An operation reason representing the assessment.