awslabs / compliant-framework-for-federal-and-dod-workloads-in-aws-govcloud-us
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 119 units with 3,379 lines of code in units (24.5% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 3 medium complex units (299 lines of code)
    • 9 simple units (392 lines of code)
    • 107 very simple units (2,688 lines of code)
0% | 0% | 8% | 11% | 79%
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% | 16% | 17% | 66%
ts0% | 0% | 2% | 6% | 90%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/repositories/compliant-framework-central-pipeline0% | 0% | 20% | 15% | 64%
deployment/framework-nuke0% | 0% | 0% | 28% | 71%
source/lambda/create_accounts0% | 0% | 0% | 67% | 32%
source/lambda/avm_create_govcloud_account0% | 0% | 0% | 39% | 60%
source/lambda/solution_helper0% | 0% | 0% | 77% | 22%
source/lambda/execute_state_machine0% | 0% | 0% | 50% | 50%
source/lib0% | 0% | 0% | 0% | 100%
source/lib/account-vending-machine0% | 0% | 0% | 0% | 100%
source/repositories0% | 0% | 0% | 0% | 100%
source/lambda/avm_invite_govcloud_account0% | 0% | 0% | 0% | 100%
source/lambda/avm_get_ou0% | 0% | 0% | 0% | 100%
source/lambda/avm_move_account0% | 0% | 0% | 0% | 100%
source/lambda/invite_accounts0% | 0% | 0% | 0% | 100%
source/lambda/initialize_organization0% | 0% | 0% | 0% | 100%
source/lib/solution-helper0% | 0% | 0% | 0% | 100%
source/lambda/verify_govcloud_api_keys0% | 0% | 0% | 0% | 100%
source/lambda/verify_sns_subscription0% | 0% | 0% | 0% | 100%
source/lambda/notify_success0% | 0% | 0% | 0% | 100%
source/lambda/notify_failure0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
def lambda_handler()
in source/repositories/compliant-framework-central-pipeline/lambda/create_update_stack/index.py
184 24 2
def lambda_handler()
in source/repositories/compliant-framework-central-pipeline/lambda/security_hub_invite_members/index.py
70 12 2
private getInitializeOrganizationalUnitsActions()
in source/repositories/compliant-framework-central-pipeline/lib/environment-pipeline-stack.ts
45 11 0
def lambda_handler()
in source/repositories/compliant-framework-central-pipeline/lambda/copy_codecommit_repositories_to_s3/index.py
52 10 2
def delete_stack_set()
in deployment/framework-nuke/framework_nuke_helpers.py
40 9 5
protected getStageOutput()
in source/repositories/compliant-framework-central-pipeline/lib/pipeline-base.ts
24 8 6
def create_govcloud_account()
in source/lambda/avm_create_govcloud_account/index.py
37 8 3
private getSecurityBaselineActions()
in source/repositories/compliant-framework-central-pipeline/lib/environment-pipeline-stack.ts
99 7 0
def create_govcloud_account()
in source/lambda/create_accounts/index.py
39 7 5
def lambda_handler()
in source/lambda/execute_state_machine/index.py
25 7 2
def lambda_handler()
in source/repositories/compliant-framework-central-pipeline/lambda/expand_s3_sources/index.py
49 6 2
def custom_resource()
in source/lambda/solution_helper/lambda_function.py
27 6 2
def get_ou_id()
in source/repositories/compliant-framework-central-pipeline/lambda/stack_set_action/index.py
18 5 2
def create_organizational_unit()
in source/repositories/compliant-framework-central-pipeline/lambda/initialize_organizational_units/index.py
20 5 3
def lambda_handler()
in source/repositories/compliant-framework-central-pipeline/lambda/initialize_organizational_units/index.py
38 5 2
def initialize_organization()
in source/lambda/initialize_organization/index.py
18 5 2
def get_param()
in source/repositories/create_config.py
8 4 1
private createPipeline()
in source/repositories/compliant-framework-central-pipeline/lib/environment-pipeline-stack.ts
57 4 0
def check_children()
in source/lambda/avm_get_ou/index.py
9 4 3
def main()
in source/lambda/avm_move_account/index.py
29 4 2