aws-samples / aws-network-firewall-rulegroups-with-proofpoints-emerging-threats-open-ruleset
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 22 units with 360 lines of code in units (50.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 2 medium complex units (97 lines of code)
    • 2 simple units (62 lines of code)
    • 18 very simple units (201 lines of code)
0% | 0% | 26% | 17% | 55%
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% | 26% | 17% | 55%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
ingest_suricata_rules0% | 0% | 26% | 17% | 55%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def process_ruleset()
in ingest_suricata_rules/rules_processor.py
33 20 1
def lambda_handler()
in ingest_suricata_rules/rules_processor.py
64 18 2
def replace_rule_vars_with_values()
in ingest_suricata_rules/rules_processor.py
15 9 2
def lambda_handler()
in ingest_suricata_rules/convert_ids_ips.py
47 8 2
def split_files()
in ingest_suricata_rules/rules_processor.py
15 5 4
def check_rule_group_exists()
in ingest_suricata_rules/convert_ids_ips.py
12 4 1
def convert_ids_ips()
in ingest_suricata_rules/convert_ids_ips.py
10 4 1
def lambda_handler()
in ingest_suricata_rules/summary_report.py
6 4 2
def check_rule_group_exists()
in ingest_suricata_rules/rules_processor.py
12 4 1
def download_ruleset()
in ingest_suricata_rules/rules_downloader.py
27 3 2
def extract_ruleset()
in ingest_suricata_rules/rules_downloader.py
15 3 1
def save_rulesets()
in ingest_suricata_rules/convert_ids_ips.py
11 3 4
def save_rulesets()
in ingest_suricata_rules/rules_processor.py
11 3 4
def trigger_ids_to_ips()
in ingest_suricata_rules/rules_processor.py
11 3 3
def get_deployed_ruleset_version_from_ssm()
in ingest_suricata_rules/rules_downloader.py
9 2 1
def get_current_ruleset_version_from_url()
in ingest_suricata_rules/rules_downloader.py
6 2 1
def lambda_handler()
in ingest_suricata_rules/rules_downloader.py
12 2 2
def get_rulegroups_summary()
in ingest_suricata_rules/summary_report.py
16 2 1
def get_rulegroups_to_convert()
in ingest_suricata_rules/rules_processor.py
9 2 1
def update_version_in_ssm()
in ingest_suricata_rules/rules_downloader.py
7 1 2