aws-samples / aws-saas-factory-hybrid-saas-identity
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 100 units with 2,395 lines of code in units (63.1% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 0 medium complex units (0 lines of code)
    • 5 simple units (173 lines of code)
    • 95 very simple units (2,222 lines of code)
0% | 0% | 0% | 7% | 92%
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
js0% | 0% | 0% | 6% | 93%
ts0% | 0% | 0% | 8% | 91%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
lib/tenant0% | 0% | 0% | 27% | 72%
resources/oidc-provider0% | 0% | 0% | 10% | 89%
resources/add_ldap_user_group0% | 0% | 0% | 52% | 47%
resources/oidc-client0% | 0% | 0% | 32% | 67%
lib/base0% | 0% | 0% | 0% | 100%
resources/add_tenant_infra_lambda0% | 0% | 0% | 0% | 100%
resources/add_federation_configuration_lambda0% | 0% | 0% | 0% | 100%
resources/start_oidc_provider_pipeline_lambda0% | 0% | 0% | 0% | 100%
resources/finish_oidc_provider_pipeline_lambda0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
constructor()
in lib/tenant/oidc-provider-stack.ts
82 8 3
async function getSecret()
in resources/add_ldap_user_group/helpers/get_secret.js
23 7 1
async function getSecret()
in resources/oidc-client/authorizer/helpers/get_secret.js
21 7 1
async function getSecret()
in resources/oidc-provider/account/helpers/get_secret.js
22 7 1
async function getSecret()
in resources/oidc-provider/helpers/get_secret.js
25 7 1
static async signInErrorHandler()
in resources/oidc-provider/account/index.js
19 5 2
async function putPipelineParametersInSsm()
in resources/start_oidc_provider_pipeline_lambda/handler.js
17 4 4
async function createTenantAuth()
in resources/add_tenant_infra_lambda/handler.js
32 4 1
async function createIngress()
in resources/add_tenant_infra_lambda/handler.js
36 4 1
async findAccount()
in resources/oidc-provider/account/cognito_auth/index.js
32 4 2
async function getsettings()
in resources/oidc-provider/settings.js
36 4 1
async function createTenantConfig()
in resources/add_tenant_infra_lambda/handler.js
41 3 1
async function createTenantCert()
in resources/add_tenant_infra_lambda/handler.js
21 3 1
async function createCookieKeysAddToSecrets()
in resources/add_federation_configuration_lambda/handler.js
39 3 1
async function createJwksAddToSecrets()
in resources/add_federation_configuration_lambda/handler.js
34 3 1
async function ldapPasswordAddToSecrets()
in resources/add_federation_configuration_lambda/handler.js
32 3 2
async authenticate()
in resources/oidc-provider/account/ldap_auth/index.js
39 3 2
async findAccount()
in resources/oidc-provider/account/ldap_auth/index.js
54 3 2
params: debug()
in resources/oidc-provider/actions/interaction.js
15 3 1
prompt: debug()
in resources/oidc-provider/actions/interaction.js
14 3 1