diff --git a/Samples/SampleExtensions/ExtensionLibrary.cs b/Samples/SampleExtensions/ExtensionLibrary.cs
index da315bc4..374e9255 100644
--- a/Samples/SampleExtensions/ExtensionLibrary.cs
+++ b/Samples/SampleExtensions/ExtensionLibrary.cs
@@ -1,3 +1,3 @@
using ThreatsManager.Interfaces;
-[assembly: ExtensionsContainer("1.3.1")]
\ No newline at end of file
+[assembly: ExtensionsContainer("1.3.3")]
\ No newline at end of file
diff --git a/Samples/SampleExtensions/SampleExtensions.csproj b/Samples/SampleExtensions/SampleExtensions.csproj
index e3d9dd23..079c71d9 100644
--- a/Samples/SampleExtensions/SampleExtensions.csproj
+++ b/Samples/SampleExtensions/SampleExtensions.csproj
@@ -72,16 +72,16 @@
- ..\packages\ThreatsManager.Utilities.1.3.1\lib\net472\ThreatsManager.Icons.dll
+ ..\packages\ThreatsManager.Utilities.1.3.3\lib\net472\ThreatsManager.Icons.dll
-
- ..\packages\ThreatsManager.Interfaces.1.3.1\lib\net472\ThreatsManager.Interfaces.dll
+
+ ..\packages\ThreatsManager.Interfaces.1.3.3\lib\net472\ThreatsManager.Interfaces.dll
-
- ..\packages\ThreatsManager.Utilities.1.3.1\lib\net472\ThreatsManager.Packaging.dll
+
+ ..\packages\ThreatsManager.Utilities.1.3.3\lib\net472\ThreatsManager.Packaging.dll
-
- ..\packages\ThreatsManager.Utilities.1.3.1\lib\net472\ThreatsManager.Utilities.dll
+
+ ..\packages\ThreatsManager.Utilities.1.3.3\lib\net472\ThreatsManager.Utilities.dll
diff --git a/Samples/SampleExtensions/packages.config b/Samples/SampleExtensions/packages.config
index 203ba1fc..72b88b71 100644
--- a/Samples/SampleExtensions/packages.config
+++ b/Samples/SampleExtensions/packages.config
@@ -8,6 +8,6 @@
-
-
+
+
\ No newline at end of file
diff --git a/Samples/SampleWinFormExtensions/ExtensionLibrary.cs b/Samples/SampleWinFormExtensions/ExtensionLibrary.cs
index da315bc4..374e9255 100644
--- a/Samples/SampleWinFormExtensions/ExtensionLibrary.cs
+++ b/Samples/SampleWinFormExtensions/ExtensionLibrary.cs
@@ -1,3 +1,3 @@
using ThreatsManager.Interfaces;
-[assembly: ExtensionsContainer("1.3.1")]
\ No newline at end of file
+[assembly: ExtensionsContainer("1.3.3")]
\ No newline at end of file
diff --git a/Samples/SampleWinFormExtensions/SampleWinFormExtensions.csproj b/Samples/SampleWinFormExtensions/SampleWinFormExtensions.csproj
index 5625ccd1..38f1a350 100644
--- a/Samples/SampleWinFormExtensions/SampleWinFormExtensions.csproj
+++ b/Samples/SampleWinFormExtensions/SampleWinFormExtensions.csproj
@@ -42,7 +42,7 @@
..\packages\Fizzler.1.2.0\lib\netstandard2.0\Fizzler.dll
- ..\packages\ThreatsManager.Utilities.WinForms.1.3.1\lib\net472\Keyoti.RapidSpell.NET4.dll
+ ..\packages\ThreatsManager.Utilities.WinForms.1.3.3\lib\net472\Keyoti.RapidSpell.NET4.dll
@@ -87,19 +87,19 @@
- ..\packages\ThreatsManager.Utilities.1.3.1\lib\net472\ThreatsManager.Icons.dll
+ ..\packages\ThreatsManager.Utilities.1.3.3\lib\net472\ThreatsManager.Icons.dll
-
- ..\packages\ThreatsManager.Interfaces.1.3.1\lib\net472\ThreatsManager.Interfaces.dll
+
+ ..\packages\ThreatsManager.Interfaces.1.3.3\lib\net472\ThreatsManager.Interfaces.dll
-
- ..\packages\ThreatsManager.Utilities.1.3.1\lib\net472\ThreatsManager.Packaging.dll
+
+ ..\packages\ThreatsManager.Utilities.1.3.3\lib\net472\ThreatsManager.Packaging.dll
-
- ..\packages\ThreatsManager.Utilities.1.3.1\lib\net472\ThreatsManager.Utilities.dll
+
+ ..\packages\ThreatsManager.Utilities.1.3.3\lib\net472\ThreatsManager.Utilities.dll
-
- ..\packages\ThreatsManager.Utilities.WinForms.1.3.1\lib\net472\ThreatsManager.Utilities.WinForms.dll
+
+ ..\packages\ThreatsManager.Utilities.WinForms.1.3.3\lib\net472\ThreatsManager.Utilities.WinForms.dll
diff --git a/Samples/SampleWinFormExtensions/packages.config b/Samples/SampleWinFormExtensions/packages.config
index 467be7f9..ea50483b 100644
--- a/Samples/SampleWinFormExtensions/packages.config
+++ b/Samples/SampleWinFormExtensions/packages.config
@@ -10,7 +10,7 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Samples/SimpleThreatModelAnalyzer/ExtensionLibrary.cs b/Samples/SimpleThreatModelAnalyzer/ExtensionLibrary.cs
index da315bc4..374e9255 100644
--- a/Samples/SimpleThreatModelAnalyzer/ExtensionLibrary.cs
+++ b/Samples/SimpleThreatModelAnalyzer/ExtensionLibrary.cs
@@ -1,3 +1,3 @@
using ThreatsManager.Interfaces;
-[assembly: ExtensionsContainer("1.3.1")]
\ No newline at end of file
+[assembly: ExtensionsContainer("1.3.3")]
\ No newline at end of file
diff --git a/Samples/SimpleThreatModelAnalyzer/SimpleThreatModelAnalyzer.csproj b/Samples/SimpleThreatModelAnalyzer/SimpleThreatModelAnalyzer.csproj
index aa3802f6..11f3562b 100644
--- a/Samples/SimpleThreatModelAnalyzer/SimpleThreatModelAnalyzer.csproj
+++ b/Samples/SimpleThreatModelAnalyzer/SimpleThreatModelAnalyzer.csproj
@@ -89,20 +89,20 @@
-
- ..\packages\ThreatsManager.Engine.1.3.1\lib\net472\ThreatsManager.Engine.dll
+
+ ..\packages\ThreatsManager.Engine.1.3.3\lib\net472\ThreatsManager.Engine.dll
- ..\packages\ThreatsManager.Utilities.1.3.1\lib\net472\ThreatsManager.Icons.dll
+ ..\packages\ThreatsManager.Utilities.1.3.3\lib\net472\ThreatsManager.Icons.dll
-
- ..\packages\ThreatsManager.Interfaces.1.3.1\lib\net472\ThreatsManager.Interfaces.dll
+
+ ..\packages\ThreatsManager.Interfaces.1.3.3\lib\net472\ThreatsManager.Interfaces.dll
-
- ..\packages\ThreatsManager.Utilities.1.3.1\lib\net472\ThreatsManager.Packaging.dll
+
+ ..\packages\ThreatsManager.Utilities.1.3.3\lib\net472\ThreatsManager.Packaging.dll
-
- ..\packages\ThreatsManager.Utilities.1.3.1\lib\net472\ThreatsManager.Utilities.dll
+
+ ..\packages\ThreatsManager.Utilities.1.3.3\lib\net472\ThreatsManager.Utilities.dll
diff --git a/Samples/SimpleThreatModelAnalyzer/packages.config b/Samples/SimpleThreatModelAnalyzer/packages.config
index c5cd9db2..7cc20ed7 100644
--- a/Samples/SimpleThreatModelAnalyzer/packages.config
+++ b/Samples/SimpleThreatModelAnalyzer/packages.config
@@ -13,7 +13,7 @@
-
-
-
+
+
+
\ No newline at end of file
diff --git a/Sources/Extensions/Extensions.sln b/Sources/Extensions/Extensions.sln
new file mode 100644
index 00000000..ceee3439
--- /dev/null
+++ b/Sources/Extensions/Extensions.sln
@@ -0,0 +1,67 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Version 16
+VisualStudioVersion = 16.0.30413.136
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.AutoThreatGeneration", "ThreatsManager.AutoThreatGeneration\ThreatsManager.AutoThreatGeneration.csproj", "{C96D95AE-1081-4BD8-9004-0D34574FDC9B}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.Interfaces", "..\ThreatsManager.Interfaces\ThreatsManager.Interfaces.csproj", "{F6685B01-5E85-4DFE-AD30-DC7226326A88}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.Utilities", "..\ThreatsManager.Utilities\ThreatsManager.Utilities.csproj", "{C598DBFD-D401-4B5D-BD6A-7D13BB1A964F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.Extensions", "ThreatsManager.Extensions\ThreatsManager.Extensions.csproj", "{3CABCB35-25FF-440A-9226-C9E881C8636F}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.MsTmt", "ThreatsManager.MsTmt\ThreatsManager.MsTmt.csproj", "{8ACF0B4D-F9F9-4AA5-A5E0-72A700C890FC}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.PackageManagers", "ThreatsManager.PackageManagers\ThreatsManager.PackageManagers.csproj", "{8D599C3D-E2E2-49CD-A597-A0B0247CDBA4}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.DevOps", "ThreatsManager.DevOps\ThreatsManager.DevOps.csproj", "{E545F770-9A4B-41BC-91D6-4456AF295DFE}"
+EndProject
+Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.Quality", "ThreatsManager.Quality\ThreatsManager.Quality.csproj", "{26BBE943-E47E-49AC-9C27-CA88166F46FE}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Release|Any CPU = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {C96D95AE-1081-4BD8-9004-0D34574FDC9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C96D95AE-1081-4BD8-9004-0D34574FDC9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C96D95AE-1081-4BD8-9004-0D34574FDC9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C96D95AE-1081-4BD8-9004-0D34574FDC9B}.Release|Any CPU.Build.0 = Release|Any CPU
+ {F6685B01-5E85-4DFE-AD30-DC7226326A88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {F6685B01-5E85-4DFE-AD30-DC7226326A88}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {F6685B01-5E85-4DFE-AD30-DC7226326A88}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {F6685B01-5E85-4DFE-AD30-DC7226326A88}.Release|Any CPU.Build.0 = Release|Any CPU
+ {C598DBFD-D401-4B5D-BD6A-7D13BB1A964F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {C598DBFD-D401-4B5D-BD6A-7D13BB1A964F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {C598DBFD-D401-4B5D-BD6A-7D13BB1A964F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {C598DBFD-D401-4B5D-BD6A-7D13BB1A964F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {3CABCB35-25FF-440A-9226-C9E881C8636F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {3CABCB35-25FF-440A-9226-C9E881C8636F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {3CABCB35-25FF-440A-9226-C9E881C8636F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {3CABCB35-25FF-440A-9226-C9E881C8636F}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8ACF0B4D-F9F9-4AA5-A5E0-72A700C890FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8ACF0B4D-F9F9-4AA5-A5E0-72A700C890FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8ACF0B4D-F9F9-4AA5-A5E0-72A700C890FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8ACF0B4D-F9F9-4AA5-A5E0-72A700C890FC}.Release|Any CPU.Build.0 = Release|Any CPU
+ {8D599C3D-E2E2-49CD-A597-A0B0247CDBA4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {8D599C3D-E2E2-49CD-A597-A0B0247CDBA4}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {8D599C3D-E2E2-49CD-A597-A0B0247CDBA4}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {8D599C3D-E2E2-49CD-A597-A0B0247CDBA4}.Release|Any CPU.Build.0 = Release|Any CPU
+ {E545F770-9A4B-41BC-91D6-4456AF295DFE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {E545F770-9A4B-41BC-91D6-4456AF295DFE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {E545F770-9A4B-41BC-91D6-4456AF295DFE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {E545F770-9A4B-41BC-91D6-4456AF295DFE}.Release|Any CPU.Build.0 = Release|Any CPU
+ {26BBE943-E47E-49AC-9C27-CA88166F46FE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {26BBE943-E47E-49AC-9C27-CA88166F46FE}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {26BBE943-E47E-49AC-9C27-CA88166F46FE}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {26BBE943-E47E-49AC-9C27-CA88166F46FE}.Release|Any CPU.Build.0 = Release|Any CPU
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ SolutionGuid = {87B3BA26-85AC-46C6-84AF-183918DE3412}
+ EndGlobalSection
+EndGlobal
diff --git a/Sources/Extensions/ThreatsManager.AutoThreatGeneration/Actions/ActionsHelper.cs b/Sources/Extensions/ThreatsManager.AutoThreatGeneration/Actions/ActionsHelper.cs
new file mode 100644
index 00000000..73954f6f
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.AutoThreatGeneration/Actions/ActionsHelper.cs
@@ -0,0 +1,204 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.AutoThreatGeneration.Engine;
+using ThreatsManager.AutoThreatGeneration.Schemas;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Entities;
+using ThreatsManager.Interfaces.ObjectModel.Properties;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+
+namespace ThreatsManager.AutoThreatGeneration.Actions
+{
+ public static class ActionsHelper
+ {
+ public static bool GenerateThreatEvents(this IThreatModel model)
+ {
+ bool result = false;
+
+ var schemaManager = new AutoThreatGenPropertySchemaManager(model);
+ var propertyType = schemaManager.GetPropertyType();
+ if (propertyType is IJsonSerializableObjectPropertyType jsonPropertyType)
+ {
+ var threatTypes = model.ThreatTypes?.Where(x => x.HasProperty(jsonPropertyType)).ToArray();
+ if (threatTypes?.Any() ?? false)
+ {
+ ApplyThreatTypes(model, threatTypes, jsonPropertyType);
+
+ var entities = model.Entities?.ToArray();
+ if (entities?.Any() ?? false)
+ {
+ foreach (var entity in entities)
+ {
+ ApplyThreatTypes(entity, threatTypes, jsonPropertyType);
+ }
+ }
+ var dataFlows = model.DataFlows?.ToArray();
+ if (dataFlows?.Any() ?? false)
+ {
+ foreach (var dataFlow in dataFlows)
+ {
+ ApplyThreatTypes(dataFlow, threatTypes, jsonPropertyType);
+ }
+ }
+
+ result = true;
+ }
+ }
+
+ return result;
+ }
+
+ public static bool GenerateThreatEvents(this IEntity entity)
+ {
+ bool result = false;
+
+ if (entity.Model is IThreatModel model)
+ {
+ var schemaManager = new AutoThreatGenPropertySchemaManager(model);
+ var propertyType = schemaManager.GetPropertyType();
+ if (propertyType is IJsonSerializableObjectPropertyType jsonPropertyType)
+ {
+ var threatTypes = model.ThreatTypes?.Where(x => x.HasProperty(jsonPropertyType)).ToArray();
+ if (threatTypes?.Any() ?? false)
+ {
+ ApplyThreatTypes(entity, threatTypes, jsonPropertyType);
+
+ result = true;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public static bool GenerateThreatEvents(this IDataFlow flow)
+ {
+ bool result = false;
+
+ if (flow.Model is IThreatModel model)
+ {
+ var schemaManager = new AutoThreatGenPropertySchemaManager(model);
+ var propertyType = schemaManager.GetPropertyType();
+ if (propertyType is IJsonSerializableObjectPropertyType jsonPropertyType)
+ {
+ var threatTypes = model.ThreatTypes?.Where(x => x.HasProperty(jsonPropertyType)).ToArray();
+ if (threatTypes?.Any() ?? false)
+ {
+ ApplyThreatTypes(flow, threatTypes, jsonPropertyType);
+
+ result = true;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private static bool ApplyThreatTypes([NotNull] IIdentity identity,
+ [NotNull] IEnumerable threatTypes,
+ [NotNull] IJsonSerializableObjectPropertyType propertyType)
+ {
+ bool result = false;
+
+ foreach (var threatType in threatTypes)
+ {
+ result |= ApplyThreatType(identity, threatType, propertyType);
+ }
+
+ return result;
+ }
+
+ private static bool ApplyThreatType([NotNull] IIdentity identity,
+ [NotNull] IThreatType threatType, [NotNull] IJsonSerializableObjectPropertyType propertyType)
+ {
+ bool result = false;
+
+ var property = threatType.GetProperty(propertyType);
+ if (property is IPropertyJsonSerializableObject jsonProperty &&
+ jsonProperty.Value is SelectionRule rule && rule.Evaluate(identity) &&
+ identity is IThreatEventsContainer container)
+ {
+ var threatEvent = container.AddThreatEvent(threatType);
+ if (threatEvent == null)
+ {
+ threatEvent = container.ThreatEvents.FirstOrDefault(x => x.ThreatTypeId == threatType.Id);
+ }
+ else
+ {
+ result = true;
+ }
+
+ if (threatEvent != null)
+ {
+ result |= threatEvent.ApplyMitigations(propertyType);
+ }
+ }
+
+ return result;
+ }
+
+ public static bool ApplyMitigations(this IThreatEvent threatEvent,
+ IJsonSerializableObjectPropertyType propertyType = null)
+ {
+ bool result = false;
+
+ if (threatEvent.ThreatType is IThreatType threatType && threatEvent.Model is IThreatModel model &&
+ threatEvent.Parent is IIdentity identity)
+ {
+ if (propertyType == null)
+ {
+ var schemaManager = new AutoThreatGenPropertySchemaManager(model);
+ propertyType = schemaManager.GetPropertyType() as IJsonSerializableObjectPropertyType;
+ }
+
+ if (propertyType != null)
+ {
+ var mitigations = threatType.Mitigations?.ToArray();
+ if (mitigations?.Any() ?? false)
+ {
+ ISeverity maximumSeverity = null;
+ var generated = false;
+
+ foreach (var mitigation in mitigations)
+ {
+ var mProperty = mitigation.GetProperty(propertyType);
+ if (mProperty is IPropertyJsonSerializableObject jsonMProperty &&
+ jsonMProperty.Value is MitigationSelectionRule mRule && mRule.Evaluate(identity))
+ {
+ var strength = mitigation.Strength;
+ if (mRule.StrengthId.HasValue &&
+ model.GetStrength(mRule.StrengthId.Value) is IStrength strengthOverride)
+ strength = strengthOverride;
+
+ if (mRule.Status.HasValue)
+ generated = (threatEvent.AddMitigation(mitigation.Mitigation, strength,
+ mRule.Status.Value) !=
+ null);
+ else
+ generated = (threatEvent.AddMitigation(mitigation.Mitigation, strength) !=
+ null);
+ result |= generated;
+
+ if (generated && mRule.SeverityId.HasValue &&
+ model.GetSeverity(mRule.SeverityId.Value) is ISeverity severity &&
+ (maximumSeverity == null || maximumSeverity.Id > severity.Id))
+ {
+ maximumSeverity = severity;
+ }
+ }
+ }
+
+ if (maximumSeverity != null && maximumSeverity.Id < threatEvent.SeverityId)
+ {
+ threatEvent.Severity = maximumSeverity;
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.AutoThreatGeneration/Actions/ApplyAutoGenRulesToItem.cs b/Sources/Extensions/ThreatsManager.AutoThreatGeneration/Actions/ApplyAutoGenRulesToItem.cs
new file mode 100644
index 00000000..dc69cd40
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.AutoThreatGeneration/Actions/ApplyAutoGenRulesToItem.cs
@@ -0,0 +1,66 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Entities;
+using Shortcut = ThreatsManager.Interfaces.Extensions.Shortcut;
+
+namespace ThreatsManager.AutoThreatGeneration.Actions
+{
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "FC9151DF-D604-4B88-A529-6418495FA5C8")]
+ [ExportMetadata("Label", "Apply Auto Gen Rules to Item Context Aware Action")]
+ [ExportMetadata("Priority", 35)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class ApplyAutoGenRulesToItem : IIdentityContextAwareAction, IDesktopAlertAwareExtension
+ {
+ public Scope Scope => Scope.Entity | Scope.DataFlow;
+ public string Label => "Apply Auto Gen Rules";
+ public string Group => "ItemActions";
+ public Bitmap Icon => null;
+ public Bitmap SmallIcon => null;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action ShowMessage;
+ public event Action ShowWarning;
+
+ public bool Execute(object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ result = Execute(identity);
+
+ return result;
+ }
+
+ public bool Execute(IIdentity identity)
+ {
+ if (identity is IEntity entity)
+ {
+ if (entity.GenerateThreatEvents())
+ ShowMessage?.Invoke("Threat Events generated successfully.");
+ else
+ {
+ ShowWarning?.Invoke("No Threat Event or Mitigation has been generated.");
+ }
+
+ }
+ else if (identity is IDataFlow flow)
+ {
+ if (flow.GenerateThreatEvents())
+ ShowMessage?.Invoke("Threat Events generated successfully.");
+ else
+ {
+ ShowWarning?.Invoke("No Threat Event or Mitigation has been generated.");
+ }
+ }
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.AutoThreatGeneration/Actions/ApplyMitigationAssociationRules.cs b/Sources/Extensions/ThreatsManager.AutoThreatGeneration/Actions/ApplyMitigationAssociationRules.cs
new file mode 100644
index 00000000..c6848ec5
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.AutoThreatGeneration/Actions/ApplyMitigationAssociationRules.cs
@@ -0,0 +1,57 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using Shortcut = ThreatsManager.Interfaces.Extensions.Shortcut;
+
+namespace ThreatsManager.AutoThreatGeneration.Actions
+{
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "C2029A88-0E8E-49F1-A9DF-3FEFAF5582CB")]
+ [ExportMetadata("Label", "Apply Mitigation Association Rule to Threat Event Context Aware Action")]
+ [ExportMetadata("Priority", 35)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class ApplyMitigationAssociationRules : IIdentityContextAwareAction, IDesktopAlertAwareExtension
+ {
+ public Scope Scope => Scope.ThreatEvent;
+ public string Label => "Apply Mitigation Association Rules";
+ public string Group => "ItemActions";
+ public Bitmap Icon => null;
+ public Bitmap SmallIcon => null;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action ShowMessage;
+ public event Action ShowWarning;
+
+ public bool Execute(object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ result = Execute(identity);
+
+ return result;
+ }
+
+ public bool Execute(IIdentity identity)
+ {
+ if (identity is IThreatEvent threatEvent)
+ {
+ if (threatEvent.ApplyMitigations())
+ ShowMessage?.Invoke("Mitigations associated successfully.");
+ else
+ {
+ ShowWarning?.Invoke("No Mitigation has been associated.");
+ }
+
+ }
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.AutoThreatGeneration/ExtensionsContainer.cs b/Sources/Extensions/ThreatsManager.AutoThreatGeneration/ExtensionsContainer.cs
index 111b7431..b8227c8a 100644
--- a/Sources/Extensions/ThreatsManager.AutoThreatGeneration/ExtensionsContainer.cs
+++ b/Sources/Extensions/ThreatsManager.AutoThreatGeneration/ExtensionsContainer.cs
@@ -1,3 +1,3 @@
using ThreatsManager.Interfaces;
-[assembly: ExtensionsContainer("1.3.1")]
\ No newline at end of file
+[assembly: ExtensionsContainer("1.3.3")]
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.AutoThreatGeneration/ThreatsManager.AutoThreatGeneration.csproj b/Sources/Extensions/ThreatsManager.AutoThreatGeneration/ThreatsManager.AutoThreatGeneration.csproj
index b590ff8c..3149d31a 100644
--- a/Sources/Extensions/ThreatsManager.AutoThreatGeneration/ThreatsManager.AutoThreatGeneration.csproj
+++ b/Sources/Extensions/ThreatsManager.AutoThreatGeneration/ThreatsManager.AutoThreatGeneration.csproj
@@ -3,15 +3,15 @@
netcoreapp3.1;net472
Threats Manager Platform Auto Threat Generation library.
- 1.3.1.0
+ 1.3.3.0
Simone Curzi
Simone Curzi
Threats Manager Platform
Copyright © Simone Curzi, 2018-2020. All Rights Reserved.
https://www.nuget.org/packages/ThreatsManager.Engine/
https://github.com/simonec73/threatsmanager
- 1.3.1.0
- 1.3.1
+ 1.3.3.0
+ 1.3.3
true
..\..\ThreatsManager.Engine\ThreatsManager.snk
diff --git a/Sources/Extensions/ThreatsManager.AutoThreatGeneration/ThreatsManager.AutoThreatGeneration.sln b/Sources/Extensions/ThreatsManager.AutoThreatGeneration/ThreatsManager.AutoThreatGeneration.sln
deleted file mode 100644
index 2d4b87b5..00000000
--- a/Sources/Extensions/ThreatsManager.AutoThreatGeneration/ThreatsManager.AutoThreatGeneration.sln
+++ /dev/null
@@ -1,37 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30413.136
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.AutoThreatGeneration", "ThreatsManager.AutoThreatGeneration.csproj", "{C96D95AE-1081-4BD8-9004-0D34574FDC9B}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.Interfaces", "..\..\ThreatsManager.Interfaces\ThreatsManager.Interfaces.csproj", "{F6685B01-5E85-4DFE-AD30-DC7226326A88}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.Utilities", "..\..\ThreatsManager.Utilities\ThreatsManager.Utilities.csproj", "{C598DBFD-D401-4B5D-BD6A-7D13BB1A964F}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {C96D95AE-1081-4BD8-9004-0D34574FDC9B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C96D95AE-1081-4BD8-9004-0D34574FDC9B}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C96D95AE-1081-4BD8-9004-0D34574FDC9B}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C96D95AE-1081-4BD8-9004-0D34574FDC9B}.Release|Any CPU.Build.0 = Release|Any CPU
- {F6685B01-5E85-4DFE-AD30-DC7226326A88}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {F6685B01-5E85-4DFE-AD30-DC7226326A88}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {F6685B01-5E85-4DFE-AD30-DC7226326A88}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {F6685B01-5E85-4DFE-AD30-DC7226326A88}.Release|Any CPU.Build.0 = Release|Any CPU
- {C598DBFD-D401-4B5D-BD6A-7D13BB1A964F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {C598DBFD-D401-4B5D-BD6A-7D13BB1A964F}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {C598DBFD-D401-4B5D-BD6A-7D13BB1A964F}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {C598DBFD-D401-4B5D-BD6A-7D13BB1A964F}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {87B3BA26-85AC-46C6-84AF-183918DE3412}
- EndGlobalSection
-EndGlobal
diff --git a/Sources/Extensions/ThreatsManager.DevOps/ExtensionsContainer.cs b/Sources/Extensions/ThreatsManager.DevOps/ExtensionsContainer.cs
new file mode 100644
index 00000000..b8227c8a
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.DevOps/ExtensionsContainer.cs
@@ -0,0 +1,3 @@
+using ThreatsManager.Interfaces;
+
+[assembly: ExtensionsContainer("1.3.3")]
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.DevOps/Properties/Resources.Designer.cs b/Sources/Extensions/ThreatsManager.DevOps/Properties/Resources.Designer.cs
new file mode 100644
index 00000000..ab286405
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.DevOps/Properties/Resources.Designer.cs
@@ -0,0 +1,153 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace ThreatsManager.DevOps.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ThreatsManager.DevOps.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to https://www.simoneonsecurity.com/tm/2018.
+ ///
+ internal static string DefaultNamespace {
+ get {
+ return ResourceManager.GetString("DefaultNamespace", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Config.
+ ///
+ internal static string DevOpsConfig {
+ get {
+ return ResourceManager.GetString("DevOpsConfig", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Type containing the metadata with the information related to the connection to the DevOps system..
+ ///
+ internal static string DevOpsConfigDescription {
+ get {
+ return ResourceManager.GetString("DevOpsConfigDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to DevOpsConfig.
+ ///
+ internal static string DevOpsConfigPropertySchema {
+ get {
+ return ResourceManager.GetString("DevOpsConfigPropertySchema", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema used to store configuration info for the connection to the DevOps system..
+ ///
+ internal static string DevOpsConfigPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("DevOpsConfigPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Info.
+ ///
+ internal static string DevOpsInfo {
+ get {
+ return ResourceManager.GetString("DevOpsInfo", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Type containing the metadata with the information related to the associated item in a connected DevOps system..
+ ///
+ internal static string DevOpsInfoDescription {
+ get {
+ return ResourceManager.GetString("DevOpsInfoDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to DevOps.
+ ///
+ internal static string DevOpsPropertySchema {
+ get {
+ return ResourceManager.GetString("DevOpsPropertySchema", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema used to enrich object metadata with information related to the associated item in a connected DevOps system..
+ ///
+ internal static string DevOpsPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("DevOpsPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Status of the Mitigation for the Roadmap..
+ ///
+ internal static string PropertyRoadmap {
+ get {
+ return ResourceManager.GetString("PropertyRoadmap", resourceCulture);
+ }
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.DevOps/Properties/Resources.resx b/Sources/Extensions/ThreatsManager.DevOps/Properties/Resources.resx
new file mode 100644
index 00000000..9c5b98f5
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.DevOps/Properties/Resources.resx
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ https://www.simoneonsecurity.com/tm/2018
+
+
+ Config
+
+
+ Property Type containing the metadata with the information related to the connection to the DevOps system.
+
+
+ DevOpsConfig
+
+
+ Property Schema used to store configuration info for the connection to the DevOps system.
+
+
+ Info
+
+
+ Property Type containing the metadata with the information related to the associated item in a connected DevOps system.
+
+
+ DevOps
+
+
+ Property Schema used to enrich object metadata with information related to the associated item in a connected DevOps system.
+
+
+ Status of the Mitigation for the Roadmap.
+
+
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.DevOps/ThreatsManager.DevOps.csproj b/Sources/Extensions/ThreatsManager.DevOps/ThreatsManager.DevOps.csproj
new file mode 100644
index 00000000..8cf53991
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.DevOps/ThreatsManager.DevOps.csproj
@@ -0,0 +1,44 @@
+
+
+
+ netcoreapp3.1;net472
+ Threats Manager Platform DevOps Integration library.
+ 1.3.3.0
+ Simone Curzi
+ Simone Curzi
+ Threats Manager Platform
+ Copyright © Simone Curzi, 2018-2020. All Rights Reserved.
+ https://www.nuget.org/packages/ThreatsManager.Engine/
+ https://github.com/simonec73/threatsmanager
+ 1.3.3.0
+ 1.3.3
+ true
+ ..\..\ThreatsManager.Engine\ThreatsManager.snk
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateDataStore.cs b/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateDataStore.cs
new file mode 100644
index 00000000..660c7c9b
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateDataStore.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Diagrams;
+using ThreatsManager.Interfaces.ObjectModel.Entities;
+
+namespace ThreatsManager.Extensions.Actions
+{
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "D6B01BC8-E72A-400C-88C9-6EB83B41D936")]
+ [ExportMetadata("Label", "Create a Data Store Context Aware Action")]
+ [ExportMetadata("Priority", 17)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class CreateDataStore : IIdentityContextAwareAction, IIdentityAddingRequiredAction
+ {
+ public Scope Scope => Scope.Diagram | Scope.ThreatModel;
+ public string Label => "Create a Data Store...";
+ public string Group => "EntityCreation";
+ public Bitmap Icon => null;
+ public Bitmap SmallIcon => null;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action IdentityAddingRequired;
+
+ public bool Execute(object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ result = Execute(identity);
+
+ return result;
+ }
+
+ public bool Execute(IIdentity identity)
+ {
+ bool result = false;
+
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ if (identity is IDiagram diagram)
+ {
+ var dataStore = diagram.Model?.AddEntity();
+ IdentityAddingRequired?.Invoke(diagram, dataStore, PointF.Empty, SizeF.Empty);
+ result = true;
+ }
+ else if (identity is IThreatModel threatModel)
+ {
+ threatModel.AddEntity();
+ result = true;
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateExternalInteractor.cs b/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateExternalInteractor.cs
new file mode 100644
index 00000000..5a6a4d04
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateExternalInteractor.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Diagrams;
+using ThreatsManager.Interfaces.ObjectModel.Entities;
+
+namespace ThreatsManager.Extensions.Actions
+{
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "2F7A97D4-D5EE-4DF8-A467-EE7F22B451F1")]
+ [ExportMetadata("Label", "Create an External Interactor Context Aware Action")]
+ [ExportMetadata("Priority", 15)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class CreateExternalInteractor : IIdentityContextAwareAction, IIdentityAddingRequiredAction
+ {
+ public Scope Scope => Scope.Diagram | Scope.ThreatModel;
+ public string Label => "Create an External Interactor...";
+ public string Group => "EntityCreation";
+ public Bitmap Icon => null;
+ public Bitmap SmallIcon => null;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action IdentityAddingRequired;
+
+ public bool Execute(object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ result = Execute(identity);
+
+ return result;
+ }
+
+ public bool Execute(IIdentity identity)
+ {
+ bool result = false;
+
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ if (identity is IDiagram diagram)
+ {
+ var interactor = diagram.Model?.AddEntity();
+ IdentityAddingRequired?.Invoke(diagram, interactor, PointF.Empty, SizeF.Empty);
+ result = true;
+ }
+ else if (identity is IThreatModel threatModel)
+ {
+ threatModel.AddEntity();
+ result = true;
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateGlobalThreatEvent.cs b/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateGlobalThreatEvent.cs
new file mode 100644
index 00000000..4015de61
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateGlobalThreatEvent.cs
@@ -0,0 +1,56 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using Shortcut = ThreatsManager.Interfaces.Extensions.Shortcut;
+
+namespace ThreatsManager.Extensions.Actions
+{
+#pragma warning disable CS0067
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "7FCCFBE8-A4DF-4004-A192-CD223AC6F187")]
+ [ExportMetadata("Label", "Create Global Threat Event Context Aware Action")]
+ [ExportMetadata("Priority", 10)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class CreateGlobalThreatEvent : IIdentityContextAwareAction, IDesktopAlertAwareExtension
+ {
+ public Scope Scope => Scope.ThreatType;
+ public string Label => "Create Global Threat Event";
+ public string Group => "ThreatTypesActions";
+ public Bitmap Icon => null;
+ public Bitmap SmallIcon => null;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action ShowMessage;
+ public event Action ShowWarning;
+
+ public bool Execute(object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ result = Execute(identity);
+
+ return result;
+ }
+
+ public bool Execute(IIdentity identity)
+ {
+ bool result = false;
+
+ if (identity is IThreatType threatType)
+ {
+ threatType.Model?.AddThreatEvent(threatType);
+ ShowMessage?.Invoke("Add Global Threat Event has been executed successfully.");
+ result = true;
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateProcess.cs b/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateProcess.cs
new file mode 100644
index 00000000..d5c9aa6a
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateProcess.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Diagrams;
+using ThreatsManager.Interfaces.ObjectModel.Entities;
+
+namespace ThreatsManager.Extensions.Actions
+{
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "E10940D4-952E-4E47-B9F6-4404E58878F4")]
+ [ExportMetadata("Label", "Create a Process Context Aware Action")]
+ [ExportMetadata("Priority", 16)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class CreateProcess : IIdentityContextAwareAction, IIdentityAddingRequiredAction
+ {
+ public Scope Scope => Scope.Diagram | Scope.ThreatModel;
+ public string Label => "Create a Process...";
+ public string Group => "EntityCreation";
+ public Bitmap Icon => null;
+ public Bitmap SmallIcon => null;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action IdentityAddingRequired;
+
+ public bool Execute(object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ result = Execute(identity);
+
+ return result;
+ }
+
+ public bool Execute(IIdentity identity)
+ {
+ bool result = false;
+
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ if (identity is IDiagram diagram)
+ {
+ var process = diagram.Model?.AddEntity();
+ IdentityAddingRequired?.Invoke(diagram, process, PointF.Empty, SizeF.Empty);
+ result = true;
+ }
+ else if (identity is IThreatModel threatModel)
+ {
+ threatModel.AddEntity();
+ result = true;
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateTrustBoundary.cs b/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateTrustBoundary.cs
new file mode 100644
index 00000000..8c99986e
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Actions/CreateTrustBoundary.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Diagrams;
+using ThreatsManager.Interfaces.ObjectModel.Entities;
+
+namespace ThreatsManager.Extensions.Actions
+{
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "E6BA9412-00C0-4547-9D62-A55BF881F3E7")]
+ [ExportMetadata("Label", "Create a Trust Boundary Context Aware Action")]
+ [ExportMetadata("Priority", 18)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class CreateTrustBoundary : IIdentityContextAwareAction, IIdentityAddingRequiredAction
+ {
+ public Scope Scope => Scope.Diagram | Scope.ThreatModel;
+ public string Label => "Create a Trust Boundary...";
+ public string Group => "EntityCreation";
+ public Bitmap Icon => null;
+ public Bitmap SmallIcon => null;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action IdentityAddingRequired;
+
+ public bool Execute(object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ result = Execute(identity);
+
+ return result;
+ }
+
+ public bool Execute(IIdentity identity)
+ {
+ bool result = false;
+
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ if (identity is IDiagram diagram)
+ {
+ var trustBoundary = diagram.Model?.AddGroup();
+ IdentityAddingRequired?.Invoke(diagram, trustBoundary, PointF.Empty, new SizeF(600, 300));
+ result = true;
+ }
+ else if (identity is IThreatModel threatModel)
+ {
+ threatModel.AddGroup();
+ result = true;
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Actions/PropagateThreatEvent.cs b/Sources/Extensions/ThreatsManager.Extensions/Actions/PropagateThreatEvent.cs
new file mode 100644
index 00000000..b21f10d6
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Actions/PropagateThreatEvent.cs
@@ -0,0 +1,81 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using Shortcut = ThreatsManager.Interfaces.Extensions.Shortcut;
+
+namespace ThreatsManager.Extensions.Actions
+{
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "606CDD2C-8811-47D2-87DE-7BAE808146B3")]
+ [ExportMetadata("Label", "Propagate Threat Event Name and Description Context Aware Action")]
+ [ExportMetadata("Priority", 30)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class PropagateThreatEvent : IIdentityContextAwareAction, IAsker
+ {
+ public Scope Scope => Scope.ThreatEvent;
+ public string Label => "Propagate Threat Event Info";
+ public string Group => "Propagate";
+ public Bitmap Icon => null;
+ public Bitmap SmallIcon => null;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action Ask;
+
+ public bool Execute([NotNull] object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ {
+ result = Execute(identity);
+ }
+
+ return result;
+ }
+
+ public bool Execute([NotNull] IIdentity identity)
+ {
+ if (identity is IThreatEvent threatEvent)
+ {
+ Ask?.Invoke(this, threatEvent, "Copy Threat Event Info",
+ $"You are about to copy Name and Description of Threat Event '{threatEvent.Name}' to the associated Threat Type and to its sibling Threat Events. Are you sure?",
+ false, RequestOptions.YesNo);
+ }
+
+ return true;
+ }
+
+ public void Answer(object context, AnswerType answer)
+ {
+ if (answer == AnswerType.Yes && context is IThreatEvent threatEvent &&
+ threatEvent.Model is IThreatModel model)
+ {
+ var threatType = threatEvent.ThreatType;
+ if (threatType != null)
+ {
+ threatType.Name = threatEvent.Name;
+ threatType.Description = threatEvent.Description;
+ var threatEvents = model.GetThreatEvents(threatType)?.ToArray();
+ if (threatEvents?.Any() ?? false)
+ {
+ foreach (var t in threatEvents)
+ {
+ if (t != threatEvent)
+ {
+ t.Name = threatEvent.Name;
+ t.Description = threatEvent.Description;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Actions/PropagateThreatType.cs b/Sources/Extensions/ThreatsManager.Extensions/Actions/PropagateThreatType.cs
new file mode 100644
index 00000000..9123635b
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Actions/PropagateThreatType.cs
@@ -0,0 +1,72 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using Shortcut = ThreatsManager.Interfaces.Extensions.Shortcut;
+
+namespace ThreatsManager.Extensions.Actions
+{
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "FA566F92-541F-4817-B53B-199C4BA098D6")]
+ [ExportMetadata("Label", "Propagate Threat Type Name and Description Context Aware Action")]
+ [ExportMetadata("Priority", 30)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class PropagateThreatType : IIdentityContextAwareAction, IAsker
+ {
+ public Scope Scope => Scope.ThreatType;
+ public string Label => "Propagate Threat Type Info";
+ public string Group => "Propagate";
+ public Bitmap Icon => null;
+ public Bitmap SmallIcon => null;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action Ask;
+
+ public bool Execute([NotNull] object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ {
+ result = Execute(identity);
+ }
+
+ return result;
+ }
+
+ public bool Execute([NotNull] IIdentity identity)
+ {
+ if (identity is IThreatType threatType)
+ {
+ Ask?.Invoke(this, threatType, "Copy Threat Type Info",
+ $"You are about to copy Name and Description of Threat Type '{threatType.Name}' to the associated Threat Events. Are you sure?",
+ false, RequestOptions.YesNo);
+ }
+
+ return true;
+ }
+
+ public void Answer(object context, AnswerType answer)
+ {
+ if (answer == AnswerType.Yes && context is IThreatType threatType &&
+ threatType.Model is IThreatModel model)
+ {
+ var threatEvents = model.GetThreatEvents(threatType)?.ToArray();
+ if (threatEvents?.Any() ?? false)
+ {
+ foreach (var t in threatEvents)
+ {
+ t.Name = threatType.Name;
+ t.Description = threatType.Description;
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveFromDiagram.cs b/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveFromDiagram.cs
new file mode 100644
index 00000000..31a42a6d
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveFromDiagram.cs
@@ -0,0 +1,73 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel.Diagrams;
+using Shortcut = ThreatsManager.Interfaces.Extensions.Shortcut;
+
+namespace ThreatsManager.Extensions.Actions
+{
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "140EA130-FA6C-4745-B609-28B5A47AF834")]
+ [ExportMetadata("Label", "Remove from Diagram Context Aware Action")]
+ [ExportMetadata("Priority", 50)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class RemoveFromDiagram : IShapesContextAwareAction,
+ IShapeContextAwareAction, ILinkContextAwareAction,
+ IEntityGroupRemovingRequiredAction, IDataFlowRemovingRequiredAction
+ {
+ public Scope Scope => Scope.Entity | Scope.Group | Scope.DataFlow;
+ public string Label => "Remove from Diagram";
+ public string Group => "Remove";
+ public Bitmap Icon => null;
+ public Bitmap SmallIcon => null;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action EntityGroupRemovingRequired;
+ public event Action DataFlowRemovingRequired;
+
+ public bool Execute([NotNull] object item)
+ {
+ return false;
+ }
+
+ public bool Execute([NotNull] ILink link)
+ {
+ return Execute(null, new[] {link});
+ }
+
+ public bool Execute([NotNull] IShape shape)
+ {
+ return Execute(new[] {shape}, null);
+ }
+
+ public bool Execute(IEnumerable shapes, IEnumerable links)
+ {
+ var shapesArray = shapes?.ToArray();
+ var linksArray = links?.ToArray();
+
+ if (linksArray?.Any() ?? false)
+ {
+ foreach (var link in linksArray)
+ {
+ DataFlowRemovingRequired?.Invoke(link);
+ }
+ }
+
+ if (shapesArray?.Any() ?? false)
+ {
+ foreach (var shape in shapesArray)
+ {
+ EntityGroupRemovingRequired?.Invoke(shape);
+ }
+ }
+
+ return true;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveFromModel.cs b/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveFromModel.cs
new file mode 100644
index 00000000..50915235
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveFromModel.cs
@@ -0,0 +1,55 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using ThreatsManager.Extensions.Properties;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using Shortcut = ThreatsManager.Interfaces.Extensions.Shortcut;
+
+namespace ThreatsManager.Extensions.Actions
+{
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "4CB5F79B-189F-499F-AC63-ABF4EEFB462F")]
+ [ExportMetadata("Label", "Remove from Model Context Aware Action")]
+ [ExportMetadata("Priority", 51)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class RemoveFromModel : IIdentityContextAwareAction, IRemoveIdentityFromModelRequiredAction, IAsker
+ {
+ public Scope Scope => Scope.Entity | Scope.DataFlow | Scope.Group;
+ public string Label => "Remove from Model";
+ public string Group => "Remove";
+ public Bitmap Icon => null;
+ public Bitmap SmallIcon => null;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action IdentityRemovingRequired;
+ public event Action Ask;
+
+ public bool Execute(object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ result = Execute(identity);
+
+ return result;
+ }
+
+ public bool Execute(IIdentity identity)
+ {
+ Ask?.Invoke(this, identity, Resources.DeleteFromModel,
+ string.Format(Resources.RemoveIdentityFromModel, identity.Name),
+ false, RequestOptions.YesNo);
+
+ return true;
+ }
+
+ public void Answer(object context, AnswerType answer)
+ {
+ if (answer == AnswerType.Yes && context is IIdentity identity)
+ IdentityRemovingRequired?.Invoke(identity);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveThreatEvent.cs b/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveThreatEvent.cs
new file mode 100644
index 00000000..99066c1a
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveThreatEvent.cs
@@ -0,0 +1,71 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Icons;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using Shortcut = ThreatsManager.Interfaces.Extensions.Shortcut;
+
+namespace ThreatsManager.Extensions.Actions
+{
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "D252EAFC-8F07-4D35-900D-981A96D5779F")]
+ [ExportMetadata("Label", "Remove Threat Event Context Aware Action")]
+ [ExportMetadata("Priority", 30)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class RemoveThreatEvent : IIdentityContextAwareAction, IDesktopAlertAwareExtension, IAsker
+ {
+ public Scope Scope => Scope.ThreatEvent;
+ public string Label => "Remove Threat Event";
+ public string Group => "ObjectRemoval";
+ public Bitmap Icon => Resources.threat_event_big_delete;
+ public Bitmap SmallIcon => Resources.threat_event_delete;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action ShowMessage;
+ public event Action ShowWarning;
+ public event Action Ask;
+
+ public bool Execute([NotNull] object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ {
+ result = Execute(identity);
+ }
+
+ return result;
+ }
+
+ public bool Execute([NotNull] IIdentity identity)
+ {
+ if (identity is IThreatEvent threatEvent)
+ {
+ Ask?.Invoke(this, threatEvent, "Remove Threat Event",
+ $"You are about to remove Threat Event '{threatEvent.Name}' associated to '{threatEvent.Parent.Name}'. Are you sure?",
+ false, RequestOptions.YesNo);
+ }
+
+ return true;
+ }
+
+ public void Answer(object context, AnswerType answer)
+ {
+ if (answer == AnswerType.Yes && context is IThreatEvent threatEvent &&
+ threatEvent.Parent is IThreatEventsContainer container)
+ {
+ var result = container.RemoveThreatEvent(threatEvent.Id);
+ if (result)
+ ShowMessage?.Invoke("Remove Threat Event has been executed successfully.");
+ else
+ ShowWarning?.Invoke("Remove Threat Event has failed.");
+ }
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveThreatType.cs b/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveThreatType.cs
new file mode 100644
index 00000000..654e1a0c
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Actions/RemoveThreatType.cs
@@ -0,0 +1,68 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Drawing;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.Extensions.Actions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using Shortcut = ThreatsManager.Interfaces.Extensions.Shortcut;
+
+namespace ThreatsManager.Extensions.Actions
+{
+#pragma warning disable CS0067
+ [Export(typeof(IContextAwareAction))]
+ [ExportMetadata("Id", "8CB90E20-19C5-43C1-A79A-C10794FE014E")]
+ [ExportMetadata("Label", "Remove Threat Type Context Aware Action")]
+ [ExportMetadata("Priority", 30)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class RemoveThreatType : IIdentityContextAwareAction, IDesktopAlertAwareExtension, IAsker
+ {
+ public Scope Scope => Scope.ThreatType;
+ public string Label => "Remove Threat Type";
+ public string Group => "ObjectRemoval";
+ public Bitmap Icon => Icons.Resources.threat_type_big_delete;
+ public Bitmap SmallIcon => Icons.Resources.threat_type_delete;
+ public Shortcut Shortcut => Shortcut.None;
+
+ public event Action ShowMessage;
+ public event Action ShowWarning;
+ public event Action Ask;
+
+ public bool Execute(object item)
+ {
+ bool result = false;
+
+ if (item is IIdentity identity)
+ result = Execute(identity);
+
+ return result;
+ }
+
+ public bool Execute(IIdentity identity)
+ {
+ if (identity is IThreatType threatType)
+ {
+ Ask?.Invoke(this, threatType, "Remove Threat Type",
+ $"You are about to remove Threat Type '{threatType.Name}'. Are you sure?",
+ false, RequestOptions.YesNo);
+ }
+
+ return true;
+ }
+
+ public void Answer(object context, AnswerType answer)
+ {
+ if (answer == AnswerType.Yes && context is IThreatType threatType &&
+ threatType.Model is IThreatModel model)
+ {
+ var result = model.RemoveThreatType(threatType.Id);
+ if (result)
+ ShowMessage?.Invoke("Remove Threat Type has been executed successfully.");
+ else
+ ShowWarning?.Invoke("Remove Threat Type has failed.");
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/ExtensionsContainer.cs b/Sources/Extensions/ThreatsManager.Extensions/ExtensionsContainer.cs
new file mode 100644
index 00000000..b8227c8a
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/ExtensionsContainer.cs
@@ -0,0 +1,3 @@
+using ThreatsManager.Interfaces;
+
+[assembly: ExtensionsContainer("1.3.3")]
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Initializers/ActorsInitializer.cs b/Sources/Extensions/ThreatsManager.Extensions/Initializers/ActorsInitializer.cs
new file mode 100644
index 00000000..bdab066c
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Initializers/ActorsInitializer.cs
@@ -0,0 +1,32 @@
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.Initializers
+{
+ [Export(typeof(IInitializer))]
+ [ExportMetadata("Id", "30530FE5-9EC2-40DD-9DFF-9482096E51C6")]
+ [ExportMetadata("Label", "Standard Actors Initializer")]
+ [ExportMetadata("Priority", 10)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class ActorsInitializer : IInitializer
+ {
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ var values = EnumExtensions.GetUIVisible()?.ToArray();
+ if (values?.Any() ?? false)
+ {
+ foreach (var value in values)
+ {
+ model.AddThreatActor(value);
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Initializers/KnownTypesInitializer.cs b/Sources/Extensions/ThreatsManager.Extensions/Initializers/KnownTypesInitializer.cs
new file mode 100644
index 00000000..cb14c41a
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Initializers/KnownTypesInitializer.cs
@@ -0,0 +1,23 @@
+using System.ComponentModel.Composition;
+using ThreatsManager.Extensions.Schemas;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.Initializers
+{
+ [Export(typeof(IExtensionInitializer))]
+ [ExportMetadata("Id", "1B861078-A088-4368-8A19-B96585BF7158")]
+ [ExportMetadata("Label", "Known Types Initializer")]
+ [ExportMetadata("Priority", 10)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Business)]
+ public class KnownTypesInitializer : IExtensionInitializer
+ {
+ public void Initialize()
+ {
+ KnownTypesBinder.AddKnownType(typeof(ResidualRiskEstimatorConfiguration));
+ KnownTypesBinder.AddKnownType(typeof(ResidualRiskEstimatorParameter));
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Initializers/ModelConfigSchemaInitializer.cs b/Sources/Extensions/ThreatsManager.Extensions/Initializers/ModelConfigSchemaInitializer.cs
new file mode 100644
index 00000000..b13f2766
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Initializers/ModelConfigSchemaInitializer.cs
@@ -0,0 +1,48 @@
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Extensions.Schemas;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+
+namespace ThreatsManager.Extensions.Initializers
+{
+ [Export(typeof(IInitializer))]
+ [ExportMetadata("Id", "6E637EFC-7AFC-4895-8794-F650DA4ED2FF")]
+ [ExportMetadata("Label", "Threat Model Configuration Schema Initializer")]
+ [ExportMetadata("Priority", 10)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class ModelConfigSchemaInitializer : IInitializer
+ {
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ var schemaManager = new ModelConfigPropertySchemaManager(model);
+ var schema = schemaManager.GetSchema();
+
+ var horizontalPT = schema.GetPropertyType("Diagram Layout Horizontal Spacing");
+ var horizontal = model.GetProperty(horizontalPT);
+ if (horizontal == null)
+ {
+ model.AddProperty(horizontalPT, "200");
+ }
+ else
+ {
+ if (string.IsNullOrWhiteSpace(horizontal.StringValue))
+ horizontal.StringValue = "200";
+ }
+
+ var verticalPT = schema.GetPropertyType("Diagram Layout Vertical Spacing");
+ var vertical = model.GetProperty(verticalPT);
+ if (vertical == null)
+ {
+ model.AddProperty(verticalPT, "100");
+ }
+ else
+ {
+ if (string.IsNullOrWhiteSpace(vertical.StringValue))
+ vertical.StringValue = "100";
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Initializers/SeveritiesInitializer.cs b/Sources/Extensions/ThreatsManager.Extensions/Initializers/SeveritiesInitializer.cs
new file mode 100644
index 00000000..78ade4ba
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Initializers/SeveritiesInitializer.cs
@@ -0,0 +1,22 @@
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+
+namespace ThreatsManager.Extensions.Initializers
+{
+ [Export(typeof(IInitializer))]
+ [ExportMetadata("Id", "389FA3FA-C263-4B4C-8B8F-0266E553D261")]
+ [ExportMetadata("Label", "Standard Severities Initializer")]
+ [ExportMetadata("Priority", 10)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class SeveritiesInitializer : IInitializer
+ {
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ model.InitializeStandardSeverities();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Initializers/StrengthsInitializer.cs b/Sources/Extensions/ThreatsManager.Extensions/Initializers/StrengthsInitializer.cs
new file mode 100644
index 00000000..7228c447
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Initializers/StrengthsInitializer.cs
@@ -0,0 +1,22 @@
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+
+namespace ThreatsManager.Extensions.Initializers
+{
+ [Export(typeof(IInitializer))]
+ [ExportMetadata("Id", "C7EE5AE4-3DD0-4CD1-8CAD-AC3D21BF8F5D")]
+ [ExportMetadata("Label", "Standard Strengths Initializer")]
+ [ExportMetadata("Priority", 10)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class StrengthInitializer : IInitializer
+ {
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ model.InitializeStandardStrengths();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Initializers/ThreatsSchemaInitializer.cs b/Sources/Extensions/ThreatsManager.Extensions/Initializers/ThreatsSchemaInitializer.cs
new file mode 100644
index 00000000..1a9a4758
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Initializers/ThreatsSchemaInitializer.cs
@@ -0,0 +1,24 @@
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Extensions.Schemas;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+
+namespace ThreatsManager.Extensions.Initializers
+{
+ [Export(typeof(IInitializer))]
+ [ExportMetadata("Id", "3FCE7492-5173-451B-90AD-4AB51EF8D1D4")]
+ [ExportMetadata("Label", "Threats Schema Initializer")]
+ [ExportMetadata("Priority", 10)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class ThreatsSchemaInitializer : IInitializer
+ {
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ var schemaManager = new ThreatsPropertySchemaManager(model);
+ schemaManager.GetSchema();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Properties/Resources.Designer.cs b/Sources/Extensions/ThreatsManager.Extensions/Properties/Resources.Designer.cs
new file mode 100644
index 00000000..62c4f9b3
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Properties/Resources.Designer.cs
@@ -0,0 +1,3728 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated by a tool.
+// Runtime Version:4.0.30319.42000
+//
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace ThreatsManager.Extensions.Properties {
+ using System;
+
+
+ ///
+ /// A strongly-typed resource class, for looking up localized strings, etc.
+ ///
+ // This class was auto-generated by the StronglyTypedResourceBuilder
+ // class via a tool like ResGen or Visual Studio.
+ // To add or remove a member, edit your .ResX file then rerun ResGen
+ // with the /str option, or rebuild your VS project.
+ [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+ [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+ internal class Resources {
+
+ private static global::System.Resources.ResourceManager resourceMan;
+
+ private static global::System.Globalization.CultureInfo resourceCulture;
+
+ [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+ internal Resources() {
+ }
+
+ ///
+ /// Returns the cached ResourceManager instance used by this class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Resources.ResourceManager ResourceManager {
+ get {
+ if (object.ReferenceEquals(resourceMan, null)) {
+ global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ThreatsManager.Extensions.Properties.Resources", typeof(Resources).Assembly);
+ resourceMan = temp;
+ }
+ return resourceMan;
+ }
+ }
+
+ ///
+ /// Overrides the current thread's CurrentUICulture property for all
+ /// resource lookups using this strongly typed resource class.
+ ///
+ [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+ internal static global::System.Globalization.CultureInfo Culture {
+ get {
+ return resourceCulture;
+ }
+ set {
+ resourceCulture = value;
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap arrows_merge {
+ get {
+ object obj = ResourceManager.GetObject("arrows_merge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap arrows_merge_big {
+ get {
+ object obj = ResourceManager.GetObject("arrows_merge_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap arrows_merge_huge {
+ get {
+ object obj = ResourceManager.GetObject("arrows_merge_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap arrows_merge_small {
+ get {
+ object obj = ResourceManager.GetObject("arrows_merge_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Identifier of the Diagram associated to the Entity..
+ ///
+ internal static string AssociatedDiagram {
+ get {
+ return ResourceManager.GetString("AssociatedDiagram", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema that collects properties to manage Diagrams associated to Entities..
+ ///
+ internal static string AssociatedDiagramPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("AssociatedDiagramPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Identifier of the Entity associated to the Diagram..
+ ///
+ internal static string AssociatedEntity {
+ get {
+ return ResourceManager.GetString("AssociatedEntity", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema that collects properties to manage Entities associated to Diagrams..
+ ///
+ internal static string AssociatedEntityPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("AssociatedEntityPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap astrologer {
+ get {
+ object obj = ResourceManager.GetObject("astrologer", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap astrologer_big {
+ get {
+ object obj = ResourceManager.GetObject("astrologer_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap astrologer_huge {
+ get {
+ object obj = ResourceManager.GetObject("astrologer_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap astrologer_small {
+ get {
+ object obj = ResourceManager.GetObject("astrologer_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book {
+ get {
+ object obj = ResourceManager.GetObject("book", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_big {
+ get {
+ object obj = ResourceManager.GetObject("book_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_huge {
+ get {
+ object obj = ResourceManager.GetObject("book_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_open {
+ get {
+ object obj = ResourceManager.GetObject("book_open", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_open_big {
+ get {
+ object obj = ResourceManager.GetObject("book_open_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_open_huge {
+ get {
+ object obj = ResourceManager.GetObject("book_open_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_open_selected {
+ get {
+ object obj = ResourceManager.GetObject("book_open_selected", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_open_selected_big {
+ get {
+ object obj = ResourceManager.GetObject("book_open_selected_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_open_selected_huge {
+ get {
+ object obj = ResourceManager.GetObject("book_open_selected_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_open_selected_small {
+ get {
+ object obj = ResourceManager.GetObject("book_open_selected_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_open_small {
+ get {
+ object obj = ResourceManager.GetObject("book_open_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_selected {
+ get {
+ object obj = ResourceManager.GetObject("book_selected", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_selected_big {
+ get {
+ object obj = ResourceManager.GetObject("book_selected_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_selected_huge {
+ get {
+ object obj = ResourceManager.GetObject("book_selected_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_selected_small {
+ get {
+ object obj = ResourceManager.GetObject("book_selected_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap book_small {
+ get {
+ object obj = ResourceManager.GetObject("book_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap businesspeople_alt {
+ get {
+ object obj = ResourceManager.GetObject("businesspeople_alt", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap businesspeople_alt_big {
+ get {
+ object obj = ResourceManager.GetObject("businesspeople_alt_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap businesspeople_alt_huge {
+ get {
+ object obj = ResourceManager.GetObject("businesspeople_alt_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap businesspeople_alt_small {
+ get {
+ object obj = ResourceManager.GetObject("businesspeople_alt_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap caesar {
+ get {
+ object obj = ResourceManager.GetObject("caesar", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap caesar_big {
+ get {
+ object obj = ResourceManager.GetObject("caesar_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap caesar_huge {
+ get {
+ object obj = ResourceManager.GetObject("caesar_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap caesar_small {
+ get {
+ object obj = ResourceManager.GetObject("caesar_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap camera {
+ get {
+ object obj = ResourceManager.GetObject("camera", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap camera_big {
+ get {
+ object obj = ResourceManager.GetObject("camera_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap camera_huge {
+ get {
+ object obj = ResourceManager.GetObject("camera_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap camera_small {
+ get {
+ object obj = ResourceManager.GetObject("camera_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema that collects properties to configure Capec. It is dynamically generated based on the selected properties from Capec data source..
+ ///
+ internal static string CapecConfigPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("CapecConfigPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to http://capec.mitre.org/data/xml/capec_v2.10.xml.
+ ///
+ internal static string CapecDefaultUrl {
+ get {
+ return ResourceManager.GetString("CapecDefaultUrl", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema that collects the properties returned by Capec and applies to Threat Types and Events..
+ ///
+ internal static string CapecPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("CapecPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap chart_pie {
+ get {
+ object obj = ResourceManager.GetObject("chart_pie", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap chart_pie_big {
+ get {
+ object obj = ResourceManager.GetObject("chart_pie_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap chart_pie_huge {
+ get {
+ object obj = ResourceManager.GetObject("chart_pie_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap chart_pie_small {
+ get {
+ object obj = ResourceManager.GetObject("chart_pie_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap checkbox {
+ get {
+ object obj = ResourceManager.GetObject("checkbox", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap checkbox_big {
+ get {
+ object obj = ResourceManager.GetObject("checkbox_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap checkbox_huge {
+ get {
+ object obj = ResourceManager.GetObject("checkbox_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap checkbox_small {
+ get {
+ object obj = ResourceManager.GetObject("checkbox_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap checkbox_unchecked {
+ get {
+ object obj = ResourceManager.GetObject("checkbox_unchecked", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap checkbox_unchecked_big {
+ get {
+ object obj = ResourceManager.GetObject("checkbox_unchecked_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap checkbox_unchecked_huge {
+ get {
+ object obj = ResourceManager.GetObject("checkbox_unchecked_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap checkbox_unchecked_small {
+ get {
+ object obj = ResourceManager.GetObject("checkbox_unchecked_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap clear {
+ get {
+ object obj = ResourceManager.GetObject("clear", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap clear_big {
+ get {
+ object obj = ResourceManager.GetObject("clear_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap clear_huge {
+ get {
+ object obj = ResourceManager.GetObject("clear_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap clear_small {
+ get {
+ object obj = ResourceManager.GetObject("clear_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap clipboard {
+ get {
+ object obj = ResourceManager.GetObject("clipboard", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap clipboard_big {
+ get {
+ object obj = ResourceManager.GetObject("clipboard_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap clipboard_huge {
+ get {
+ object obj = ResourceManager.GetObject("clipboard_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap clipboard_small {
+ get {
+ object obj = ResourceManager.GetObject("clipboard_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap cloud_computing_download {
+ get {
+ object obj = ResourceManager.GetObject("cloud_computing_download", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap copy {
+ get {
+ object obj = ResourceManager.GetObject("copy", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap copy_big {
+ get {
+ object obj = ResourceManager.GetObject("copy_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap copy_huge {
+ get {
+ object obj = ResourceManager.GetObject("copy_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap copy_small {
+ get {
+ object obj = ResourceManager.GetObject("copy_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap cubes {
+ get {
+ object obj = ResourceManager.GetObject("cubes", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap cubes_big {
+ get {
+ object obj = ResourceManager.GetObject("cubes_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap cubes_huge {
+ get {
+ object obj = ResourceManager.GetObject("cubes_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap cubes_small {
+ get {
+ object obj = ResourceManager.GetObject("cubes_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap cut {
+ get {
+ object obj = ResourceManager.GetObject("cut", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap cut_big {
+ get {
+ object obj = ResourceManager.GetObject("cut_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap cut_huge {
+ get {
+ object obj = ResourceManager.GetObject("cut_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap cut_small {
+ get {
+ object obj = ResourceManager.GetObject("cut_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to http://cwe.mitre.org/data/xml/cwec_v2.10.xml.zip.
+ ///
+ internal static string CweDefaultUrl {
+ get {
+ return ResourceManager.GetString("CweDefaultUrl", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to https://www.simoneonsecurity.com/tm/2018.
+ ///
+ internal static string DefaultNamespace {
+ get {
+ return ResourceManager.GetString("DefaultNamespace", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Delete from Model.
+ ///
+ internal static string DeleteFromModel {
+ get {
+ return ResourceManager.GetString("DeleteFromModel", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap dependencies {
+ get {
+ object obj = ResourceManager.GetObject("dependencies", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap dependencies_big {
+ get {
+ object obj = ResourceManager.GetObject("dependencies_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap dependencies_huge {
+ get {
+ object obj = ResourceManager.GetObject("dependencies_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap dependencies_small {
+ get {
+ object obj = ResourceManager.GetObject("dependencies_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Diagram is not associated to a Model..
+ ///
+ internal static string DiagramNoModelError {
+ get {
+ return ResourceManager.GetString("DiagramNoModelError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema that collects properties to be assigned to the Diagrams..
+ ///
+ internal static string DiagramPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("DiagramPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap document_empty {
+ get {
+ object obj = ResourceManager.GetObject("document_empty", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap document_empty_big {
+ get {
+ object obj = ResourceManager.GetObject("document_empty_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap document_empty_huge {
+ get {
+ object obj = ResourceManager.GetObject("document_empty_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap document_empty_small {
+ get {
+ object obj = ResourceManager.GetObject("document_empty_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap document_text {
+ get {
+ object obj = ResourceManager.GetObject("document_text", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap document_text_big {
+ get {
+ object obj = ResourceManager.GetObject("document_text_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap document_text_huge {
+ get {
+ object obj = ResourceManager.GetObject("document_text_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap document_text_small {
+ get {
+ object obj = ResourceManager.GetObject("document_text_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap docx {
+ get {
+ object obj = ResourceManager.GetObject("docx", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap docx_big {
+ get {
+ object obj = ResourceManager.GetObject("docx_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap docx_huge {
+ get {
+ object obj = ResourceManager.GetObject("docx_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap docx_small {
+ get {
+ object obj = ResourceManager.GetObject("docx_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema to represent the Effort required to implement mitigations..
+ ///
+ internal static string EffortPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("EffortPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap element {
+ get {
+ object obj = ResourceManager.GetObject("element", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap element_big {
+ get {
+ object obj = ResourceManager.GetObject("element_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap element_huge {
+ get {
+ object obj = ResourceManager.GetObject("element_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap element_small {
+ get {
+ object obj = ResourceManager.GetObject("element_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_cascade {
+ get {
+ object obj = ResourceManager.GetObject("elements_cascade", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_cascade_big {
+ get {
+ object obj = ResourceManager.GetObject("elements_cascade_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_cascade_huge {
+ get {
+ object obj = ResourceManager.GetObject("elements_cascade_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_cascade_small {
+ get {
+ object obj = ResourceManager.GetObject("elements_cascade_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_tree {
+ get {
+ object obj = ResourceManager.GetObject("elements_tree", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_tree_big {
+ get {
+ object obj = ResourceManager.GetObject("elements_tree_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_tree_huge {
+ get {
+ object obj = ResourceManager.GetObject("elements_tree_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_tree_small {
+ get {
+ object obj = ResourceManager.GetObject("elements_tree_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_two {
+ get {
+ object obj = ResourceManager.GetObject("elements_two", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_two_big {
+ get {
+ object obj = ResourceManager.GetObject("elements_two_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_two_huge {
+ get {
+ object obj = ResourceManager.GetObject("elements_two_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap elements_two_small {
+ get {
+ object obj = ResourceManager.GetObject("elements_two_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap export_template {
+ get {
+ object obj = ResourceManager.GetObject("export_template", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap export_template_big {
+ get {
+ object obj = ResourceManager.GetObject("export_template_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap export_template_huge {
+ get {
+ object obj = ResourceManager.GetObject("export_template_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap export_template_small {
+ get {
+ object obj = ResourceManager.GetObject("export_template_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap firewall {
+ get {
+ object obj = ResourceManager.GetObject("firewall", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap firewall_big {
+ get {
+ object obj = ResourceManager.GetObject("firewall_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap firewall_huge {
+ get {
+ object obj = ResourceManager.GetObject("firewall_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap firewall_small {
+ get {
+ object obj = ResourceManager.GetObject("firewall_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap floppy_disk {
+ get {
+ object obj = ResourceManager.GetObject("floppy_disk", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap floppy_disk_big {
+ get {
+ object obj = ResourceManager.GetObject("floppy_disk_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap floppy_disk_huge {
+ get {
+ object obj = ResourceManager.GetObject("floppy_disk_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap floppy_disk_small {
+ get {
+ object obj = ResourceManager.GetObject("floppy_disk_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap folder_open_document {
+ get {
+ object obj = ResourceManager.GetObject("folder_open_document", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap folder_open_document_big {
+ get {
+ object obj = ResourceManager.GetObject("folder_open_document_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap folder_open_document_huge {
+ get {
+ object obj = ResourceManager.GetObject("folder_open_document_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap folder_open_document_small {
+ get {
+ object obj = ResourceManager.GetObject("folder_open_document_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap gauge {
+ get {
+ object obj = ResourceManager.GetObject("gauge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap gauge_big {
+ get {
+ object obj = ResourceManager.GetObject("gauge_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap gauge_huge {
+ get {
+ object obj = ResourceManager.GetObject("gauge_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap gauge_small {
+ get {
+ object obj = ResourceManager.GetObject("gauge_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap graph_star {
+ get {
+ object obj = ResourceManager.GetObject("graph_star", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap graph_star_big {
+ get {
+ object obj = ResourceManager.GetObject("graph_star_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap graph_star_huge {
+ get {
+ object obj = ResourceManager.GetObject("graph_star_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap graph_star_small {
+ get {
+ object obj = ResourceManager.GetObject("graph_star_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Deleting objects.
+ ///
+ internal static string GraphDeletionCaption {
+ get {
+ return ResourceManager.GetString("GraphDeletionCaption", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to You are about to delete {0} objects. Do you confirm?.
+ ///
+ internal static string GraphDeletionConfirmation {
+ get {
+ return ResourceManager.GetString("GraphDeletionConfirmation", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap hint {
+ get {
+ object obj = ResourceManager.GetObject("hint", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap hint_big {
+ get {
+ object obj = ResourceManager.GetObject("hint_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap hint_huge {
+ get {
+ object obj = ResourceManager.GetObject("hint_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap hint_small {
+ get {
+ object obj = ResourceManager.GetObject("hint_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap import {
+ get {
+ object obj = ResourceManager.GetObject("import", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap import_big {
+ get {
+ object obj = ResourceManager.GetObject("import_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap import_huge {
+ get {
+ object obj = ResourceManager.GetObject("import_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap import_small {
+ get {
+ object obj = ResourceManager.GetObject("import_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap import_template {
+ get {
+ object obj = ResourceManager.GetObject("import_template", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap import_template_big {
+ get {
+ object obj = ResourceManager.GetObject("import_template_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap import_template_huge {
+ get {
+ object obj = ResourceManager.GetObject("import_template_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap import_template_small {
+ get {
+ object obj = ResourceManager.GetObject("import_template_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_bottom {
+ get {
+ object obj = ResourceManager.GetObject("layout_bottom", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_bottom_big {
+ get {
+ object obj = ResourceManager.GetObject("layout_bottom_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_bottom_huge {
+ get {
+ object obj = ResourceManager.GetObject("layout_bottom_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_bottom_small {
+ get {
+ object obj = ResourceManager.GetObject("layout_bottom_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_horizontal {
+ get {
+ object obj = ResourceManager.GetObject("layout_horizontal", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_horizontal_big {
+ get {
+ object obj = ResourceManager.GetObject("layout_horizontal_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_horizontal_small {
+ get {
+ object obj = ResourceManager.GetObject("layout_horizontal_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_left {
+ get {
+ object obj = ResourceManager.GetObject("layout_left", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_left_big {
+ get {
+ object obj = ResourceManager.GetObject("layout_left_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_left_huge {
+ get {
+ object obj = ResourceManager.GetObject("layout_left_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_left_small {
+ get {
+ object obj = ResourceManager.GetObject("layout_left_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_right {
+ get {
+ object obj = ResourceManager.GetObject("layout_right", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_right_big {
+ get {
+ object obj = ResourceManager.GetObject("layout_right_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_right_huge {
+ get {
+ object obj = ResourceManager.GetObject("layout_right_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_right_small {
+ get {
+ object obj = ResourceManager.GetObject("layout_right_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_top {
+ get {
+ object obj = ResourceManager.GetObject("layout_top", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_top_big {
+ get {
+ object obj = ResourceManager.GetObject("layout_top_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_top_huge {
+ get {
+ object obj = ResourceManager.GetObject("layout_top_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_top_small {
+ get {
+ object obj = ResourceManager.GetObject("layout_top_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_vertical {
+ get {
+ object obj = ResourceManager.GetObject("layout_vertical", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_vertical_big {
+ get {
+ object obj = ResourceManager.GetObject("layout_vertical_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap layout_vertical_small {
+ get {
+ object obj = ResourceManager.GetObject("layout_vertical_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema that collects properties to be assigned to the Links within Diagrams..
+ ///
+ internal static string LinksPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("LinksPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap list_style_numbered {
+ get {
+ object obj = ResourceManager.GetObject("list_style_numbered", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap list_style_numbered_big {
+ get {
+ object obj = ResourceManager.GetObject("list_style_numbered_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap list_style_numbered_huge {
+ get {
+ object obj = ResourceManager.GetObject("list_style_numbered_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap list_style_numbered_small {
+ get {
+ object obj = ResourceManager.GetObject("list_style_numbered_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap magic_wand {
+ get {
+ object obj = ResourceManager.GetObject("magic_wand", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap magic_wand_big {
+ get {
+ object obj = ResourceManager.GetObject("magic_wand_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap magic_wand_huge {
+ get {
+ object obj = ResourceManager.GetObject("magic_wand_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap magic_wand_small {
+ get {
+ object obj = ResourceManager.GetObject("magic_wand_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap map_roads {
+ get {
+ object obj = ResourceManager.GetObject("map_roads", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap map_roads_big {
+ get {
+ object obj = ResourceManager.GetObject("map_roads_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap map_roads_huge {
+ get {
+ object obj = ResourceManager.GetObject("map_roads_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap map_roads_small {
+ get {
+ object obj = ResourceManager.GetObject("map_roads_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to You are requesting to get full edit access to the Property Schemas.
+ ///Please note that editing System Property Schemas is a risky action and is not supported: you may cause your Threat Model to become unreadable.
+ ///It is recommended to create backup of the Threat Model before proceeding further.
+ ///
+ ///Are you sure you want still to get full access rights? .
+ ///
+ internal static string MessagePromote {
+ get {
+ return ResourceManager.GetString("MessagePromote", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to You are requesting to get full edit access to Severities.
+ ///Please note that removing Severities is a risky action and is not supported: you may even compromise your Threat Model's integrity.
+ ///It is recommended to create backup of the Threat Model before proceeding further.
+ ///
+ ///Are you sure you want still to get full access rights? .
+ ///
+ internal static string MessagePromoteSeverities {
+ get {
+ return ResourceManager.GetString("MessagePromoteSeverities", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Parameter '{0}' is missing..
+ ///
+ internal static string MissingParameterError {
+ get {
+ return ResourceManager.GetString("MissingParameterError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap model_big_up {
+ get {
+ object obj = ResourceManager.GetObject("model_big_up", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap model_huge_up {
+ get {
+ object obj = ResourceManager.GetObject("model_huge_up", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap model_small_up {
+ get {
+ object obj = ResourceManager.GetObject("model_small_up", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap model_up {
+ get {
+ object obj = ResourceManager.GetObject("model_up", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap money_bill_fire {
+ get {
+ object obj = ResourceManager.GetObject("money_bill_fire", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap money_bill_fire_big {
+ get {
+ object obj = ResourceManager.GetObject("money_bill_fire_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap money_bill_fire_huge {
+ get {
+ object obj = ResourceManager.GetObject("money_bill_fire_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap money_bill_fire_small {
+ get {
+ object obj = ResourceManager.GetObject("money_bill_fire_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap nav_refresh {
+ get {
+ object obj = ResourceManager.GetObject("nav_refresh", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap nav_refresh_big {
+ get {
+ object obj = ResourceManager.GetObject("nav_refresh_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap nav_refresh_huge {
+ get {
+ object obj = ResourceManager.GetObject("nav_refresh_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap nav_refresh_small {
+ get {
+ object obj = ResourceManager.GetObject("nav_refresh_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap note_text {
+ get {
+ object obj = ResourceManager.GetObject("note_text", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap note_text_big {
+ get {
+ object obj = ResourceManager.GetObject("note_text_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap note_text_huge {
+ get {
+ object obj = ResourceManager.GetObject("note_text_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap note_text_small {
+ get {
+ object obj = ResourceManager.GetObject("note_text_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap odometer {
+ get {
+ object obj = ResourceManager.GetObject("odometer", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap odometer_big {
+ get {
+ object obj = ResourceManager.GetObject("odometer_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap odometer_huge {
+ get {
+ object obj = ResourceManager.GetObject("odometer_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap odometer_small {
+ get {
+ object obj = ResourceManager.GetObject("odometer_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Parent is not aligned. Please move the shape to the correct parent..
+ ///
+ internal static string ParentAlignmentWarning {
+ get {
+ return ResourceManager.GetString("ParentAlignmentWarning", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap paste {
+ get {
+ object obj = ResourceManager.GetObject("paste", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap paste_big {
+ get {
+ object obj = ResourceManager.GetObject("paste_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap paste_huge {
+ get {
+ object obj = ResourceManager.GetObject("paste_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap paste_small {
+ get {
+ object obj = ResourceManager.GetObject("paste_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap pdf {
+ get {
+ object obj = ResourceManager.GetObject("pdf", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap pdf_big {
+ get {
+ object obj = ResourceManager.GetObject("pdf_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap pdf_huge {
+ get {
+ object obj = ResourceManager.GetObject("pdf_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap pdf_small {
+ get {
+ object obj = ResourceManager.GetObject("pdf_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap presentation_pie_chart {
+ get {
+ object obj = ResourceManager.GetObject("presentation_pie_chart", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap presentation_pie_chart_big {
+ get {
+ object obj = ResourceManager.GetObject("presentation_pie_chart_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap presentation_pie_chart_huge {
+ get {
+ object obj = ResourceManager.GetObject("presentation_pie_chart_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap presentation_pie_chart_small {
+ get {
+ object obj = ResourceManager.GetObject("presentation_pie_chart_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties {
+ get {
+ object obj = ResourceManager.GetObject("properties", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties_big {
+ get {
+ object obj = ResourceManager.GetObject("properties_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties_big_delete {
+ get {
+ object obj = ResourceManager.GetObject("properties_big_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties_big_new {
+ get {
+ object obj = ResourceManager.GetObject("properties_big_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties_delete {
+ get {
+ object obj = ResourceManager.GetObject("properties_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties_huge {
+ get {
+ object obj = ResourceManager.GetObject("properties_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties_huge_delete {
+ get {
+ object obj = ResourceManager.GetObject("properties_huge_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties_huge_new {
+ get {
+ object obj = ResourceManager.GetObject("properties_huge_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties_new {
+ get {
+ object obj = ResourceManager.GetObject("properties_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties_small {
+ get {
+ object obj = ResourceManager.GetObject("properties_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties_small_delete {
+ get {
+ object obj = ResourceManager.GetObject("properties_small_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap properties_small_new {
+ get {
+ object obj = ResourceManager.GetObject("properties_small_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property {
+ get {
+ object obj = ResourceManager.GetObject("property", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property_big {
+ get {
+ object obj = ResourceManager.GetObject("property_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property_big_delete {
+ get {
+ object obj = ResourceManager.GetObject("property_big_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property_big_new {
+ get {
+ object obj = ResourceManager.GetObject("property_big_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property_delete {
+ get {
+ object obj = ResourceManager.GetObject("property_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property_huge {
+ get {
+ object obj = ResourceManager.GetObject("property_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property_huge_delete {
+ get {
+ object obj = ResourceManager.GetObject("property_huge_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property_huge_new {
+ get {
+ object obj = ResourceManager.GetObject("property_huge_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property_new {
+ get {
+ object obj = ResourceManager.GetObject("property_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property_small {
+ get {
+ object obj = ResourceManager.GetObject("property_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property_small_delete {
+ get {
+ object obj = ResourceManager.GetObject("property_small_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap property_small_new {
+ get {
+ object obj = ResourceManager.GetObject("property_small_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Widths of the Columns. It applies to Word Reporting..
+ ///
+ internal static string PropertyColumnWidths {
+ get {
+ return ResourceManager.GetString("PropertyColumnWidths", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Reference Dpi factor for the Diagram..
+ ///
+ internal static string PropertyDpiFactor {
+ get {
+ return ResourceManager.GetString("PropertyDpiFactor", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Estimated effort for implementing the Mitigation..
+ ///
+ internal static string PropertyEffort {
+ get {
+ return ResourceManager.GetString("PropertyEffort", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Selected fields for the Excel reporting Extension..
+ ///
+ internal static string PropertyExcelSelectedFields {
+ get {
+ return ResourceManager.GetString("PropertyExcelSelectedFields", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to List of hidden properties, not to be created in the Capec Property Schema. .
+ ///
+ internal static string PropertyHiddenProperties {
+ get {
+ return ResourceManager.GetString("PropertyHiddenProperties", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Horizontal spacing to use for the Diagram automatic layout function..
+ ///
+ internal static string PropertyHorizontalSpacing {
+ get {
+ return ResourceManager.GetString("PropertyHorizontalSpacing", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Fields to be ignored for the Lists. It applies to Word Reporting..
+ ///
+ internal static string PropertyIgnoredListFields {
+ get {
+ return ResourceManager.GetString("PropertyIgnoredListFields", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Keywords associated to the Threat Type or Event. This is used to improve the results while Searching for Threats..
+ ///
+ internal static string PropertyKeywords {
+ get {
+ return ResourceManager.GetString("PropertyKeywords", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Reference points for the link..
+ ///
+ internal static string PropertyPoints {
+ get {
+ return ResourceManager.GetString("PropertyPoints", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Status of the Mitigation for the Roadmap..
+ ///
+ internal static string PropertyRoadmap {
+ get {
+ return ResourceManager.GetString("PropertyRoadmap", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Vertical spacing to use for the Diagram automatic layout function..
+ ///
+ internal static string PropertyVerticalSpacing {
+ get {
+ return ResourceManager.GetString("PropertyVerticalSpacing", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Path name of the file used as seed for Word Report generation..
+ ///
+ internal static string PropertyWordDocumentPath {
+ get {
+ return ResourceManager.GetString("PropertyWordDocumentPath", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Configuration of the Sections for Word Report generation..
+ ///
+ internal static string PropertyWordSections {
+ get {
+ return ResourceManager.GetString("PropertyWordSections", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap question_and_answer {
+ get {
+ object obj = ResourceManager.GetObject("question_and_answer", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap question_and_answer_big {
+ get {
+ object obj = ResourceManager.GetObject("question_and_answer_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap question_and_answer_huge {
+ get {
+ object obj = ResourceManager.GetObject("question_and_answer_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap question_and_answer_small {
+ get {
+ object obj = ResourceManager.GetObject("question_and_answer_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap red_chart_pie {
+ get {
+ object obj = ResourceManager.GetObject("red_chart_pie", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap red_chart_pie_big {
+ get {
+ object obj = ResourceManager.GetObject("red_chart_pie_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap red_chart_pie_huge {
+ get {
+ object obj = ResourceManager.GetObject("red_chart_pie_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap red_chart_pie_small {
+ get {
+ object obj = ResourceManager.GetObject("red_chart_pie_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to You are about to remove '{0}' from the Threat Model. Are you sure?.
+ ///
+ internal static string RemoveIdentityFromModel {
+ get {
+ return ResourceManager.GetString("RemoveIdentityFromModel", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap report_problem {
+ get {
+ object obj = ResourceManager.GetObject("report_problem", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap report_problem_big {
+ get {
+ object obj = ResourceManager.GetObject("report_problem_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap report_problem_huge {
+ get {
+ object obj = ResourceManager.GetObject("report_problem_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap report_problem_small {
+ get {
+ object obj = ResourceManager.GetObject("report_problem_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema that collects properties used to configure the Reporting Extensions..
+ ///
+ internal static string ReportingConfigPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("ReportingConfigPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema that collects the configuration of the selected Residual Risk Estimator..
+ ///
+ internal static string ResidualRiskEstimatorConfigurationPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("ResidualRiskEstimatorConfigurationPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema to store the Roadmap Status for Mitigations..
+ ///
+ internal static string RoadmapPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("RoadmapPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp_big {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp_big_delete {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp_big_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp_big_new {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp_big_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp_delete {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp_huge {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp_huge_delete {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp_huge_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp_huge_new {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp_huge_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp_new {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp_small {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp_small_delete {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp_small_delete", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap rubber_stamp_small_new {
+ get {
+ object obj = ResourceManager.GetObject("rubber_stamp_small_new", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap school {
+ get {
+ object obj = ResourceManager.GetObject("school", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap school_big {
+ get {
+ object obj = ResourceManager.GetObject("school_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap school_huge {
+ get {
+ object obj = ResourceManager.GetObject("school_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap school_small {
+ get {
+ object obj = ResourceManager.GetObject("school_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap selected_graph_star {
+ get {
+ object obj = ResourceManager.GetObject("selected_graph_star", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap selected_graph_star_big {
+ get {
+ object obj = ResourceManager.GetObject("selected_graph_star_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap selected_graph_star_huge {
+ get {
+ object obj = ResourceManager.GetObject("selected_graph_star_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap selected_graph_star_small {
+ get {
+ object obj = ResourceManager.GetObject("selected_graph_star_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Shape does not refer to an Entity..
+ ///
+ internal static string ShapeNotEntityError {
+ get {
+ return ResourceManager.GetString("ShapeNotEntityError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Shape does not refer to a Group..
+ ///
+ internal static string ShapeNotGroupError {
+ get {
+ return ResourceManager.GetString("ShapeNotGroupError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap shapes {
+ get {
+ object obj = ResourceManager.GetObject("shapes", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap shapes_big {
+ get {
+ object obj = ResourceManager.GetObject("shapes_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap shapes_huge {
+ get {
+ object obj = ResourceManager.GetObject("shapes_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap shapes_small {
+ get {
+ object obj = ResourceManager.GetObject("shapes_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap shelf_full {
+ get {
+ object obj = ResourceManager.GetObject("shelf_full", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap shelf_full_big {
+ get {
+ object obj = ResourceManager.GetObject("shelf_full_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap shelf_full_huge {
+ get {
+ object obj = ResourceManager.GetObject("shelf_full_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap shelf_full_small {
+ get {
+ object obj = ResourceManager.GetObject("shelf_full_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap signpost_two {
+ get {
+ object obj = ResourceManager.GetObject("signpost_two", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap signpost_two_big {
+ get {
+ object obj = ResourceManager.GetObject("signpost_two_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap signpost_two_huge {
+ get {
+ object obj = ResourceManager.GetObject("signpost_two_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap signpost_two_small {
+ get {
+ object obj = ResourceManager.GetObject("signpost_two_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap table {
+ get {
+ object obj = ResourceManager.GetObject("table", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap table_big {
+ get {
+ object obj = ResourceManager.GetObject("table_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap table_huge {
+ get {
+ object obj = ResourceManager.GetObject("table_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap table_small {
+ get {
+ object obj = ResourceManager.GetObject("table_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tag {
+ get {
+ object obj = ResourceManager.GetObject("tag", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tag_big {
+ get {
+ object obj = ResourceManager.GetObject("tag_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tag_huge {
+ get {
+ object obj = ResourceManager.GetObject("tag_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tag_small {
+ get {
+ object obj = ResourceManager.GetObject("tag_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap text {
+ get {
+ object obj = ResourceManager.GetObject("text", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap text_big {
+ get {
+ object obj = ResourceManager.GetObject("text_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap text_huge {
+ get {
+ object obj = ResourceManager.GetObject("text_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap text_small {
+ get {
+ object obj = ResourceManager.GetObject("text_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap threat_selection {
+ get {
+ object obj = ResourceManager.GetObject("threat_selection", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap threat_selection_big {
+ get {
+ object obj = ResourceManager.GetObject("threat_selection_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap threat_selection_huge {
+ get {
+ object obj = ResourceManager.GetObject("threat_selection_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap threat_selection_small {
+ get {
+ object obj = ResourceManager.GetObject("threat_selection_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema that collects properties used to configure the standard Extensions within the Threat Model. .
+ ///
+ internal static string ThreatModelConfigPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("ThreatModelConfigPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap threats_selection {
+ get {
+ object obj = ResourceManager.GetObject("threats_selection", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap threats_selection_big {
+ get {
+ object obj = ResourceManager.GetObject("threats_selection_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap threats_selection_huge {
+ get {
+ object obj = ResourceManager.GetObject("threats_selection_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap threats_selection_small {
+ get {
+ object obj = ResourceManager.GetObject("threats_selection_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema that collects additional generic properties for Threat Types and Events..
+ ///
+ internal static string ThreatsPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("ThreatsPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tower_crane {
+ get {
+ object obj = ResourceManager.GetObject("tower_crane", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tower_crane_big {
+ get {
+ object obj = ResourceManager.GetObject("tower_crane_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tower_crane_huge {
+ get {
+ object obj = ResourceManager.GetObject("tower_crane_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tower_crane_small {
+ get {
+ object obj = ResourceManager.GetObject("tower_crane_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tower_crane_stop {
+ get {
+ object obj = ResourceManager.GetObject("tower_crane_stop", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tower_crane_stop_big {
+ get {
+ object obj = ResourceManager.GetObject("tower_crane_stop_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tower_crane_stop_huge {
+ get {
+ object obj = ResourceManager.GetObject("tower_crane_stop_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tower_crane_stop_small {
+ get {
+ object obj = ResourceManager.GetObject("tower_crane_stop_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tt_chart_pie {
+ get {
+ object obj = ResourceManager.GetObject("tt_chart_pie", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tt_chart_pie_big {
+ get {
+ object obj = ResourceManager.GetObject("tt_chart_pie_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tt_chart_pie_huge {
+ get {
+ object obj = ResourceManager.GetObject("tt_chart_pie_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap tt_chart_pie_small {
+ get {
+ object obj = ResourceManager.GetObject("tt_chart_pie_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap undo {
+ get {
+ object obj = ResourceManager.GetObject("undo", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap undo_big {
+ get {
+ object obj = ResourceManager.GetObject("undo_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap undo_huge {
+ get {
+ object obj = ResourceManager.GetObject("undo_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap undo_small {
+ get {
+ object obj = ResourceManager.GetObject("undo_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to File '{0}' has an unsupported type..
+ ///
+ internal static string UnsupportedFileTypeError {
+ get {
+ return ResourceManager.GetString("UnsupportedFileTypeError", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap view_1_1 {
+ get {
+ object obj = ResourceManager.GetObject("view_1_1", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap view_1_1_big {
+ get {
+ object obj = ResourceManager.GetObject("view_1_1_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap view_1_1_huge {
+ get {
+ object obj = ResourceManager.GetObject("view_1_1_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap view_1_1_small {
+ get {
+ object obj = ResourceManager.GetObject("view_1_1_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap window_size {
+ get {
+ object obj = ResourceManager.GetObject("window_size", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap window_size_big {
+ get {
+ object obj = ResourceManager.GetObject("window_size_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap window_size_huge {
+ get {
+ object obj = ResourceManager.GetObject("window_size_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap window_size_small {
+ get {
+ object obj = ResourceManager.GetObject("window_size_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized string similar to Property Schema that collects properties required for the Word Reporting feature..
+ ///
+ internal static string WordPropertySchemaDescription {
+ get {
+ return ResourceManager.GetString("WordPropertySchemaDescription", resourceCulture);
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap xlsx {
+ get {
+ object obj = ResourceManager.GetObject("xlsx", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap xlsx_big {
+ get {
+ object obj = ResourceManager.GetObject("xlsx_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap xlsx_huge {
+ get {
+ object obj = ResourceManager.GetObject("xlsx_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap xlsx_small {
+ get {
+ object obj = ResourceManager.GetObject("xlsx_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap zoom_in {
+ get {
+ object obj = ResourceManager.GetObject("zoom_in", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap zoom_in_big {
+ get {
+ object obj = ResourceManager.GetObject("zoom_in_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap zoom_in_huge {
+ get {
+ object obj = ResourceManager.GetObject("zoom_in_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap zoom_in_small {
+ get {
+ object obj = ResourceManager.GetObject("zoom_in_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap zoom_out {
+ get {
+ object obj = ResourceManager.GetObject("zoom_out", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap zoom_out_big {
+ get {
+ object obj = ResourceManager.GetObject("zoom_out_big", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap zoom_out_huge {
+ get {
+ object obj = ResourceManager.GetObject("zoom_out_huge", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+
+ ///
+ /// Looks up a localized resource of type System.Drawing.Bitmap.
+ ///
+ internal static System.Drawing.Bitmap zoom_out_small {
+ get {
+ object obj = ResourceManager.GetObject("zoom_out_small", resourceCulture);
+ return ((System.Drawing.Bitmap)(obj));
+ }
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Properties/Resources.resx b/Sources/Extensions/ThreatsManager.Extensions/Properties/Resources.resx
new file mode 100644
index 00000000..67eb580e
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Properties/Resources.resx
@@ -0,0 +1,254 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ text/microsoft-resx
+
+
+ 2.0
+
+
+ System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+
+ Shape does not refer to an Entity.
+
+
+ Shape does not refer to a Group.
+
+
+ Diagram is not associated to a Model.
+
+
+ http://capec.mitre.org/data/xml/capec_v2.10.xml
+
+
+ http://cwe.mitre.org/data/xml/cwec_v2.10.xml.zip
+
+
+ Parameter '{0}' is missing.
+
+
+ File '{0}' has an unsupported type.
+
+
+ Property Schema that collects the properties returned by Capec and applies to Threat Types and Events.
+
+
+ https://www.simoneonsecurity.com/tm/2018
+
+
+ Property Schema that collects additional generic properties for Threat Types and Events.
+
+
+ You are about to delete {0} objects. Do you confirm?
+
+
+ Deleting objects
+
+
+ Property Schema that collects properties to configure Capec. It is dynamically generated based on the selected properties from Capec data source.
+
+
+ You are about to remove '{0}' from the Threat Model. Are you sure?
+
+
+ Delete from Model
+
+
+ Parent is not aligned. Please move the shape to the correct parent.
+
+
+ List of hidden properties, not to be created in the Capec Property Schema.
+
+
+ Property Schema that collects properties used to configure the standard Extensions within the Threat Model.
+
+
+ Horizontal spacing to use for the Diagram automatic layout function.
+
+
+ Vertical spacing to use for the Diagram automatic layout function.
+
+
+ Reference points for the link.
+
+
+ Selected fields for the Excel reporting Extension.
+
+
+ Property Schema that collects properties used to configure the Reporting Extensions.
+
+
+ Path name of the file used as seed for Word Report generation.
+
+
+ Configuration of the Sections for Word Report generation.
+
+
+ Property Schema that collects properties required for the Word Reporting feature.
+
+
+ Widths of the Columns. It applies to Word Reporting.
+
+
+ Fields to be ignored for the Lists. It applies to Word Reporting.
+
+
+ Identifier of the Diagram associated to the Entity.
+
+
+ Property Schema that collects properties to manage Diagrams associated to Entities.
+
+
+ Identifier of the Entity associated to the Diagram.
+
+
+ Property Schema that collects properties to manage Entities associated to Diagrams.
+
+
+ You are requesting to get full edit access to the Property Schemas.
+Please note that editing System Property Schemas is a risky action and is not supported: you may cause your Threat Model to become unreadable.
+It is recommended to create backup of the Threat Model before proceeding further.
+
+Are you sure you want still to get full access rights?
+
+
+ Property Schema to represent the Effort required to implement mitigations.
+
+
+ Estimated effort for implementing the Mitigation.
+
+
+ Status of the Mitigation for the Roadmap.
+
+
+ Property Schema to store the Roadmap Status for Mitigations.
+
+
+ Property Schema that collects the configuration of the selected Residual Risk Estimator.
+
+
+ Property Schema that collects properties to be assigned to the Diagrams.
+
+
+ Property Schema that collects properties to be assigned to the Links within Diagrams.
+
+
+ Reference Dpi factor for the Diagram.
+
+
+ You are requesting to get full edit access to Severities.
+Please note that removing Severities is a risky action and is not supported: you may even compromise your Threat Model's integrity.
+It is recommended to create backup of the Threat Model before proceeding further.
+
+Are you sure you want still to get full access rights?
+
+
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Properties/launchSettings.json b/Sources/Extensions/ThreatsManager.Extensions/Properties/launchSettings.json
new file mode 100644
index 00000000..d26858e0
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Properties/launchSettings.json
@@ -0,0 +1,8 @@
+{
+ "profiles": {
+ "ThreatsManager.Extensions": {
+ "commandName": "Executable",
+ "executablePath": "C:\\src\\Threats Manager Platform\\Dev\\ThreatsManager\\bin\\Debug\\ThreatsManager.exe"
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/ResidualRiskEstimators/BugBarResidualRiskEstimator.cs b/Sources/Extensions/ThreatsManager.Extensions/ResidualRiskEstimators/BugBarResidualRiskEstimator.cs
new file mode 100644
index 00000000..7b3ab047
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/ResidualRiskEstimators/BugBarResidualRiskEstimator.cs
@@ -0,0 +1,207 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Composition;
+using System.Linq;
+using System.Text.RegularExpressions;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.ResidualRiskEstimators
+{
+ [Export(typeof(IResidualRiskEstimator))]
+ [ExportMetadata("Id", "C1F10EC7-FF20-4FE5-99EC-2DBF3C1BC216")]
+ [ExportMetadata("Label", "Bug Bar Residual Risk Estimator")]
+ [ExportMetadata("Priority", 10)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Business)]
+ public class BugBarResidualRiskEstimator : IResidualRiskEstimator
+ {
+ class MitigationWeight
+ {
+ public MitigationWeight(Guid mitigationId, int effectiveness)
+ {
+ MitigationId = mitigationId;
+ Effectiveness = effectiveness;
+ }
+
+ public Guid MitigationId { get; private set; }
+ public int Effectiveness { get; set; }
+ }
+
+ public float DefaultInfinite => 10f;
+
+ public float Estimate([NotNull] IThreatModel model, IEnumerable mitigations, out float min, out float max)
+ {
+ float result = 0f;
+
+ var threatEvents = model.GetThreatEvents()?.ToArray();
+ if (threatEvents?.Any() ?? false)
+ {
+ foreach (var threatEvent in threatEvents)
+ {
+ var risk = (float)threatEvent.SeverityId;
+ var mitigationsStrength = threatEvent.Mitigations?
+ .Where(x => (x.Status != MitigationStatus.Existing) &&
+ (x.Status != MitigationStatus.Implemented) &&
+ (mitigations?.Any(y => y == x.MitigationId) ?? false))
+ .Sum(x => x.StrengthId);
+ result += risk * (100f - Math.Min((mitigationsStrength ?? 0), 100f)) / 100f;
+ }
+ }
+
+ min = result * 0.9f;
+ max = result * 1.1f;
+
+ return result;
+ }
+
+ public IDictionary CategorizeMitigations([NotNull] IThreatModel model)
+ {
+ IDictionary result = null;
+
+ var mitigations = model.GetUniqueMitigations()?
+ .Select(x => new MitigationWeight(x.Id, CalculateMitigationEffectiveness(model, x)))
+ .OrderByDescending(x => x.Effectiveness)
+ .ToArray();
+ if (mitigations?.Any() ?? false)
+ {
+ var list = new Dictionary();
+
+ int count = mitigations.Length / 3;
+ int i = 0;
+ foreach (var mitigation in mitigations)
+ {
+ var pos = Math.DivRem(i, count, out var remainder);
+ i++;
+ Effectiveness effectiveness;
+ if (mitigation.Effectiveness == 0)
+ effectiveness = Effectiveness.Minor;
+ else
+ switch (pos)
+ {
+ case 0:
+ effectiveness = Effectiveness.Major;
+ break;
+ case 1:
+ effectiveness = Effectiveness.Average;
+ break;
+ default:
+ effectiveness = Effectiveness.Minor;
+ break;
+ }
+
+ list.Add(mitigation.MitigationId, effectiveness);
+ }
+
+ result = list;
+ }
+
+ return result;
+ }
+
+ public IDictionary GetProjectedThreatTypesResidualRisk(IThreatModel model, IEnumerable mitigations)
+ {
+ IDictionary result = null;
+
+ var threatEvents = model.GetThreatEvents()?.ToArray();
+ if (threatEvents?.Any() ?? false)
+ {
+ var dict = new Dictionary();
+
+ foreach (var threatEvent in threatEvents)
+ {
+ var mitigationsStrength = threatEvent.Mitigations?
+ .Where(x => (x.Status != MitigationStatus.Existing) &&
+ (x.Status != MitigationStatus.Implemented) &&
+ (mitigations?.Any(y => y == x.MitigationId) ?? false))
+ .Sum(x => x.StrengthId);
+ var newSeverity = model.GetMappedSeverity(
+ Convert.ToInt32(((float)threatEvent.SeverityId) *
+ (100f - Math.Min((mitigationsStrength ?? 0), 100f)) / 100f));
+
+ if (newSeverity != null)
+ {
+ var newSeverityId = newSeverity.Id == 0 ? (int) DefaultSeverity.Info : newSeverity.Id;
+ if (dict.ContainsKey(threatEvent.ThreatTypeId))
+ {
+ if (dict[threatEvent.ThreatTypeId] < newSeverityId)
+ dict[threatEvent.ThreatTypeId] = newSeverityId;
+ }
+ else
+ {
+ dict[threatEvent.ThreatTypeId] = newSeverityId;
+ }
+ }
+ }
+
+ result = dict;
+ }
+
+ return result;
+ }
+
+ private int CalculateMitigationEffectiveness([NotNull] IThreatModel model, [NotNull] IMitigation mitigation)
+ {
+ int result = 0;
+
+ var threats = model.GetThreatEvents()?
+ .Where(x => x.Mitigations?.Any(y =>
+ y.MitigationId == mitigation.Id && y.Status != MitigationStatus.Implemented &&
+ y.Status != MitigationStatus.Existing) ?? false)
+ .ToArray();
+ if (threats?.Any() ?? false)
+ {
+ foreach (var threat in threats)
+ {
+ var threatMitigation = threat.Mitigations.First(x => x.MitigationId == mitigation.Id);
+ result += threatMitigation.StrengthId * threat.SeverityId;
+ }
+ }
+
+ return result;
+ }
+
+ public IEnumerable GetAcceptableRiskParameters([NotNull] IThreatModel model)
+ {
+ return model.Severities?.Where(x => x.Visible && x.Id > 0)
+ .Select(x => $"Maximum {x.Name} Severity Threat Events count").ToArray();
+ }
+
+ public float GetAcceptableRisk([NotNull] IThreatModel model,
+ IDictionary parameters, float infinite)
+ {
+ float result = 0f;
+
+ var severities = model.Severities?.ToArray();
+ if ((parameters?.Any() ?? false) && (severities?.Any() ?? false))
+ {
+ var regex = new Regex("Maximum (?'severity'.*) Severity Threat Events count");
+ foreach (var parameter in parameters)
+ {
+ var match = regex.Match(parameter.Key);
+ if (match.Success)
+ {
+ var severityName = match.Groups["severity"].Value;
+ var severity = severities.FirstOrDefault(x => string.CompareOrdinal(x.Name, severityName) == 0);
+ if (severity != null)
+ {
+ result += severity.Id *
+ (parameter.Value < 0 ? infinite : Math.Min(parameter.Value, infinite));
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public override string ToString()
+ {
+ return this.GetExtensionLabel();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Schemas/AssociatedDiagramPropertySchemaManager.cs b/Sources/Extensions/ThreatsManager.Extensions/Schemas/AssociatedDiagramPropertySchemaManager.cs
new file mode 100644
index 00000000..e098ed8b
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Schemas/AssociatedDiagramPropertySchemaManager.cs
@@ -0,0 +1,57 @@
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Extensions.Properties;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Properties;
+
+namespace ThreatsManager.Extensions.Schemas
+{
+ public class AssociatedDiagramPropertySchemaManager
+ {
+ private const string SchemaName = "Associated Diagram for Entities";
+
+ private readonly IThreatModel _model;
+
+ public AssociatedDiagramPropertySchemaManager([NotNull] IThreatModel model)
+ {
+ _model = model;
+ }
+
+ public IPropertySchema GetSchema()
+ {
+ var result = _model.GetSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ if (result == null)
+ {
+ result = _model.AddSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ result.AppliesTo = Scope.Entity;
+ result.AutoApply = true;
+ result.Priority = 10;
+ result.Visible = true;
+ result.System = true;
+ result.Description = Resources.AssociatedDiagramPropertySchemaDescription;
+ }
+
+ return result;
+ }
+
+ public IPropertyType GetAssociatedDiagramIdPropertyType()
+ {
+ IPropertyType result = null;
+
+ var schema = GetSchema();
+ if (schema != null)
+ {
+ result = schema.GetPropertyType("Associated Diagram");
+ if (result == null)
+ {
+ result =
+ schema.AddPropertyType("Associated Diagram", PropertyValueType.IdentityReference);
+ result.Visible = true;
+ result.Description = Resources.AssociatedDiagram;
+ }
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Schemas/ModelConfigPropertySchemaManager.cs b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ModelConfigPropertySchemaManager.cs
new file mode 100644
index 00000000..53423a67
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ModelConfigPropertySchemaManager.cs
@@ -0,0 +1,55 @@
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Extensions.Properties;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Properties;
+
+namespace ThreatsManager.Extensions.Schemas
+{
+ public class ModelConfigPropertySchemaManager
+ {
+ private const string SchemaName = "Standard Extensions Configuration";
+
+ private readonly IThreatModel _model;
+
+ public ModelConfigPropertySchemaManager([NotNull] IThreatModel model)
+ {
+ _model = model;
+ }
+
+ public IPropertySchema GetSchema()
+ {
+ var result = _model.GetSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ if (result == null)
+ {
+ result = _model.AddSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ result.AppliesTo = Scope.ThreatModel;
+ result.AutoApply = true;
+ result.Priority = 10;
+ result.Visible = false;
+ result.System = true;
+ result.Description = Resources.ThreatModelConfigPropertySchemaDescription;
+ }
+
+ var horizontalSpacing = result.GetPropertyType("Diagram Layout Horizontal Spacing");
+ if (horizontalSpacing == null)
+ {
+ horizontalSpacing =
+ result.AddPropertyType("Diagram Layout Horizontal Spacing", PropertyValueType.Integer);
+ horizontalSpacing.Visible = false;
+ horizontalSpacing.Description = Resources.PropertyHorizontalSpacing;
+ }
+
+ var verticalSpacing = result.GetPropertyType("Diagram Layout Vertical Spacing");
+ if (verticalSpacing == null)
+ {
+ verticalSpacing =
+ result.AddPropertyType("Diagram Layout Vertical Spacing", PropertyValueType.Integer);
+ verticalSpacing.Visible = false;
+ verticalSpacing.Description = Resources.PropertyVerticalSpacing;
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Schemas/ReportingConfigPropertySchemaManager.cs b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ReportingConfigPropertySchemaManager.cs
new file mode 100644
index 00000000..1fc33234
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ReportingConfigPropertySchemaManager.cs
@@ -0,0 +1,61 @@
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Extensions.Properties;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Properties;
+
+namespace ThreatsManager.Extensions.Schemas
+{
+ public class ReportingConfigPropertySchemaManager
+ {
+ private const string SchemaName = "Reporting Extensions Configuration";
+
+ private readonly IThreatModel _model;
+
+ public ReportingConfigPropertySchemaManager([NotNull] IThreatModel model)
+ {
+ _model = model;
+ }
+
+ public IPropertySchema GetSchema()
+ {
+ var result = _model.GetSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ if (result == null)
+ {
+ result = _model.AddSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ result.AppliesTo = Scope.ThreatModel;
+ result.AutoApply = true;
+ result.Priority = 10;
+ result.Visible = false;
+ result.System = true;
+ result.Description = Resources.ReportingConfigPropertySchemaDescription;
+ }
+
+ var excelSelectedFields = result.GetPropertyType("ExcelSelectedFields");
+ if (excelSelectedFields == null)
+ {
+ excelSelectedFields = result.AddPropertyType("ExcelSelectedFields", PropertyValueType.Array);
+ excelSelectedFields.Visible = false;
+ excelSelectedFields.Description = Resources.PropertyExcelSelectedFields;
+ }
+
+ var wordDocumentPath = result.GetPropertyType("WordDocumentPath");
+ if (wordDocumentPath == null)
+ {
+ wordDocumentPath = result.AddPropertyType("WordDocumentPath", PropertyValueType.SingleLineString);
+ wordDocumentPath.Visible = false;
+ wordDocumentPath.Description = Resources.PropertyWordDocumentPath;
+ }
+
+ var wordSections = result.GetPropertyType("WordSections");
+ if (wordSections == null)
+ {
+ wordSections = result.AddPropertyType("WordSections", PropertyValueType.JsonSerializableObject);
+ wordSections.Visible = false;
+ wordSections.Description = Resources.PropertyWordSections;
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Schemas/ResidualRiskEstimatorConfiguration.cs b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ResidualRiskEstimatorConfiguration.cs
new file mode 100644
index 00000000..8259f7fe
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ResidualRiskEstimatorConfiguration.cs
@@ -0,0 +1,15 @@
+using System.Collections.Generic;
+using Newtonsoft.Json;
+
+namespace ThreatsManager.Extensions.Schemas
+{
+ ///
+ /// Configuration of the Residual Risk Estimator.
+ ///
+ [JsonObject(MemberSerialization.OptIn)]
+ public class ResidualRiskEstimatorConfiguration
+ {
+ [JsonProperty("parameters")]
+ public List Parameters { get; set; }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Schemas/ResidualRiskEstimatorParameter.cs b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ResidualRiskEstimatorParameter.cs
new file mode 100644
index 00000000..446b981a
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ResidualRiskEstimatorParameter.cs
@@ -0,0 +1,17 @@
+using Newtonsoft.Json;
+
+namespace ThreatsManager.Extensions.Schemas
+{
+ ///
+ /// Residual Risk Estimator Configuration parameter.
+ ///
+ [JsonObject(MemberSerialization.OptIn)]
+ public class ResidualRiskEstimatorParameter
+ {
+ [JsonProperty("name")]
+ public string Name { get; set; }
+
+ [JsonProperty("value")]
+ public float Value { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Schemas/ResidualRiskEstimatorPropertySchemaManager.cs b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ResidualRiskEstimatorPropertySchemaManager.cs
new file mode 100644
index 00000000..06944613
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ResidualRiskEstimatorPropertySchemaManager.cs
@@ -0,0 +1,225 @@
+using System.Collections.Generic;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Extensions.Properties;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Properties;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.Schemas
+{
+ public class ResidualRiskEstimatorPropertySchemaManager
+ {
+ private const string SchemaName = "Residual Risk Estimator Configuration";
+
+ private readonly IThreatModel _model;
+
+ public ResidualRiskEstimatorPropertySchemaManager([NotNull] IThreatModel model)
+ {
+ _model = model;
+ }
+
+ public IPropertySchema GetSchema()
+ {
+ var result = _model.GetSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ if (result == null)
+ {
+ result = _model.AddSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ result.AppliesTo = Scope.ThreatModel;
+ result.AutoApply = false;
+ result.Priority = 100;
+ result.Visible = false;
+ result.System = true;
+ result.Description = Resources.ResidualRiskEstimatorConfigurationPropertySchemaDescription;
+ }
+
+ return result;
+ }
+
+ public IPropertyType GetSelectedEstimatorIdPropertyType()
+ {
+ IPropertyType result = null;
+
+ var schema = GetSchema();
+ if (schema != null)
+ {
+ result = schema.GetPropertyType("Selected Estimator");
+ if (result == null)
+ {
+ result =
+ schema.AddPropertyType("Selected Estimator", PropertyValueType.SingleLineString);
+ result.Visible = false;
+ result.Description = "Extension Id of the Selected Residual Risk Estimator";
+ }
+ }
+
+ return result;
+ }
+
+ public IPropertyType GetParametersPropertyType()
+ {
+ IPropertyType result = null;
+
+ var schema = GetSchema();
+ if (schema != null)
+ {
+ result = schema.GetPropertyType("Estimator Parameters");
+ if (result == null)
+ {
+ result =
+ schema.AddPropertyType("Estimator Parameters", PropertyValueType.JsonSerializableObject);
+ result.Visible = false;
+ result.Description = "Parameters of the Selected Residual Risk Estimator";
+ }
+ }
+
+ return result;
+ }
+
+ public IPropertyType GetInfinitePropertyType()
+ {
+ IPropertyType result = null;
+
+ var schema = GetSchema();
+ if (schema != null)
+ {
+ result = schema.GetPropertyType("Infinite Cap");
+ if (result == null)
+ {
+ result =
+ schema.AddPropertyType("Infinite Cap", PropertyValueType.Decimal);
+ result.Visible = false;
+ result.Description = "Infinite Cap for the selected Residual Risk Estimator";
+ }
+ }
+
+ return result;
+ }
+
+ public IResidualRiskEstimator SelectedEstimator
+ {
+ get
+ {
+ IResidualRiskEstimator result = null;
+
+ var propertyType = GetSelectedEstimatorIdPropertyType();
+ if (propertyType != null)
+ {
+ var property = _model.GetProperty(propertyType);
+ if (property != null)
+ result = ExtensionUtils.GetExtension(property.StringValue);
+ }
+
+ return result;
+ }
+
+ set
+ {
+ var propertyType = GetSelectedEstimatorIdPropertyType();
+ if (propertyType != null)
+ {
+ var property = _model.GetProperty(propertyType);
+
+ if (property == null)
+ {
+ if (value != null)
+ {
+ _model.AddProperty(propertyType, value.GetExtensionId());
+ }
+ }
+ else
+ {
+ property.StringValue = value?.GetExtensionId();
+ }
+ }
+ }
+ }
+
+ public IEnumerable Parameters
+ {
+ get
+ {
+ IEnumerable result = null;
+
+ var propertyType = GetParametersPropertyType();
+ if (propertyType != null)
+ {
+ if (_model.GetProperty(propertyType) is IPropertyJsonSerializableObject jsonSerializableObject &&
+ jsonSerializableObject.Value is ResidualRiskEstimatorConfiguration config)
+ {
+ result = config.Parameters;
+ }
+ }
+
+ return result;
+ }
+
+ set
+ {
+ var propertyType = GetParametersPropertyType();
+ if (propertyType != null)
+ {
+ if (_model.GetProperty(propertyType) is IPropertyJsonSerializableObject property)
+ {
+ if (value == null)
+ property.Value = null;
+ else
+ {
+ property.Value = new ResidualRiskEstimatorConfiguration()
+ {
+ Parameters = new List(value)
+ };
+ }
+ }
+ else
+ {
+ if (value != null)
+ {
+ if (_model.AddProperty(propertyType, null) is IPropertyJsonSerializableObject p)
+ {
+ p.Value = new ResidualRiskEstimatorConfiguration()
+ {
+ Parameters = new List(value)
+ };
+ }
+ }
+ }
+ }
+ }
+ }
+
+ public float Infinite
+ {
+ get
+ {
+ float result = -1f;
+
+ var propertyType = GetInfinitePropertyType();
+ if (propertyType != null)
+ {
+ var property = _model.GetProperty(propertyType);
+ if (property is IPropertyDecimal decimalProperty)
+ result = (float) decimalProperty.Value;
+ }
+
+ return result;
+ }
+
+ set
+ {
+ var propertyType = GetInfinitePropertyType();
+ if (propertyType != null)
+ {
+ var property = _model.GetProperty(propertyType);
+
+ if (property == null)
+ property = _model.AddProperty(propertyType, null);
+
+ if (property is IPropertyDecimal decimalProperty)
+ decimalProperty.Value = (decimal) value;
+ }
+ }
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Schemas/RoadmapPropertySchemaManager.cs b/Sources/Extensions/ThreatsManager.Extensions/Schemas/RoadmapPropertySchemaManager.cs
new file mode 100644
index 00000000..b4146ecf
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Schemas/RoadmapPropertySchemaManager.cs
@@ -0,0 +1,56 @@
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Extensions.Properties;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Properties;
+
+namespace ThreatsManager.Extensions.Schemas
+{
+ public class RoadmapPropertySchemaManager
+ {
+ private const string SchemaName = "Roadmap";
+ private const string PropertyName = "Status";
+
+ private readonly IThreatModel _model;
+
+ public RoadmapPropertySchemaManager([NotNull] IThreatModel model)
+ {
+ _model = model;
+ }
+
+ public IPropertySchema GetSchema()
+ {
+ var result = _model.GetSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ if (result == null)
+ {
+ result = _model.AddSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ result.Description = Properties.Resources.RoadmapPropertySchemaDescription;
+ result.Visible = false;
+ result.System = true;
+ result.Priority = 10;
+ result.AutoApply = false;
+ result.AppliesTo = Scope.Mitigation;
+ }
+
+ return result;
+ }
+
+ public IPropertyType GetPropertyType()
+ {
+ IPropertyType result = null;
+
+ var schema = GetSchema();
+ if (schema != null)
+ {
+ result = schema.GetPropertyType(PropertyName);
+ if (result == null)
+ {
+ result = schema.AddPropertyType(PropertyName, PropertyValueType.SingleLineString);
+ result.Description = Resources.PropertyRoadmap;
+ }
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Schemas/ThreatsPropertySchemaManager.cs b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ThreatsPropertySchemaManager.cs
new file mode 100644
index 00000000..0903bcb0
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Schemas/ThreatsPropertySchemaManager.cs
@@ -0,0 +1,46 @@
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Extensions.Properties;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Properties;
+
+namespace ThreatsManager.Extensions.Schemas
+{
+ public class ThreatsPropertySchemaManager
+ {
+ private const string SchemaName = "Threats";
+
+ private readonly IThreatModel _model;
+
+ public ThreatsPropertySchemaManager([NotNull] IThreatModel model)
+ {
+ _model = model;
+ }
+
+ public IPropertySchema GetSchema()
+ {
+ var result = _model.GetSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ if (result == null)
+ {
+ result = _model.AddSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ result.AppliesTo = Scope.ThreatType | Scope.ThreatEvent;
+ result.AutoApply = true;
+ result.Priority = 10;
+ result.Visible = true;
+ result.System = true;
+ result.RequiredExecutionMode = ExecutionMode.Expert;
+ result.Description = Properties.Resources.ThreatsPropertySchemaDescription;
+ }
+
+ var keywords = result.GetPropertyType("Keywords");
+ if (keywords == null)
+ {
+ keywords = result.AddPropertyType("Keywords", PropertyValueType.Tokens);
+ keywords.Visible = true;
+ keywords.Description = Resources.PropertyKeywords;
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/Schemas/WordPropertySchemaManager.cs b/Sources/Extensions/ThreatsManager.Extensions/Schemas/WordPropertySchemaManager.cs
new file mode 100644
index 00000000..62ed21e5
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/Schemas/WordPropertySchemaManager.cs
@@ -0,0 +1,53 @@
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Extensions.Properties;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Properties;
+
+namespace ThreatsManager.Extensions.Schemas
+{
+ public class WordPropertySchemaManager
+ {
+ private const string SchemaName = "Word";
+
+ private readonly IThreatModel _model;
+
+ public WordPropertySchemaManager([NotNull] IThreatModel model)
+ {
+ _model = model;
+ }
+
+ public IPropertySchema GetSchema()
+ {
+ var result = _model.GetSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ if (result == null)
+ {
+ result = _model.AddSchema(SchemaName, Properties.Resources.DefaultNamespace);
+ result.AppliesTo = Scope.ThreatModel;
+ result.AutoApply = true;
+ result.Priority = 10;
+ result.Visible = false;
+ result.System = true;
+ result.Description = Properties.Resources.WordPropertySchemaDescription;
+ }
+
+ var ignoredListFields = result.GetPropertyType("IgnoredListFields");
+ if (ignoredListFields == null)
+ {
+ ignoredListFields = result.AddPropertyType("IgnoredListFields", PropertyValueType.Array);
+ ignoredListFields.Visible = false;
+ ignoredListFields.Description = Resources.PropertyIgnoredListFields;
+ }
+
+ var columnWidth = result.GetPropertyType("ColumnWidth");
+ if (columnWidth == null)
+ {
+ columnWidth = result.AddPropertyType("ColumnWidth", PropertyValueType.Array);
+ columnWidth.Visible = false;
+ columnWidth.Description = Resources.PropertyColumnWidths;
+ }
+
+ return result;
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/AssignedThreatTypeCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/AssignedThreatTypeCounter.cs
new file mode 100644
index 00000000..b45259bf
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/AssignedThreatTypeCounter.cs
@@ -0,0 +1,66 @@
+using System;
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "DF5ECD98-CF04-45A8-8025-A08EA02FEDA8")]
+ [ExportMetadata("Label", "Assigned Threat Type Counter Status Info Provider")]
+ [ExportMetadata("Priority", 27)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class AssignedThreatTypeCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+ }
+
+ public string CurrentStatus =>
+ $"Assigned Threat Types: {_model.AssignedThreatTypes}";
+
+ public string Description => "Counter of the Threat Types which are associated to at least a Threat Event.";
+
+ private void Update(IThreatEventsContainer container, IThreatEvent mitigation)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Assigned Threat Type Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/CriticalThreatEventByTypeCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/CriticalThreatEventByTypeCounter.cs
new file mode 100644
index 00000000..ec5d4c88
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/CriticalThreatEventByTypeCounter.cs
@@ -0,0 +1,88 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "14A6D89E-7B01-4093-8915-7EF3D1430D6C")]
+ [ExportMetadata("Label", "Critical Severity Threat Event by Type Counter Status Info Provider")]
+ [ExportMetadata("Priority", 45)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class CriticalByTypeThreatEventCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+
+ var modelTe = _model.ThreatEvents?.ToArray();
+ if (modelTe?.Any() ?? false)
+ {
+ foreach (var te1 in modelTe)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)te1).PropertyChanged += OnPropertyChanged;
+ }
+ }
+ }
+
+ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (sender is IThreatEvent)
+ {
+ if (e.PropertyName == "Severity") UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ public string CurrentStatus =>
+ $"Critical by Type: {_model.CountThreatEventsByType((int)DefaultSeverity.Critical)}";
+
+ public string Description => "Counter of the Threat Events by Type which have been categorized as Critical.\nThis counter counts as a single instance all Threat Events belonging to the same Threat Type having Critical as top Severity.";
+
+ private void Update([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)threatEvent).PropertyChanged += OnPropertyChanged;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Critical Severity Threat Event by Type Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/CriticalThreatEventCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/CriticalThreatEventCounter.cs
new file mode 100644
index 00000000..35269fe9
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/CriticalThreatEventCounter.cs
@@ -0,0 +1,88 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "FA4E8CC1-4EB9-459F-A766-358423765B8A")]
+ [ExportMetadata("Label", "Critical Severity Threat Event Counter Status Info Provider")]
+ [ExportMetadata("Priority", 40)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class CriticalThreatEventCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+
+ var modelTe = _model.ThreatEvents?.ToArray();
+ if (modelTe?.Any() ?? false)
+ {
+ foreach (var te1 in modelTe)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)te1).PropertyChanged += OnPropertyChanged;
+ }
+ }
+ }
+
+ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (sender is IThreatEvent)
+ {
+ if (e.PropertyName == "Severity") UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ public string CurrentStatus =>
+ $"Critical: {_model.CountThreatEvents((int)DefaultSeverity.Critical)}";
+
+ public string Description => "Counter of the Threat Events which have been categorized as Critical.";
+
+ private void Update([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)threatEvent).PropertyChanged += OnPropertyChanged;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Critical Severity Threat Event Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/DataFlowCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/DataFlowCounter.cs
new file mode 100644
index 00000000..5669a738
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/DataFlowCounter.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Entities;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "1F1A0EC1-C0F1-46DF-957E-FE2F3FC7D84A")]
+ [ExportMetadata("Label", "Flow Counter Status Info Provider")]
+ [ExportMetadata("Priority", 13)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class DataFlowCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ChildCreated += Update;
+ _model.ChildRemoved += Update;
+ }
+
+ public string CurrentStatus =>
+ $"Flows: {_model?.DataFlows?.Count() ?? 0}";
+
+ public string Description => "Counter of the Flows defined in the Threat Model.";
+
+ private void Update(IIdentity obj)
+ {
+ if (obj is IDataFlow)
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Flow Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ChildCreated -= Update;
+ _model.ChildRemoved -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/DataStoreCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/DataStoreCounter.cs
new file mode 100644
index 00000000..74cb4b1f
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/DataStoreCounter.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Entities;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "050DF7F2-0AD0-4F28-BEF4-8393358EF165")]
+ [ExportMetadata("Label", "Data Store Counter Status Info Provider")]
+ [ExportMetadata("Priority", 12)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class DataStoreCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ChildCreated += Update;
+ _model.ChildRemoved += Update;
+ }
+
+ public string CurrentStatus =>
+ $"Data Stores: {_model?.Entities?.OfType().Count() ?? 0}";
+
+ public string Description => "Counter of the Data Stores defined in the Threat Model.";
+
+ private void Update(IIdentity obj)
+ {
+ if (obj is IDataStore)
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Data Store Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ChildCreated -= Update;
+ _model.ChildRemoved -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ExternalInteractorCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ExternalInteractorCounter.cs
new file mode 100644
index 00000000..461304aa
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ExternalInteractorCounter.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Entities;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "DADF4373-6F4A-4943-ABC3-CA7B31CC1998")]
+ [ExportMetadata("Label", "External Interactor Counter Status Info Provider")]
+ [ExportMetadata("Priority", 10)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class ExternalInteractorCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ChildCreated += Update;
+ _model.ChildRemoved += Update;
+ }
+
+ public string CurrentStatus =>
+ $"External Interactors: {_model?.Entities?.OfType().Count() ?? 0}";
+
+ public string Description => "Counter of the External Interactors defined in the Threat Model.";
+
+ private void Update(IIdentity obj)
+ {
+ if (obj is IExternalInteractor)
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "External Interactors Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ChildCreated -= Update;
+ _model.ChildRemoved -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/FullyMitigatedThreatEventsCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/FullyMitigatedThreatEventsCounter.cs
new file mode 100644
index 00000000..0f8f1c4f
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/FullyMitigatedThreatEventsCounter.cs
@@ -0,0 +1,80 @@
+using System;
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "FC6BC3D2-36C6-43E3-9558-A59B4C163981")]
+ [ExportMetadata("Label", "Fully Mitigated Threat Events Counter Status Info Provider")]
+ [ExportMetadata("Priority", 61)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class FullyMitigatedThreatEventsCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += ThreatEventAdded;
+ _model.ThreatEventAddedToEntity += ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow += ThreatEventAdded;
+ _model.ThreatEventRemoved += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow += ThreatEventRemoved;
+ }
+
+ public string CurrentStatus =>
+ $"Fully-mitigated Threat Events: {_model.FullyMitigatedThreatEvents}";
+
+ public string Description => "Threat Events that have been fully mitigated.";
+
+ private void ThreatEventAdded([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded += Update;
+ threatEvent.ThreatEventMitigationRemoved += Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void ThreatEventRemoved([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded -= Update;
+ threatEvent.ThreatEventMitigationRemoved -= Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void Update(IThreatEventMitigationsContainer container, IThreatEventMitigation mitigation)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Fully-mitigated Threat Events";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= ThreatEventAdded;
+ _model.ThreatEventAddedToEntity -= ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow -= ThreatEventAdded;
+ _model.ThreatEventRemoved -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow -= ThreatEventRemoved;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/FullyMitigatedThreatEventsPerc.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/FullyMitigatedThreatEventsPerc.cs
new file mode 100644
index 00000000..da967046
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/FullyMitigatedThreatEventsPerc.cs
@@ -0,0 +1,80 @@
+using System;
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "0B7C32A9-5E69-42EE-A379-288FDF9BB9F2")]
+ [ExportMetadata("Label", "Fully Mitigated Threat Events Percentage Status Info Provider")]
+ [ExportMetadata("Priority", 60)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class FullyMitigatedThreatEventsPerc : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += ThreatEventAdded;
+ _model.ThreatEventAddedToEntity += ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow += ThreatEventAdded;
+ _model.ThreatEventRemoved += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow += ThreatEventRemoved;
+ }
+
+ public string CurrentStatus =>
+ $"Fully-mitigated Threat Events: {(((float) _model.FullyMitigatedThreatEvents * 100f) / ((float)_model.TotalThreatEvents)).ToString("F1")}%";
+
+ public string Description => "Percentage of the Threat Events that have been fully mitigated.";
+
+ private void ThreatEventAdded([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded += Update;
+ threatEvent.ThreatEventMitigationRemoved += Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void ThreatEventRemoved([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded -= Update;
+ threatEvent.ThreatEventMitigationRemoved -= Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void Update(IThreatEventMitigationsContainer container, IThreatEventMitigation mitigation)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Fully-mitigated Threat Events Percentage";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= ThreatEventAdded;
+ _model.ThreatEventAddedToEntity -= ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow -= ThreatEventAdded;
+ _model.ThreatEventRemoved -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow -= ThreatEventRemoved;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/FullyMitigatedThreatTypesCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/FullyMitigatedThreatTypesCounter.cs
new file mode 100644
index 00000000..b12462cf
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/FullyMitigatedThreatTypesCounter.cs
@@ -0,0 +1,100 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "5481B935-029B-4943-991D-BAE432757DF0")]
+ [ExportMetadata("Label", "Fully mitigated Threat Types Counter Status Info Provider")]
+ [ExportMetadata("Priority", 29)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class FullyMitigatedThreatTypesCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ChildCreated += ChildCreated;
+ _model.ChildRemoved += ChildRemoved;
+
+ var threats = _model.ThreatTypes?.ToArray();
+ if (threats?.Any() ?? false)
+ {
+ foreach (var threat in threats)
+ {
+ threat.ThreatTypeMitigationAdded += Update;
+ threat.ThreatTypeMitigationRemoved += Update;
+ }
+ }
+ }
+
+ public string CurrentStatus =>
+ $"Fully-mitigated Threat Types: {_model.FullyMitigatedThreatTypes}";
+
+ public string Description => "Counter of the Threat Types having full Mitigations.";
+
+ private void ChildCreated(IIdentity identity)
+ {
+ if (identity is IThreatType threat)
+ {
+ threat.ThreatTypeMitigationAdded += Update;
+ threat.ThreatTypeMitigationRemoved += Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ private void ChildRemoved(IIdentity identity)
+ {
+ if (identity is IThreatType threat)
+ {
+ threat.ThreatTypeMitigationAdded -= Update;
+ threat.ThreatTypeMitigationRemoved -= Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ private void Update(IThreatTypeMitigationsContainer arg1, IThreatTypeMitigation arg2)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Fully mitigated Threat Type Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ChildCreated -= ChildCreated;
+ _model.ChildRemoved -= ChildRemoved;
+
+ var threats = _model.ThreatTypes?.ToArray();
+ if (threats?.Any() ?? false)
+ {
+ foreach (var threat in threats)
+ {
+ threat.ThreatTypeMitigationAdded -= Update;
+ threat.ThreatTypeMitigationRemoved -= Update;
+ }
+ }
+
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/HighThreatEventByTypeCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/HighThreatEventByTypeCounter.cs
new file mode 100644
index 00000000..b4622715
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/HighThreatEventByTypeCounter.cs
@@ -0,0 +1,88 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "3A188FDC-1DED-489D-B3E3-B046B9E0501C")]
+ [ExportMetadata("Label", "High Severity Threat Event by Type Counter Status Info Provider")]
+ [ExportMetadata("Priority", 46)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class HighByTypeThreatEventCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+
+ var modelTe = _model.ThreatEvents?.ToArray();
+ if (modelTe?.Any() ?? false)
+ {
+ foreach (var te1 in modelTe)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)te1).PropertyChanged += OnPropertyChanged;
+ }
+ }
+ }
+
+ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (sender is IThreatEvent)
+ {
+ if (e.PropertyName == "Severity") UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ public string CurrentStatus =>
+ $"High by Type: {_model.CountThreatEventsByType((int)DefaultSeverity.High)}";
+
+ public string Description => "Counter of the Threat Events by Type which have been categorized as High Severity.\nThis counter counts as a single instance all Threat Events belonging to the same Threat Type having High as top Severity.";
+
+ private void Update([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)threatEvent).PropertyChanged += OnPropertyChanged;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "High Severity Threat Event by Type Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/HighThreatEventCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/HighThreatEventCounter.cs
new file mode 100644
index 00000000..46c8402f
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/HighThreatEventCounter.cs
@@ -0,0 +1,88 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "ACD8E13F-8F32-42D2-80BC-9C0C3ECBCBC9")]
+ [ExportMetadata("Label", "High Severity Threat Event Counter Status Info Provider")]
+ [ExportMetadata("Priority", 41)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class HighThreatEventCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+
+ var modelTe = _model.ThreatEvents?.ToArray();
+ if (modelTe?.Any() ?? false)
+ {
+ foreach (var te1 in modelTe)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)te1).PropertyChanged += OnPropertyChanged;
+ }
+ }
+ }
+
+ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (sender is IThreatEvent)
+ {
+ if (e.PropertyName == "Severity") UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ public string CurrentStatus =>
+ $"High: {_model.CountThreatEvents((int)DefaultSeverity.High)}";
+
+ public string Description => "Counter of the Threat Events which have been categorized as High Severity.";
+
+ private void Update([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)threatEvent).PropertyChanged += OnPropertyChanged;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "High Severity Threat Event Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/InfoThreatEventByTypeCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/InfoThreatEventByTypeCounter.cs
new file mode 100644
index 00000000..87bbfa2a
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/InfoThreatEventByTypeCounter.cs
@@ -0,0 +1,89 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "C0C62CD7-2146-45D7-AB3D-EA2C9E1FA3E5")]
+ [ExportMetadata("Label", "Info Severity Threat Event by Type Counter Status Info Provider")]
+ [ExportMetadata("Priority", 49)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class InfoByTypeThreatEventCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+
+ var modelTe = _model.ThreatEvents?.ToArray();
+ if (modelTe?.Any() ?? false)
+ {
+ foreach (var te1 in modelTe)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)te1).PropertyChanged += OnPropertyChanged;
+ }
+ }
+ }
+
+ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (sender is IThreatEvent)
+ {
+ if (e.PropertyName == "Severity") UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ public string CurrentStatus =>
+ $"Info by Type: {_model.CountThreatEventsByType((int)DefaultSeverity.Info)}";
+
+ public string Description => "Counter of the Threat Events by Type which have been categorized as Info Severity.\nThis counter counts as a single instance all Threat Events belonging to the same Threat Type having Info as top Severity.";
+
+ private void Update([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)threatEvent).PropertyChanged += OnPropertyChanged;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Info Severity Threat Event by Type Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/InfoThreatEventCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/InfoThreatEventCounter.cs
new file mode 100644
index 00000000..7119b1ad
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/InfoThreatEventCounter.cs
@@ -0,0 +1,88 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "5D7BB0EC-CEA0-4A37-86E9-06B690FFC333")]
+ [ExportMetadata("Label", "Info Severity Threat Event Counter Status Info Provider")]
+ [ExportMetadata("Priority", 44)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class InfoThreatEventCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+
+ var modelTe = _model.ThreatEvents?.ToArray();
+ if (modelTe?.Any() ?? false)
+ {
+ foreach (var te1 in modelTe)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)te1).PropertyChanged += OnPropertyChanged;
+ }
+ }
+ }
+
+ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (sender is IThreatEvent)
+ {
+ if (e.PropertyName == "Severity") UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ public string CurrentStatus =>
+ $"Info: {_model.CountThreatEvents((int)DefaultSeverity.Info)}";
+
+ public string Description => "Counter of the Threat Events which have been categorized as Info Severity.";
+
+ private void Update([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)threatEvent).PropertyChanged += OnPropertyChanged;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Info Severity Threat Event Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/KnownMitigationCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/KnownMitigationCounter.cs
new file mode 100644
index 00000000..cddea134
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/KnownMitigationCounter.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "F6103ED2-6ECF-43D0-B47E-A08FB56E7A84")]
+ [ExportMetadata("Label", "Mitigation Counter Status Info Provider")]
+ [ExportMetadata("Priority", 21)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class KnownMitigationCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ChildCreated += Update;
+ _model.ChildRemoved += Update;
+ }
+
+ public string CurrentStatus =>
+ $"Known Mitigations: {_model?.Mitigations?.Count() ?? 0}";
+
+ public string Description => "Counter of the Known Mitigations defined in the Threat Model.";
+
+ private void Update(IIdentity obj)
+ {
+ if (obj is IMitigation)
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Known Mitigation Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ChildCreated -= Update;
+ _model.ChildRemoved -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/LowThreatEventByTypeCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/LowThreatEventByTypeCounter.cs
new file mode 100644
index 00000000..731d7008
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/LowThreatEventByTypeCounter.cs
@@ -0,0 +1,89 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "74FC9227-1574-474D-95DA-3017D9369BB7")]
+ [ExportMetadata("Label", "Low Severity Threat Event by Type Counter Status Info Provider")]
+ [ExportMetadata("Priority", 48)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class LowByTypeThreatEventCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+
+ var modelTe = _model.ThreatEvents?.ToArray();
+ if (modelTe?.Any() ?? false)
+ {
+ foreach (var te1 in modelTe)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)te1).PropertyChanged += OnPropertyChanged;
+ }
+ }
+ }
+
+ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (sender is IThreatEvent)
+ {
+ if (e.PropertyName == "Severity") UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ public string CurrentStatus =>
+ $"Low by Type: {_model.CountThreatEventsByType((int)DefaultSeverity.Low)}";
+
+ public string Description => "Counter of the Threat Events by Type which have been categorized as Low Severity.\nThis counter counts as a single instance all Threat Events belonging to the same Threat Type having Low as top Severity.";
+
+ private void Update([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)threatEvent).PropertyChanged += OnPropertyChanged;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Low Severity Threat Event by Type Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/LowThreatEventCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/LowThreatEventCounter.cs
new file mode 100644
index 00000000..eee3bde7
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/LowThreatEventCounter.cs
@@ -0,0 +1,89 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "D9E2D0BA-8320-4E08-8A6B-368FFE407E7F")]
+ [ExportMetadata("Label", "Low Severity Threat Event Counter Status Info Provider")]
+ [ExportMetadata("Priority", 43)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class LowThreatEventCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+
+ var modelTe = _model.ThreatEvents?.ToArray();
+ if (modelTe?.Any() ?? false)
+ {
+ foreach (var te1 in modelTe)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)te1).PropertyChanged += OnPropertyChanged;
+ }
+ }
+ }
+
+ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (sender is IThreatEvent)
+ {
+ if (e.PropertyName == "Severity") UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ public string CurrentStatus =>
+ $"Low: {_model.CountThreatEvents((int)DefaultSeverity.Low)}";
+
+ public string Description => "Counter of the Threat Events which have been categorized as Low Severity.";
+
+ private void Update([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)threatEvent).PropertyChanged += OnPropertyChanged;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Low Severity Threat Event Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/MediumThreatEventByTypeCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/MediumThreatEventByTypeCounter.cs
new file mode 100644
index 00000000..11c7ef84
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/MediumThreatEventByTypeCounter.cs
@@ -0,0 +1,89 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "D36928F8-6175-4CD9-8222-1B19F9F49AD0")]
+ [ExportMetadata("Label", "Medium Severity Threat Event by Type Counter Status Info Provider")]
+ [ExportMetadata("Priority", 47)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class MediumByTypeThreatEventCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+
+ var modelTe = _model.ThreatEvents?.ToArray();
+ if (modelTe?.Any() ?? false)
+ {
+ foreach (var te1 in modelTe)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)te1).PropertyChanged += OnPropertyChanged;
+ }
+ }
+ }
+
+ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (sender is IThreatEvent)
+ {
+ if (e.PropertyName == "Severity") UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ public string CurrentStatus =>
+ $"Medium by Type: {_model.CountThreatEventsByType((int)DefaultSeverity.Medium)}";
+
+ public string Description => "Counter of the Threat Events by Type which have been categorized as Medium.\nThis counter counts as a single instance all Threat Events belonging to the same Threat Type having Medium as top Severity.";
+
+ private void Update([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)threatEvent).PropertyChanged += OnPropertyChanged;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Medium Severity Threat Event by Type Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/MediumThreatEventCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/MediumThreatEventCounter.cs
new file mode 100644
index 00000000..d366da68
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/MediumThreatEventCounter.cs
@@ -0,0 +1,89 @@
+using System;
+using System.ComponentModel;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "3F64310D-A38E-4689-9564-FAB9DFEA61FD")]
+ [ExportMetadata("Label", "Medium Severity Threat Event Counter Status Info Provider")]
+ [ExportMetadata("Priority", 42)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class MediumThreatEventCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+
+ var modelTe = _model.ThreatEvents?.ToArray();
+ if (modelTe?.Any() ?? false)
+ {
+ foreach (var te1 in modelTe)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)te1).PropertyChanged += OnPropertyChanged;
+ }
+ }
+ }
+
+ private void OnPropertyChanged(object sender, PropertyChangedEventArgs e)
+ {
+ if (sender is IThreatEvent)
+ {
+ if (e.PropertyName == "Severity") UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ public string CurrentStatus =>
+ $"Medium: {_model.CountThreatEvents((int)DefaultSeverity.Medium)}";
+
+ public string Description => "Counter of the Threat Events which have been categorized as Medium Severity.";
+
+ private void Update([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ // ReSharper disable once SuspiciousTypeConversion.Global
+ ((INotifyPropertyChanged)threatEvent).PropertyChanged += OnPropertyChanged;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Medium Severity Threat Event Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/MitigationCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/MitigationCounter.cs
new file mode 100644
index 00000000..303ddb30
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/MitigationCounter.cs
@@ -0,0 +1,89 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "3C0D4BF7-0651-4409-AE98-82F8617BD6DA")]
+ [ExportMetadata("Label", "Mitigation Counter Status Info Provider")]
+ [ExportMetadata("Priority", 35)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class MitigationCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += ThreatEventAdded;
+ _model.ThreatEventAddedToEntity += ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow += ThreatEventAdded;
+ _model.ThreatEventRemoved += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow += ThreatEventRemoved;
+ }
+
+ public string CurrentStatus =>
+ $"Mitigations: {CountMitigations()}";
+
+ public string Description => "Counter of the Mitigations which have been applied.\nThis counter will count multiple times any Known Mitigation which has been applied to multiple Threat Events.";
+
+ private void ThreatEventAdded([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded += Update;
+ threatEvent.ThreatEventMitigationRemoved += Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void ThreatEventRemoved([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded -= Update;
+ threatEvent.ThreatEventMitigationRemoved -= Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void Update(IThreatEventMitigationsContainer container, IThreatEventMitigation mitigation)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Mitigation Counter";
+ }
+
+ private int CountMitigations()
+ {
+ return (_model.ThreatEvents?.Sum(x => x.Mitigations?.Count() ?? 0) ?? 0) +
+ (_model.Entities?.Sum(x => x.ThreatEvents?.Sum(y => y.Mitigations?.Count() ?? 0) ?? 0) ?? 0) +
+ (_model.DataFlows?.Sum(x => x.ThreatEvents?.Sum(y => y.Mitigations?.Count() ?? 0) ?? 0) ?? 0);
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= ThreatEventAdded;
+ _model.ThreatEventAddedToEntity -= ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow -= ThreatEventAdded;
+ _model.ThreatEventRemoved -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow -= ThreatEventRemoved;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/NotMitigatedThreatEventsCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/NotMitigatedThreatEventsCounter.cs
new file mode 100644
index 00000000..4704e082
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/NotMitigatedThreatEventsCounter.cs
@@ -0,0 +1,80 @@
+using System;
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "3E723A65-69EB-489B-9538-D6F664CAC892")]
+ [ExportMetadata("Label", "Not Mitigated Threat Events Counter Status Info Provider")]
+ [ExportMetadata("Priority", 65)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class NotMitigatedThreatEventsCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += ThreatEventAdded;
+ _model.ThreatEventAddedToEntity += ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow += ThreatEventAdded;
+ _model.ThreatEventRemoved += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow += ThreatEventRemoved;
+ }
+
+ public string CurrentStatus =>
+ $"Not mitigated Threat Events: {_model.NotMitigatedThreatEvents}";
+
+ public string Description => "Threat Events that have not been mitigated.";
+
+ private void ThreatEventAdded([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded += Update;
+ threatEvent.ThreatEventMitigationRemoved += Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void ThreatEventRemoved([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded -= Update;
+ threatEvent.ThreatEventMitigationRemoved -= Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void Update(IThreatEventMitigationsContainer container, IThreatEventMitigation mitigation)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Not mitigated Threat Events";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= ThreatEventAdded;
+ _model.ThreatEventAddedToEntity -= ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow -= ThreatEventAdded;
+ _model.ThreatEventRemoved -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow -= ThreatEventRemoved;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/NotMitigatedThreatEventsPerc.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/NotMitigatedThreatEventsPerc.cs
new file mode 100644
index 00000000..76e42edb
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/NotMitigatedThreatEventsPerc.cs
@@ -0,0 +1,80 @@
+using System;
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "E2D450B9-A70F-433F-878D-51CF99B4D11E")]
+ [ExportMetadata("Label", "Not Mitigated Threat Events Percentage Status Info Provider")]
+ [ExportMetadata("Priority", 64)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class NotMitigatedThreatEventsPerc : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += ThreatEventAdded;
+ _model.ThreatEventAddedToEntity += ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow += ThreatEventAdded;
+ _model.ThreatEventRemoved += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow += ThreatEventRemoved;
+ }
+
+ public string CurrentStatus =>
+ $"Not mitigated Threat Events: {(((float) _model.NotMitigatedThreatEvents * 100f) / ((float)_model.TotalThreatEvents)).ToString("F1")}%";
+
+ public string Description => "Percentage of the Threat Events that have not been mitigated.";
+
+ private void ThreatEventAdded([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded += Update;
+ threatEvent.ThreatEventMitigationRemoved += Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void ThreatEventRemoved([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded -= Update;
+ threatEvent.ThreatEventMitigationRemoved -= Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void Update(IThreatEventMitigationsContainer container, IThreatEventMitigation mitigation)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Not mitigated Threat Events Percentage";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= ThreatEventAdded;
+ _model.ThreatEventAddedToEntity -= ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow -= ThreatEventAdded;
+ _model.ThreatEventRemoved -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow -= ThreatEventRemoved;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/NotMitigatedThreatTypesCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/NotMitigatedThreatTypesCounter.cs
new file mode 100644
index 00000000..9157c407
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/NotMitigatedThreatTypesCounter.cs
@@ -0,0 +1,100 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "2EF6DB5F-5DEB-4166-8C5B-44B6DE126E2A")]
+ [ExportMetadata("Label", "Not mitigated Threat Types Counter Status Info Provider")]
+ [ExportMetadata("Priority", 31)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class NotMitigatedThreatTypesCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ChildCreated += ChildCreated;
+ _model.ChildRemoved += ChildRemoved;
+
+ var threats = _model.ThreatTypes?.ToArray();
+ if (threats?.Any() ?? false)
+ {
+ foreach (var threat in threats)
+ {
+ threat.ThreatTypeMitigationAdded += Update;
+ threat.ThreatTypeMitigationRemoved += Update;
+ }
+ }
+ }
+
+ public string CurrentStatus =>
+ $"Not mitigated Threat Types: {_model.NotMitigatedThreatTypes}";
+
+ public string Description => "Counter of the Threat Types having no Mitigation.";
+
+ private void ChildCreated(IIdentity identity)
+ {
+ if (identity is IThreatType threat)
+ {
+ threat.ThreatTypeMitigationAdded += Update;
+ threat.ThreatTypeMitigationRemoved += Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ private void ChildRemoved(IIdentity identity)
+ {
+ if (identity is IThreatType threat)
+ {
+ threat.ThreatTypeMitigationAdded -= Update;
+ threat.ThreatTypeMitigationRemoved -= Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ private void Update(IThreatTypeMitigationsContainer arg1, IThreatTypeMitigation arg2)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Not mitigated Threat Type Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ChildCreated -= ChildCreated;
+ _model.ChildRemoved -= ChildRemoved;
+
+ var threats = _model.ThreatTypes?.ToArray();
+ if (threats?.Any() ?? false)
+ {
+ foreach (var threat in threats)
+ {
+ threat.ThreatTypeMitigationAdded -= Update;
+ threat.ThreatTypeMitigationRemoved -= Update;
+ }
+ }
+
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/PartiallyMitigatedThreatEventsCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/PartiallyMitigatedThreatEventsCounter.cs
new file mode 100644
index 00000000..8c9b3ca3
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/PartiallyMitigatedThreatEventsCounter.cs
@@ -0,0 +1,80 @@
+using System;
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "DACE4940-F5E0-459C-9751-073400DF5358")]
+ [ExportMetadata("Label", "Partially Mitigated Threat Events Counter Status Info Provider")]
+ [ExportMetadata("Priority", 63)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class PartiallyMitigatedThreatEventsCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += ThreatEventAdded;
+ _model.ThreatEventAddedToEntity += ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow += ThreatEventAdded;
+ _model.ThreatEventRemoved += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow += ThreatEventRemoved;
+ }
+
+ public string CurrentStatus =>
+ $"Partially-mitigated Threat Events: {_model.PartiallyMitigatedThreatEvents}";
+
+ public string Description => "Threat Events that have been partially mitigated.";
+
+ private void ThreatEventAdded([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded += Update;
+ threatEvent.ThreatEventMitigationRemoved += Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void ThreatEventRemoved([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded -= Update;
+ threatEvent.ThreatEventMitigationRemoved -= Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void Update(IThreatEventMitigationsContainer container, IThreatEventMitigation mitigation)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Partially-mitigated Threat Events";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= ThreatEventAdded;
+ _model.ThreatEventAddedToEntity -= ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow -= ThreatEventAdded;
+ _model.ThreatEventRemoved -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow -= ThreatEventRemoved;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/PartiallyMitigatedThreatEventsPerc.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/PartiallyMitigatedThreatEventsPerc.cs
new file mode 100644
index 00000000..71de1235
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/PartiallyMitigatedThreatEventsPerc.cs
@@ -0,0 +1,80 @@
+using System;
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "87CB6E6F-D0EC-4D60-AC97-0CA3459B13BA")]
+ [ExportMetadata("Label", "Partially Mitigated Threat Events Percentage Status Info Provider")]
+ [ExportMetadata("Priority", 62)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class PartiallyMitigatedThreatEventsPerc : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += ThreatEventAdded;
+ _model.ThreatEventAddedToEntity += ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow += ThreatEventAdded;
+ _model.ThreatEventRemoved += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow += ThreatEventRemoved;
+ }
+
+ public string CurrentStatus =>
+ $"Partially-mitigated Threat Events: {(((float) _model.PartiallyMitigatedThreatEvents * 100f) / ((float)_model.TotalThreatEvents)).ToString("F1")}%";
+
+ public string Description => "Percentage of the Threat Events that have been partially mitigated.";
+
+ private void ThreatEventAdded([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded += Update;
+ threatEvent.ThreatEventMitigationRemoved += Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void ThreatEventRemoved([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded -= Update;
+ threatEvent.ThreatEventMitigationRemoved -= Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void Update(IThreatEventMitigationsContainer container, IThreatEventMitigation mitigation)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Partially-mitigated Threat Events Percentage";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= ThreatEventAdded;
+ _model.ThreatEventAddedToEntity -= ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow -= ThreatEventAdded;
+ _model.ThreatEventRemoved -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow -= ThreatEventRemoved;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/PartiallyMitigatedThreatTypesCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/PartiallyMitigatedThreatTypesCounter.cs
new file mode 100644
index 00000000..115c4634
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/PartiallyMitigatedThreatTypesCounter.cs
@@ -0,0 +1,100 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "A4ADAC0C-46BB-4306-925C-C09CA4976E83")]
+ [ExportMetadata("Label", "Partially mitigated Threat Types Counter Status Info Provider")]
+ [ExportMetadata("Priority", 30)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class PartiallyMitigatedThreatTypesCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ChildCreated += ChildCreated;
+ _model.ChildRemoved += ChildRemoved;
+
+ var threats = _model.ThreatTypes?.ToArray();
+ if (threats?.Any() ?? false)
+ {
+ foreach (var threat in threats)
+ {
+ threat.ThreatTypeMitigationAdded += Update;
+ threat.ThreatTypeMitigationRemoved += Update;
+ }
+ }
+ }
+
+ public string CurrentStatus =>
+ $"Partially-mitigated Threat Types: {_model.PartiallyMitigatedThreatTypes}";
+
+ public string Description => "Counter of the Threat Types having partial mitigations.";
+
+ private void ChildCreated(IIdentity identity)
+ {
+ if (identity is IThreatType threat)
+ {
+ threat.ThreatTypeMitigationAdded += Update;
+ threat.ThreatTypeMitigationRemoved += Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ private void ChildRemoved(IIdentity identity)
+ {
+ if (identity is IThreatType threat)
+ {
+ threat.ThreatTypeMitigationAdded -= Update;
+ threat.ThreatTypeMitigationRemoved -= Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+ }
+
+ private void Update(IThreatTypeMitigationsContainer arg1, IThreatTypeMitigation arg2)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Partially-mitigated Threat Type Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ChildCreated -= ChildCreated;
+ _model.ChildRemoved -= ChildRemoved;
+
+ var threats = _model.ThreatTypes?.ToArray();
+ if (threats?.Any() ?? false)
+ {
+ foreach (var threat in threats)
+ {
+ threat.ThreatTypeMitigationAdded -= Update;
+ threat.ThreatTypeMitigationRemoved -= Update;
+ }
+ }
+
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ProcessCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ProcessCounter.cs
new file mode 100644
index 00000000..609a4f23
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ProcessCounter.cs
@@ -0,0 +1,61 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Entities;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "82DF6644-1955-464A-A244-C395856B527B")]
+ [ExportMetadata("Label", "Process Counter Status Info Provider")]
+ [ExportMetadata("Priority", 11)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class ProcessCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ChildCreated += Update;
+ _model.ChildRemoved += Update;
+ }
+
+ public string CurrentStatus =>
+ $"Processes: {_model?.Entities?.OfType().Count() ?? 0}";
+
+ public string Description => "Counter of the Processes defined in the Threat Model.";
+
+ private void Update(IIdentity obj)
+ {
+ if (obj is IProcess)
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Processes Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ChildCreated -= Update;
+ _model.ChildRemoved -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ThreatEventCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ThreatEventCounter.cs
new file mode 100644
index 00000000..6f81dd6d
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ThreatEventCounter.cs
@@ -0,0 +1,67 @@
+using System;
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "2A01104E-E774-4AB9-8700-27F015CCADDE")]
+ [ExportMetadata("Label", "Threat Event Counter Status Info Provider")]
+ [ExportMetadata("Priority", 25)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class ThreatEventCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+ }
+
+ public string CurrentStatus =>
+ $"Threat Events: {_model.TotalThreatEvents}";
+
+ public string Description => "Counter of the Threat Events defined in the Threat Model.";
+
+ private void Update([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Threat Event Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ThreatTypeCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ThreatTypeCounter.cs
new file mode 100644
index 00000000..72a24cf0
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/ThreatTypeCounter.cs
@@ -0,0 +1,61 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "89B5883D-91F9-4C6B-8DBC-514C2A718079")]
+ [ExportMetadata("Label", "Threat Type Counter Status Info Provider")]
+ [ExportMetadata("Priority", 20)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class ThreatTypeCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ChildCreated += Update;
+ _model.ChildRemoved += Update;
+ }
+
+ public string CurrentStatus =>
+ $"Threat Types: {_model?.ThreatTypes?.Count() ?? 0}";
+
+ public string Description => "Counter of the Threat Types defined in the Threat Model.";
+
+ private void Update(IIdentity obj)
+ {
+ if (obj is IThreatType)
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Threat Type Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ChildCreated -= Update;
+ _model.ChildRemoved -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/TrustBoundaryCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/TrustBoundaryCounter.cs
new file mode 100644
index 00000000..6c07d0c2
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/TrustBoundaryCounter.cs
@@ -0,0 +1,60 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Entities;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "731C499F-5FE8-412F-A1A9-A81921A8D15C")]
+ [ExportMetadata("Label", "Trust Boundary Counter Status Info Provider")]
+ [ExportMetadata("Priority", 14)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class TrustBoundaryCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ChildCreated += Update;
+ _model.ChildRemoved += Update;
+ }
+
+ public string CurrentStatus =>
+ $"Trust Boundaries: {_model?.Groups?.OfType().Count() ?? 0}";
+
+ public string Description => "Counter of the Trust Boundaries defined in the Threat Model.";
+
+ private void Update(IIdentity obj)
+ {
+ if (obj is ITrustBoundary)
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Trust Boundary Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ChildCreated -= Update;
+ _model.ChildRemoved -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/UnassignedThreatTypeCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/UnassignedThreatTypeCounter.cs
new file mode 100644
index 00000000..dd58e7bc
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/UnassignedThreatTypeCounter.cs
@@ -0,0 +1,67 @@
+using System;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "7C960B99-F1DD-4D94-A030-48BFEB11B927")]
+ [ExportMetadata("Label", "Threat Types with no associated Threat Event Counter Status Info Provider")]
+ [ExportMetadata("Priority", 28)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class UnassignedThreatTypeCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += Update;
+ _model.ThreatEventAddedToEntity += Update;
+ _model.ThreatEventAddedToDataFlow += Update;
+ _model.ThreatEventRemoved += Update;
+ _model.ThreatEventRemovedFromEntity += Update;
+ _model.ThreatEventRemovedFromDataFlow += Update;
+ }
+
+ public string CurrentStatus =>
+ $"Unassigned Threat Types: {(_model.ThreatTypes?.Count() ?? 0) - _model.AssignedThreatTypes}";
+
+ public string Description => "Counter of the Threat Types having no associated Threat Event.";
+
+ private void Update(IThreatEventsContainer container, IThreatEvent mitigation)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Unassigned Threat Type Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= Update;
+ _model.ThreatEventAddedToEntity -= Update;
+ _model.ThreatEventAddedToDataFlow -= Update;
+ _model.ThreatEventRemoved -= Update;
+ _model.ThreatEventRemovedFromEntity -= Update;
+ _model.ThreatEventRemovedFromDataFlow -= Update;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/UniqueMitigationCounter.cs b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/UniqueMitigationCounter.cs
new file mode 100644
index 00000000..591184a4
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/StatusInfoProviders/UniqueMitigationCounter.cs
@@ -0,0 +1,80 @@
+using System;
+using System.ComponentModel.Composition;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.ThreatsMitigations;
+using ThreatsManager.Utilities;
+
+namespace ThreatsManager.Extensions.StatusInfoProviders
+{
+ [Export(typeof(IStatusInfoProviderExtension))]
+ [ExportMetadata("Id", "9F9FC6E2-466D-4156-8BE7-E28ECC364E03")]
+ [ExportMetadata("Label", "Unique Mitigation Counter Status Info Provider")]
+ [ExportMetadata("Priority", 36)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class UniqueMitigationCounter : IStatusInfoProviderExtension
+ {
+ private IThreatModel _model;
+
+ public event Action UpdateInfo;
+
+ public void Initialize([NotNull] IThreatModel model)
+ {
+ if (_model != null)
+ {
+ Dispose();
+ }
+
+ _model = model;
+ _model.ThreatEventAdded += ThreatEventAdded;
+ _model.ThreatEventAddedToEntity += ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow += ThreatEventAdded;
+ _model.ThreatEventRemoved += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity += ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow += ThreatEventRemoved;
+ }
+
+ public string CurrentStatus =>
+ $"Unique Mitigations: {_model.UniqueMitigations}";
+
+ public string Description => "Counter of the unique Mitigations which have been applied.\nThis counter will count a single instance even if the same Mitigation has been applied to multiple Threat Events.";
+
+ private void ThreatEventAdded([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded += Update;
+ threatEvent.ThreatEventMitigationRemoved += Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void ThreatEventRemoved([NotNull] IThreatEventsContainer container, [NotNull] IThreatEvent threatEvent)
+ {
+ threatEvent.ThreatEventMitigationAdded -= Update;
+ threatEvent.ThreatEventMitigationRemoved -= Update;
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ private void Update(IThreatEventMitigationsContainer container, IThreatEventMitigation mitigation)
+ {
+ UpdateInfo?.Invoke(this.GetExtensionId(), CurrentStatus);
+ }
+
+ public override string ToString()
+ {
+ return "Unique Mitigation Counter";
+ }
+
+ public void Dispose()
+ {
+ _model.ThreatEventAdded -= ThreatEventAdded;
+ _model.ThreatEventAddedToEntity -= ThreatEventAdded;
+ _model.ThreatEventAddedToDataFlow -= ThreatEventAdded;
+ _model.ThreatEventRemoved -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromEntity -= ThreatEventRemoved;
+ _model.ThreatEventRemovedFromDataFlow -= ThreatEventRemoved;
+ _model = null;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.Extensions/ThreatsManager.Extensions.csproj b/Sources/Extensions/ThreatsManager.Extensions/ThreatsManager.Extensions.csproj
new file mode 100644
index 00000000..8c591f77
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Extensions/ThreatsManager.Extensions.csproj
@@ -0,0 +1,55 @@
+
+
+
+ netcoreapp3.1;net472
+ Threats Manager Platform Extensions library.
+ 1.3.3.0
+ Simone Curzi
+ Simone Curzi
+ Threats Manager Platform
+ Copyright © Simone Curzi, 2018-2020. All Rights Reserved.
+ https://www.nuget.org/packages/ThreatsManager.Engine/
+ https://github.com/simonec73/threatsmanager
+ 1.3.3.0
+ 1.3.3
+ true
+ ..\..\ThreatsManager.Engine\ThreatsManager.snk
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ..\..\Resources\net472\ThreatsManager.Icons.dll
+ true
+
+
+ ..\..\Resources\netcoreapp3.1\ThreatsManager.Icons.dll
+ true
+
+
+
+
+
+ True
+ True
+ Resources.resx
+
+
+
+
+
+ ResXFileCodeGenerator
+ Resources.Designer.cs
+
+
+
+
diff --git a/Sources/Extensions/ThreatsManager.MsTmt/ExtensionsContainer.cs b/Sources/Extensions/ThreatsManager.MsTmt/ExtensionsContainer.cs
index 111b7431..b8227c8a 100644
--- a/Sources/Extensions/ThreatsManager.MsTmt/ExtensionsContainer.cs
+++ b/Sources/Extensions/ThreatsManager.MsTmt/ExtensionsContainer.cs
@@ -1,3 +1,3 @@
using ThreatsManager.Interfaces;
-[assembly: ExtensionsContainer("1.3.1")]
\ No newline at end of file
+[assembly: ExtensionsContainer("1.3.3")]
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.MsTmt/ThreatsManager.MsTmt.csproj b/Sources/Extensions/ThreatsManager.MsTmt/ThreatsManager.MsTmt.csproj
index 6710bdb8..38eaf809 100644
--- a/Sources/Extensions/ThreatsManager.MsTmt/ThreatsManager.MsTmt.csproj
+++ b/Sources/Extensions/ThreatsManager.MsTmt/ThreatsManager.MsTmt.csproj
@@ -2,16 +2,16 @@
netcoreapp3.1;net472
- Threats Manager Platform Microsoft Threat Modeling Tool Importmport library.
- 1.3.1.0
+ Threats Manager Platform Microsoft Threat Modeling Tool Import library.
+ 1.3.3.0
Simone Curzi
Simone Curzi
Threats Manager Platform
Copyright © Simone Curzi, 2018-2020. All Rights Reserved.
https://www.nuget.org/packages/ThreatsManager.Engine/
https://github.com/simonec73/threatsmanager
- 1.3.1.0
- 1.3.1
+ 1.3.3.0
+ 1.3.3
true
..\..\ThreatsManager.Engine\ThreatsManager.snk
diff --git a/Sources/Extensions/ThreatsManager.MsTmt/ThreatsManager.MsTmt.sln b/Sources/Extensions/ThreatsManager.MsTmt/ThreatsManager.MsTmt.sln
deleted file mode 100644
index d2a13b5e..00000000
--- a/Sources/Extensions/ThreatsManager.MsTmt/ThreatsManager.MsTmt.sln
+++ /dev/null
@@ -1,43 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Version 16
-VisualStudioVersion = 16.0.30413.136
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ThreatsManager.MsTmt", "ThreatsManager.MsTmt.csproj", "{8284D400-317B-42B9-B379-A6BF44D848FC}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.AutoThreatGeneration", "..\ThreatsManager.AutoThreatGeneration\ThreatsManager.AutoThreatGeneration.csproj", "{4B85F87F-71FC-42C2-99B8-5303B45231A8}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.Interfaces", "..\..\ThreatsManager.Interfaces\ThreatsManager.Interfaces.csproj", "{4A9362DE-7DC1-4D53-BA26-0ED37A6084E5}"
-EndProject
-Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ThreatsManager.Utilities", "..\..\ThreatsManager.Utilities\ThreatsManager.Utilities.csproj", "{D0D1CA1F-3151-45E5-AE57-F176545C8E91}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {8284D400-317B-42B9-B379-A6BF44D848FC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {8284D400-317B-42B9-B379-A6BF44D848FC}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {8284D400-317B-42B9-B379-A6BF44D848FC}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {8284D400-317B-42B9-B379-A6BF44D848FC}.Release|Any CPU.Build.0 = Release|Any CPU
- {4B85F87F-71FC-42C2-99B8-5303B45231A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4B85F87F-71FC-42C2-99B8-5303B45231A8}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4B85F87F-71FC-42C2-99B8-5303B45231A8}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4B85F87F-71FC-42C2-99B8-5303B45231A8}.Release|Any CPU.Build.0 = Release|Any CPU
- {4A9362DE-7DC1-4D53-BA26-0ED37A6084E5}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4A9362DE-7DC1-4D53-BA26-0ED37A6084E5}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4A9362DE-7DC1-4D53-BA26-0ED37A6084E5}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4A9362DE-7DC1-4D53-BA26-0ED37A6084E5}.Release|Any CPU.Build.0 = Release|Any CPU
- {D0D1CA1F-3151-45E5-AE57-F176545C8E91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {D0D1CA1F-3151-45E5-AE57-F176545C8E91}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {D0D1CA1F-3151-45E5-AE57-F176545C8E91}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {D0D1CA1F-3151-45E5-AE57-F176545C8E91}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
- GlobalSection(ExtensibilityGlobals) = postSolution
- SolutionGuid = {CFB2BDD3-6CB1-4912-98A0-9ED0438ED205}
- EndGlobalSection
-EndGlobal
diff --git a/Sources/Extensions/ThreatsManager.PackageManagers/EncryptedFilePackageManager.cs b/Sources/Extensions/ThreatsManager.PackageManagers/EncryptedFilePackageManager.cs
new file mode 100644
index 00000000..eb6d071d
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.PackageManagers/EncryptedFilePackageManager.cs
@@ -0,0 +1,104 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Composition;
+using System.IO;
+using System.Security;
+using System.Security.Cryptography.X509Certificates;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Packaging;
+using ThreatsManager.Interfaces.Exceptions;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Utilities;
+using ThreatsManager.Utilities.Exceptions;
+
+namespace ThreatsManager.PackageManagers
+{
+ [Export(typeof(IPackageManager))]
+ [ExportMetadata("Id", "C3E6420A-296D-4859-99BD-6045D45A20E3")]
+ [ExportMetadata("Label", "Encrypted File Package Manager")]
+ [ExportMetadata("Priority", 11)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class EncryptedFilePackageManager : ISecurePackageManager
+ {
+ private const string ThreatModelFile = "threatmodel.json";
+
+ private IProtectionData _protectionData;
+
+ public LocationType SupportedLocations => LocationType.FileSystem;
+
+ public ProtectionType RequiredProtection => ProtectionType.Password;
+
+ public string GetFilter(LocationType locationType)
+ {
+ return "Secured Threat Model (*.tmx)|*.tmx";
+ }
+
+ public bool CanHandle(LocationType locationType, string location)
+ {
+ return SupportedLocations.HasFlag(locationType) &&
+ string.Compare(Path.GetExtension(location), ".tmx", StringComparison.OrdinalIgnoreCase) == 0;
+ }
+
+ public IThreatModel Load(LocationType locationType, string location)
+ {
+ throw new EncryptionRequiredException(RequiredProtection);
+ }
+
+ public IThreatModel Load(LocationType locationType, string location, SecureString password)
+ {
+ IThreatModel result = null;
+
+ if (File.Exists(location))
+ {
+ var package = new Package(location);
+
+ var threatModelContent = package.Read(ThreatModelFile, password);
+ if (threatModelContent != null)
+ {
+ result = ThreatModelManager.Deserialize(threatModelContent);
+ }
+ }
+ else
+ {
+ throw new FileNotFoundException();
+ }
+
+ return result;
+ }
+
+ public IThreatModel Load(LocationType locationType, string location, X509Certificate2 certificate)
+ {
+ throw new UnsupportedEncryptionException();
+ }
+
+ public bool Save(IThreatModel model, LocationType locationType, string location)
+ {
+ throw new EncryptionRequiredException(RequiredProtection);
+ }
+
+ public bool Save(IThreatModel model, LocationType locationType, string location, SecureString password)
+ {
+ bool result = false;
+
+ if (model is IThreatModel tm)
+ {
+ var tmSerialized = ThreatModelManager.Serialize(tm);
+
+ var package = Package.Create(location);
+ package.Add(ThreatModelFile, tmSerialized, password);
+ package.Save();
+
+ result = true;
+ }
+
+ return result;
+ }
+
+ public bool Save(IThreatModel model, LocationType locationType, string location, IEnumerable certificates)
+ {
+ throw new UnsupportedEncryptionException();
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionInfo.cs b/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionInfo.cs
new file mode 100644
index 00000000..a0338add
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionInfo.cs
@@ -0,0 +1,26 @@
+using Newtonsoft.Json;
+using PostSharp.Patterns.Contracts;
+
+namespace ThreatsManager.PackageManagers
+{
+ [JsonObject(MemberSerialization.OptIn)]
+ public class ExtensionInfo
+ {
+ public ExtensionInfo()
+ {
+
+ }
+
+ public ExtensionInfo([Required] string id, [Required] string label)
+ {
+ Id = id;
+ Label = label;
+ }
+
+ [JsonProperty("id")]
+ public string Id { get; set; }
+
+ [JsonProperty("label")]
+ public string Label { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionInfoComparer.cs b/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionInfoComparer.cs
new file mode 100644
index 00000000..a416c492
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionInfoComparer.cs
@@ -0,0 +1,18 @@
+using System.Collections.Generic;
+
+namespace ThreatsManager.PackageManagers
+{
+ public class ExtensionInfoComparer : IEqualityComparer
+ {
+ public bool Equals(ExtensionInfo x, ExtensionInfo y)
+ {
+ return (x == null && y == null) ||
+ (x != null && y != null && string.CompareOrdinal(x.Id, y.Id) == 0);
+ }
+
+ public int GetHashCode(ExtensionInfo obj)
+ {
+ return obj.Id.GetHashCode();
+ }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionsContainer.cs b/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionsContainer.cs
new file mode 100644
index 00000000..b8227c8a
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionsContainer.cs
@@ -0,0 +1,3 @@
+using ThreatsManager.Interfaces;
+
+[assembly: ExtensionsContainer("1.3.3")]
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionsList.cs b/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionsList.cs
new file mode 100644
index 00000000..029d2be8
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.PackageManagers/ExtensionsList.cs
@@ -0,0 +1,12 @@
+using System.Collections.Generic;
+using Newtonsoft.Json;
+
+namespace ThreatsManager.PackageManagers
+{
+ [JsonObject(MemberSerialization.OptIn)]
+ public class ExtensionsList
+ {
+ [JsonProperty("extensions")]
+ public List Extensions { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Sources/Extensions/ThreatsManager.PackageManagers/JsonFilePackageManager.cs b/Sources/Extensions/ThreatsManager.PackageManagers/JsonFilePackageManager.cs
new file mode 100644
index 00000000..3605f2d1
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.PackageManagers/JsonFilePackageManager.cs
@@ -0,0 +1,173 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Composition;
+using System.IO;
+using System.Linq;
+using System.Text.RegularExpressions;
+using Newtonsoft.Json;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Utilities;
+using ThreatsManager.Utilities.Exceptions;
+
+namespace ThreatsManager.PackageManagers
+{
+ [Export(typeof(IPackageManager))]
+ [ExportMetadata("Id", "FA6F6023-8369-4D2F-97C1-1EB5ED83DA21")]
+ [ExportMetadata("Label", "Json File Package Manager")]
+ [ExportMetadata("Priority", 15)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class JsonFilePackageManager : IPackageManager
+ {
+ public LocationType SupportedLocations => LocationType.FileSystem;
+
+ public bool CanHandle(LocationType locationType, [Required] string location)
+ {
+ return SupportedLocations.HasFlag(locationType) &&
+ string.Compare(Path.GetExtension(location), ".tmj", StringComparison.OrdinalIgnoreCase) == 0;
+ }
+
+ public string GetFilter(LocationType locationType)
+ {
+ return "Json Threat Model (*.tmj)|*.tmj";
+ }
+
+ public string GetLatest(LocationType locationType, [Required] string location, out DateTime dateTime)
+ {
+ string result = null;
+ dateTime = DateTime.MinValue;
+
+ if (CanHandle(locationType, location))
+ {
+ var directory = Path.GetDirectoryName(location);
+ var filter = string.Concat(Path.GetFileNameWithoutExtension(location), "_??????????????", ".tmj");
+
+ if (!string.IsNullOrWhiteSpace(directory))
+ {
+ result = Directory
+ .GetFiles(directory, filter, SearchOption.TopDirectoryOnly)
+ .OrderByDescending(x => x)
+ .FirstOrDefault();
+
+ if (result != null)
+ dateTime = GetDateTime(result);
+ }
+ }
+
+ return result;
+ }
+
+
+ public IThreatModel Load(LocationType locationType, [Required] string location,
+ IEnumerable extensions, bool strict = true)
+ {
+ IThreatModel result = null;
+
+ if (File.Exists(location))
+ {
+ var threatModelContent = File.ReadAllBytes(location);
+ if (threatModelContent != null)
+ {
+ try
+ {
+ result = ThreatModelManager.Deserialize(threatModelContent, !strict);
+ }
+ catch (JsonSerializationException e)
+ {
+ throw new ThreatModelOpeningFailureException("A serialization issue has occurred.", e);
+ }
+ }
+ }
+ else
+ {
+ throw new FileNotFoundException("Unable to find the specified file.", location);
+ }
+
+ return result;
+ }
+
+ public bool Save([NotNull] IThreatModel model, LocationType locationType, [Required] string location,
+ bool autoAddDateTime, IEnumerable extensions, out string newLocation)
+ {
+ bool result = false;
+ newLocation = null;
+
+ if (model is IThreatModel tm)
+ {
+ var tmSerialized = ThreatModelManager.Serialize(tm);
+
+ newLocation = autoAddDateTime
+ ? Path.Combine(Path.GetDirectoryName(location),
+ $"{StripDateTimeSuffix(Path.GetFileNameWithoutExtension(location))}_{DateTime.Now.ToString("yyyyMMddHHmmss")}{Path.GetExtension(location)}")
+ : location;
+
+ File.WriteAllBytes(newLocation, tmSerialized);
+
+
+ result = true;
+ }
+
+ return result;
+ }
+
+ public void AutoCleanup(LocationType locationType, [Required] string location, [StrictlyPositive] int maxInstances)
+ {
+ if (CanHandle(locationType, location))
+ {
+ var directory = Path.GetDirectoryName(location);
+ var filter = string.Concat(StripDateTimeSuffix(Path.GetFileNameWithoutExtension(location)), "_??????????????", ".tm");
+
+ if (!string.IsNullOrWhiteSpace(directory))
+ {
+ var files = Directory.GetFiles(directory, filter, SearchOption.TopDirectoryOnly);
+ var orderedFiles = files.OrderByDescending(x => x).Skip(maxInstances);
+
+ foreach (var file in orderedFiles)
+ {
+ File.Delete(file);
+ }
+ }
+ }
+ }
+
+ private string StripDateTimeSuffix([Required] string text)
+ {
+ string result = text;
+
+ Regex regex = new Regex("(_[0-9]{14})");
+ var match = regex.Match(text);
+ if (match.Success)
+ {
+ var capture = match.Captures.OfType().FirstOrDefault();
+ if (capture != null)
+ {
+ result = text.Replace(capture.Value, "");
+ }
+ }
+
+ return result;
+ }
+
+ private DateTime GetDateTime([Required] string text)
+ {
+ DateTime result = DateTime.MinValue;
+
+ Regex regex = new Regex("(_[0-9]{14})");
+ var match = regex.Match(text);
+ if (match.Success)
+ {
+ var capture = match.Captures.OfType().FirstOrDefault();
+ if (capture != null)
+ {
+ result = DateTime.ParseExact(capture.Value.Substring(1), "yyyyMMddHHmmss",
+ System.Globalization.CultureInfo.InvariantCulture);
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.PackageManagers/PlainFilePackageManager.cs b/Sources/Extensions/ThreatsManager.PackageManagers/PlainFilePackageManager.cs
new file mode 100644
index 00000000..3d052fb6
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.PackageManagers/PlainFilePackageManager.cs
@@ -0,0 +1,241 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Composition;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Text.RegularExpressions;
+using Newtonsoft.Json;
+using ThreatsManager.Packaging;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Utilities;
+using ThreatsManager.Utilities.Exceptions;
+
+namespace ThreatsManager.PackageManagers
+{
+ [Export(typeof(IPackageManager))]
+ [ExportMetadata("Id", "84252804-27F2-46C0-91A7-8EB7BF57EE58")]
+ [ExportMetadata("Label", "File Package Manager")]
+ [ExportMetadata("Priority", 10)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class PlainFilePackageManager : IPackageManager
+ {
+ private const string ThreatModelFile = "threatmodel.json";
+ private const string ExtensionsFile = "extensions.json";
+
+ public LocationType SupportedLocations => LocationType.FileSystem;
+
+ public bool CanHandle(LocationType locationType, [Required] string location)
+ {
+ return SupportedLocations.HasFlag(locationType) &&
+ string.Compare(Path.GetExtension(location), ".tm", StringComparison.OrdinalIgnoreCase) == 0;
+ }
+
+ public string GetFilter(LocationType locationType)
+ {
+ return "Threat Model (*.tm)|*.tm";
+ }
+
+ public string GetLatest(LocationType locationType, [Required] string location, out DateTime dateTime)
+ {
+ string result = null;
+ dateTime = DateTime.MinValue;
+
+ if (CanHandle(locationType, location))
+ {
+ var directory = Path.GetDirectoryName(location);
+ var filter = string.Concat(Path.GetFileNameWithoutExtension(location), "_??????????????", ".tm");
+
+ if (!string.IsNullOrWhiteSpace(directory))
+ {
+ result = Directory
+ .GetFiles(directory, filter, SearchOption.TopDirectoryOnly)
+ .OrderByDescending(x => x)
+ .FirstOrDefault();
+
+ if (result != null)
+ dateTime = GetDateTime(result);
+ }
+ }
+
+ return result;
+ }
+
+
+ public IThreatModel Load(LocationType locationType, [Required] string location,
+ IEnumerable extensions, bool strict = true)
+ {
+ IThreatModel result = null;
+
+ if (File.Exists(location))
+ {
+ var package = new Package(location);
+
+ var threatModelContent = package.Read(ThreatModelFile);
+ if (threatModelContent != null)
+ {
+ try
+ {
+ result = ThreatModelManager.Deserialize(threatModelContent, !strict);
+ }
+ catch (JsonSerializationException e)
+ {
+ HandleJsonSerializationException(package, extensions, e);
+ throw;
+ }
+ }
+ }
+ else
+ {
+ throw new FileNotFoundException("Unable to find the specified file.", location);
+ }
+
+ return result;
+ }
+
+ public bool Save([NotNull] IThreatModel model, LocationType locationType, [Required] string location,
+ bool autoAddDateTime, IEnumerable extensions, out string newLocation)
+ {
+ bool result = false;
+ newLocation = null;
+
+ if (model is IThreatModel tm)
+ {
+ var tmSerialized = ThreatModelManager.Serialize(tm);
+ var extList = new ExtensionsList
+ {
+ Extensions =
+ new List(extensions.Where(x => x != null).Select(x => new ExtensionInfo(x.Id, x.Label)))
+ };
+ var extSerialized = Encoding.Unicode.GetBytes(JsonConvert.SerializeObject(extList, new JsonSerializerSettings()
+ {
+ TypeNameHandling = TypeNameHandling.None,
+ }));
+
+ newLocation = autoAddDateTime
+ ? Path.Combine(Path.GetDirectoryName(location),
+ $"{StripDateTimeSuffix(Path.GetFileNameWithoutExtension(location))}_{DateTime.Now.ToString("yyyyMMddHHmmss")}{Path.GetExtension(location)}")
+ : location;
+
+ var package = Package.Create(newLocation);
+ package.Add(ThreatModelFile, tmSerialized);
+ package.Add(ExtensionsFile, extSerialized);
+ package.Save();
+
+ result = true;
+ }
+
+ return result;
+ }
+
+ public void AutoCleanup(LocationType locationType, [Required] string location, [StrictlyPositive] int maxInstances)
+ {
+ if (CanHandle(locationType, location))
+ {
+ var directory = Path.GetDirectoryName(location);
+ var filter = string.Concat(StripDateTimeSuffix(Path.GetFileNameWithoutExtension(location)), "_??????????????", ".tm");
+
+ if (!string.IsNullOrWhiteSpace(directory))
+ {
+ var files = Directory.GetFiles(directory, filter, SearchOption.TopDirectoryOnly);
+ var orderedFiles = files.OrderByDescending(x => x).Skip(maxInstances);
+
+ foreach (var file in orderedFiles)
+ {
+ File.Delete(file);
+ }
+ }
+ }
+ }
+
+ private void HandleJsonSerializationException([NotNull] Package package,
+ IEnumerable extensions,
+ [NotNull] JsonSerializationException e)
+ {
+ byte[] extensionsContent = null;
+
+ try
+ {
+ extensionsContent = package.Read(ExtensionsFile);
+
+ }
+ catch
+ {
+ }
+
+ if (extensionsContent?.Any() ?? false)
+ {
+ var storedExtensions = JsonConvert.DeserializeObject(
+ Encoding.Unicode.GetString(extensionsContent), new JsonSerializerSettings()
+ {
+ TypeNameHandling = TypeNameHandling.None,
+ });
+
+ var currentExtensions = extensions?.Select(x => new ExtensionInfo(x.Id, x.Label)).ToArray();
+
+ if (currentExtensions?.Any() ?? false)
+ {
+ var missingExtensions =
+ storedExtensions.Extensions.Except(currentExtensions, new ExtensionInfoComparer())
+ .ToArray();
+
+ if (missingExtensions.Any())
+ {
+ var builder = new StringBuilder();
+ builder.AppendLine(
+ "A serialization issue has occurred, probably due to one or more of those missing Extensions:");
+ foreach (var ext in missingExtensions)
+ {
+ builder.AppendLine($"- {ext.Label}");
+ }
+
+ throw new ThreatModelOpeningFailureException(builder.ToString(), e);
+ }
+
+ throw new ThreatModelOpeningFailureException("A serialization issue has occurred.", e);
+ }
+ }
+ }
+
+ private string StripDateTimeSuffix([Required] string text)
+ {
+ string result = text;
+
+ Regex regex = new Regex("(_[0-9]{14})");
+ var match = regex.Match(text);
+ if (match.Success)
+ {
+ var capture = match.Captures.OfType().FirstOrDefault();
+ if (capture != null)
+ {
+ result = text.Replace(capture.Value, "");
+ }
+ }
+
+ return result;
+ }
+
+ private DateTime GetDateTime([Required] string text)
+ {
+ DateTime result = DateTime.MinValue;
+
+ Regex regex = new Regex("(_[0-9]{14})");
+ var match = regex.Match(text);
+ if (match.Success)
+ {
+ var capture = match.Captures.OfType().FirstOrDefault();
+ if (capture != null)
+ {
+ result = DateTime.ParseExact(capture.Value.Substring(1), "yyyyMMddHHmmss",
+ System.Globalization.CultureInfo.InvariantCulture);
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/Sources/Extensions/ThreatsManager.PackageManagers/ThreatsManager.PackageManagers.csproj b/Sources/Extensions/ThreatsManager.PackageManagers/ThreatsManager.PackageManagers.csproj
new file mode 100644
index 00000000..8b0ee369
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.PackageManagers/ThreatsManager.PackageManagers.csproj
@@ -0,0 +1,34 @@
+
+
+
+ netcoreapp3.1;net472
+ Threats Manager Platform Package Managers library.
+ 1.3.3.0
+ Simone Curzi
+ Simone Curzi
+ Threats Manager Platform
+ Copyright © Simone Curzi, 2018-2020. All Rights Reserved.
+ https://www.nuget.org/packages/ThreatsManager.Engine/
+ https://github.com/simonec73/threatsmanager
+ 1.3.3.0
+ 1.3.3
+ true
+ ..\..\ThreatsManager.Engine\ThreatsManager.snk
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/Sources/Extensions/ThreatsManager.Quality/Analyzers/ComplexDiagrams.cs b/Sources/Extensions/ThreatsManager.Quality/Analyzers/ComplexDiagrams.cs
new file mode 100644
index 00000000..31c3f819
--- /dev/null
+++ b/Sources/Extensions/ThreatsManager.Quality/Analyzers/ComplexDiagrams.cs
@@ -0,0 +1,106 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel.Composition;
+using System.Linq;
+using PostSharp.Patterns.Contracts;
+using ThreatsManager.Interfaces;
+using ThreatsManager.Interfaces.Extensions;
+using ThreatsManager.Interfaces.ObjectModel;
+using ThreatsManager.Interfaces.ObjectModel.Diagrams;
+using ThreatsManager.Interfaces.ObjectModel.Properties;
+
+namespace ThreatsManager.Quality.Analyzers
+{
+ [Export(typeof(IQualityAnalyzer))]
+ [ExportMetadata("Id", "BF79DB1A-15D1-443D-AE1E-6BEA8137E64A")]
+ [ExportMetadata("Label", "Complex Diagrams Quality Analyzer")]
+ [ExportMetadata("Priority", 21)]
+ [ExportMetadata("Parameters", null)]
+ [ExportMetadata("Mode", ExecutionMode.Simplified)]
+ public class ComplexDiagrams : IQualityAnalyzer
+ {
+ public string Label => "Too Complex Diagrams";
+ public string Description => "Diagrams with too many objects are not easily understood and shall be avoided.";
+ public double MultiplicationFactor => 0.75;
+
+ public override string ToString()
+ {
+ return Label;
+ }
+
+ public bool GetThresholds([NotNull] IThreatModel model, Func isFalsePositive,
+ out double minRed, out double maxRed, out double minYellow, out double maxYellow,
+ out double minGreen, out double maxGreen)
+ {
+ bool result = false;
+ minRed = 0;
+ maxRed = 0;
+ minYellow = double.NaN;
+ maxYellow = double.NaN;
+ minGreen = 0;
+ maxGreen = 0;
+
+ var count = model.Diagrams?.Where(x => !isFalsePositive(this, x)).Count() ?? 0;
+
+ if (count > 0)
+ {
+ minGreen = 0;
+ maxGreen = 0.95;
+ minYellow = 0.97;
+ maxYellow = 1.58;
+ minRed = 1.60;
+ maxRed = 2;
+
+ result = true;
+ }
+ else
+ {
+ minGreen = 0;
+ maxGreen = 1;
+ minRed = double.NaN;
+ maxRed = double.NaN;
+ }
+
+ return result;
+ }
+
+ public double Analyze([NotNull] IThreatModel model, Func isFalsePositive, out IEnumerable