aws-samples / aws-network-firewall-automation-examples
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 19 units with 388 lines of code in units (11.2% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 1 medium complex units (29 lines of code)
    • 1 simple units (33 lines of code)
    • 17 very simple units (326 lines of code)
0% | 0% | 7% | 8% | 84%
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
py0% | 0% | 25% | 29% | 45%
js0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
NfwSlackIntegartion/src0% | 0% | 25% | 29% | 45%
Abuse.ch/src0% | 0% | 0% | 0% | 100%
TLSFingerprint/src0% | 0% | 0% | 0% | 100%
SpamHaus/src0% | 0% | 0% | 0% | 100%
EmergingThreats/src0% | 0% | 0% | 0% | 100%
TorProject/src0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 19 most complex units
Unit# linesMcCabe index# params
def isPublishable()
in NfwSlackIntegartion/src/slack-lambda.py
29 14 1
def get_secret()
in NfwSlackIntegartion/src/slack-lambda.py
33 6 0
def convertText2Json()
in NfwSlackIntegartion/src/slack-lambda.py
9 4 1
def lambda_handler()
in NfwSlackIntegartion/src/slack-lambda.py
23 3 2
async function updateRuleGroup()
in Abuse.ch/src/ANFAbuseHostfile.js
23 3 2
async function updateRuleGroup()
in TLSFingerprint/src/TLSFingerprint.js
23 3 1
def post_slack_Message()
in NfwSlackIntegartion/src/slack-lambda.py
19 2 4
async function getDomains()
in TLSFingerprint/src/TLSFingerprint.js
12 2 1
checkServerIdentity: function()
in TLSFingerprint/src/TLSFingerprint.js
8 2 2
function fetchIPs()
in TorProject/src/TorProjectIPFiltering.js
24 1 0
function fetchRules()
in Abuse.ch/src/AbuseCHJA3.js
21 1 0
function fetchRules()
in Abuse.ch/src/AbuseCH.js
21 1 0
async function getDomains()
in Abuse.ch/src/ANFAbuseHostfile.js
26 1 0
function genSid()
in TLSFingerprint/src/TLSFingerprint.js
3 1 0
function fetchCert()
in TLSFingerprint/src/TLSFingerprint.js
25 1 1
function fetchIPs()
in EmergingThreats/src/EmergingThreats.js
22 1 0
function fetchRules()
in EmergingThreats/src/EmergingBotCC.js
21 1 0
function fetchIPs()
in SpamHaus/src/SpamHauseEDropIPFiltering.js
23 1 0
function fetchIPs()
in SpamHaus/src/SpamHauseDropIPFiltering.js
23 1 0