aws-samples / aws-secret-sidecar-injector
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 37 units with 722 lines of code in units (41.8% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 4 medium complex units (281 lines of code)
    • 3 simple units (130 lines of code)
    • 30 very simple units (311 lines of code)
0% | 0% | 38% | 18% | 43%
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
go0% | 0% | 42% | 19% | 38%
py0% | 0% | 0% | 0% | 100%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
admission-controller0% | 0% | 39% | 20% | 39%
secret-operator/controllers0% | 0% | 94% | 0% | 5%
cmd/aws-secrets-manager0% | 0% | 73% | 0% | 26%
secret-operator0% | 0% | 0% | 93% | 6%
secret-operator/api/v10% | 0% | 0% | 0% | 100%
admission-controller/secret-inject/python0% | 0% | 0% | 0% | 100%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
func()
in secret-operator/controllers/secretsrotationmapping_controller.go
81 15 1
func mutatePods()
in admission-controller/pods.go
78 14 1
func main()
in cmd/aws-secrets-manager/main.go
59 12 0
func serve()
in admission-controller/main.go
63 11 3
func admitPods()
in admission-controller/pods.go
40 9 1
func denySpecificAttachment()
in admission-controller/pods.go
34 7 1
func main()
in secret-operator/main.go
56 7 0
func writeOutput()
in cmd/aws-secrets-manager/main.go
21 5 2
def mutation()
in admission-controller/secret-inject/python/admission_controller.py
14 4 0
func()
in secret-operator/api/v1/zz_generated.deepcopy.go
12 3 1
func()
in secret-operator/api/v1/zz_generated.deepcopy.go
10 3 1
func convertAdmissionResponseToV1()
in admission-controller/convert.go
15 2 1
func convertAdmissionResponseToV1beta1()
in admission-controller/convert.go
15 2 1
func configTLS()
in admission-controller/config.go
9 2 1
func main()
in admission-controller/main.go
20 2 0
func()
in secret-operator/api/v1/zz_generated.deepcopy.go
8 2 1
func()
in secret-operator/api/v1/zz_generated.deepcopy.go
6 2 1
func()
in secret-operator/api/v1/zz_generated.deepcopy.go
8 2 1
func()
in secret-operator/api/v1/zz_generated.deepcopy.go
6 2 1
func()
in secret-operator/api/v1/zz_generated.deepcopy.go
8 2 1