Security family: assets, threats, controls, vulnerabilities and findings

Overview

Base Control: SecurityControl : MaterialControl
Namespace: Beep.Skia.Security

The SecurityControl is the root control for this diagram family. It inherits MaterialControl and provides shared port management, styling, and template methods for all nodes in the family.

This family contains 9 node types.

Node Types

Node ClassShapeDescription
AssetNodeDiamond/serverValuable asset (data, system, service, personnel).
ThreatNodeLightning boltThreat actor/event with type, likelihood, and impact.
ControlNodeShieldSecurity control/safeguard (preventive, detective, corrective).
VulnerabilityNodeCrack/broken shieldVulnerability with CVE, CVSS score, and remediation.
PolicyNodeDocumentSecurity policy/standard with compliance mapping.
RiskAssessmentNodeRisk matrixRisk assessment: inherent and residual risk levels.
IncidentNodeAlert triangleSecurity incident with timeline and response status.
FindingNodeChecklist/documentAudit/assessment finding with recommendation.
MitigationLinkDashed lineMitigation relationship: control mitigates threat/vulnerability.

AssetNode

Valuable asset (data, system, service, personnel).

ShapeDiamond/server
Input Ports1+
Output Ports2+

ThreatNode

Threat actor/event with type, likelihood, and impact.

ShapeLightning bolt
Input Ports2+
Output Ports2+

ControlNode

Security control/safeguard (preventive, detective, corrective).

ShapeShield
Input Ports1+
Output Ports1+

VulnerabilityNode

Vulnerability with CVE, CVSS score, and remediation.

ShapeCrack/broken shield
Input Ports1
Output Ports1

PolicyNode

Security policy/standard with compliance mapping.

ShapeDocument
Input Ports1
Output Ports1

RiskAssessmentNode

Risk assessment: inherent and residual risk levels.

ShapeRisk matrix
Input Ports2+
Output Ports1+

IncidentNode

Security incident with timeline and response status.

ShapeAlert triangle
Input Ports1
Output Ports1

FindingNode

Audit/assessment finding with recommendation.

ShapeChecklist/document
Input Ports1
Output Ports1

Connection Points

Every node in this family exposes connection points (ports) for linking to other nodes. Port positions are computed lazily by LayoutPorts(), which runs when MarkPortsDirty() flags the layout as stale after a move or resize.

Node ClassInput PortsOutput PortsExtra
AssetNode1+2+—
ThreatNode2+2+—
ControlNode1+1+—
VulnerabilityNode11—
PolicyNode11—
RiskAssessmentNode2+1+—
IncidentNode11—
FindingNode11—
MitigationLink00—

Connection Conventions

When building diagrams with this family, follow these conventions:

  • Assets connect to threats they face
  • Controls mitigate threats and reduce vulnerabilities
  • Vulnerabilities link to assets they affect
  • Mitigation links use dashed lines to distinguish from data flow

Usage Example

Complete example showing creation, node placement, and connection:

C# Example

var sec = new SecurityControl
{
    X = 50, Y = 50,
    Width = 700, Height = 500
};
drawingManager.AddComponent(sec);

var asset = new AssetNode
{
    X = 100, Y = 150,
    Text = "Customer Database",
    AssetType = "Data"
};
var threat = new ThreatNode
{
    X = 350, Y = 80,
    ThreatType = "SQL Injection",
    Severity = "High"
};
var control = new ControlNode
{
    X = 350, Y = 220,
    ControlType = "Input Validation",
    ControlCategory = "Preventive"
};
var vuln = new VulnerabilityNode
{
    X = 600, Y = 150,
    CVE = "CVE-2023-XXXXX"
};

drawingManager.AddComponent(asset);
drawingManager.AddComponent(threat);
drawingManager.AddComponent(control);
drawingManager.AddComponent(vuln);

drawingManager.ConnectComponents(asset.OutPoints[0], threat.InPoints[0]);
drawingManager.ConnectComponents(threat.OutPoints[1], vuln.InPoints[0]);
drawingManager.ConnectComponents(control.OutPoints[0], threat.InPoints[1]);

STRIDE Analysis

StrideAnalyzer.Analyze(components) inspects the diagram's asset nodes and produces a threat list. Each threat records its STRIDE category, the asset it affects, a suggested mitigation, a severity, matching MITRE ATT&CK techniques and a DREAD score:

MemberTypeDescription
Analyze(components)voidRuns the analysis and fills Threats.
ThreatsList<ThreatResult>One entry per discovered threat.
ThreatResult.CategoryStrideCategorySpoofing, Tampering, Repudiation, Information disclosure, Denial of service or Elevation of privilege.
ThreatResult.AssetName / Threat / MitigationstringWhat is at risk, what the threat is and how to mitigate it.
ThreatResult.SeveritystringLow, Medium or High.
ThreatResult.TechniquesList<MitreTechnique>Mapped ATT&CK techniques (id, name, tactic).
ThreatResult.DreadDreadScoreRisk score for the threat.
var analyzer = new StrideAnalyzer();
analyzer.Analyze(drawingManager.GetComponents());

foreach (var threat in analyzer.Threats)
    Console.WriteLine($"[{threat.Category}] {threat.AssetName}: {threat.Threat} " +
                      $"(DREAD {threat.Dread.Average:0.0}, {threat.Dread.RiskLevel})");

DREAD Scoring

DreadScore rates five dimensions and derives an average and a risk level:

MemberTypeDescription
Damage, Reproducibility, Exploitability, AffectedUsers, DiscoverabilityDreadRatingEach rated Low, Medium or High (default Medium).
AveragedoubleMean of the five ratings.
RiskLevelstringBand derived from the average.

DreadCalculator builds scores from a ThreatNode, from severity/likelihood pairs, or from their string names, so threat tables can be scored in bulk.

MITRE ATT&CK Mapping

MitreAttackLibrary ships a technique catalog and maps STRIDE categories onto it:

MemberDescription
TechniquesAll catalogued techniques (MitreTechnique: Id, Name, Tactic).
TacticsDistinct tactic names, for grouping in reports.
ForStrideCategory(category)Techniques relevant to a STRIDE category.
Find(id)Lookup by technique id (for example T1190).