microsoft / AttackSurfaceAnalyzer
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 578 units with 9,165 lines of code in units (56.2% of code).
    • 2 very complex units (431 lines of code)
    • 3 complex units (352 lines of code)
    • 24 medium complex units (1,507 lines of code)
    • 54 simple units (1,992 lines of code)
    • 495 very simple units (4,883 lines of code)
4% | 3% | 16% | 21% | 53%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
cs4% | 3% | 16% | 21% | 53%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
Lib/Collectors7% | 10% | 24% | 27% | 30%
Cli16% | 0% | 30% | 25% | 28%
Lib/Utils0% | 0% | 10% | 28% | 60%
Benchmarks0% | 0% | 5% | 3% | 90%
Lib/Objects0% | 0% | 4% | 20% | 74%
Lib/Properties0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
public static ASA_ERROR RunCollectCommand()
in Cli/AttackSurfaceAnalyzerClient.cs
194 58 1
public FileSystemObject FilePathToFileSystemObject()
in Lib/Collectors/FileSystemCollector.cs
237 58 1
public void Compare()
in Lib/Collectors/BaseCompare.cs
183 50 4
public static IEnumerable ParseComObjects()
in Lib/Collectors/ComObjectCollector.cs
94 28 3
public static string GetFilePermissions()
in Lib/Collectors/FileSystemUtils.cs
75 27 1
internal void ExecuteOsX()
in Lib/Collectors/UserAccountCollector.cs
77 18 1
private void ProcessManagementObject()
in Lib/Collectors/ServiceCollector.cs
60 17 1
40 17 1
42 17 2
private static List GetNetStatPorts()
in Lib/Utils/Win32OpenPortListenerHelper.cs
83 17 0
public void ExecuteWindows()
in Lib/Collectors/EventLogCollector.cs
71 16 1
internal void ExecuteLinux()
in Lib/Collectors/FirewallCollector.cs
61 16 1
public static SarifLog GenerateSarifLog()
in Cli/AttackSurfaceAnalyzerClient.cs
122 15 2
public void ExecuteLinux()
in Lib/Collectors/EventLogCollector.cs
59 15 1
internal void ExecuteLinux()
in Lib/Collectors/UserAccountCollector.cs
73 15 1
public static bool Setup()
in Benchmarks/SystemSqliteDatabaseManager.cs
99 14 2
private static ASA_ERROR RunConfigCommand()
in Cli/AttackSurfaceAnalyzerClient.cs
82 14 1
public static MacSignature? GetMacSignature()
in Lib/Collectors/FileSystemUtils.cs
59 14 1
public static List GetDllCharacteristics()
in Lib/Collectors/WindowsFileSystemUtils.cs
45 14 1
83 14 0