elastic / cloudbeat
Duplication

Places in code with 6 or more lines that are exactly the same.

Intro
Learn more...
Duplication Overall
system20% (11,532 lines)
dependency graphs: 2D graph | 3D graph | 3D graph (with duplicates)...
Duplication per Extension
yaml23% (4,714 lines)
go16% (4,287 lines)
rego24% (1,637 lines)
py42% (543 lines)
tf21% (351 lines)
Duplication per Component (primary)
security-policies23% (6,385 lines)
internal15% (3,953 lines)
deploy40% (1,194 lines)
ROOT0% (0 lines)
cmd0% (0 lines)
scripts0% (0 lines)
tools0% (0 lines)
licenses0% (0 lines)
version0% (0 lines)
Longest Duplicates
The list of 50 longest duplicates.
See data for all 4,428 duplicates...
Size#FoldersFilesLinesCode
216 x 2 deploy/asset-inventory-arm
deploy/azure
18:305 (100%)
17:304 (100%)
view
54 x 2 deploy/asset-inventory-cloudformation
deploy/cloudformation
125:204 (44%)
129:208 (42%)
view
48 x 2 deploy/asset-inventory-cloudformation
deploy/cloudformation
41:115 (80%)
50:124 (69%)
view
44 x 2 deploy/asset-inventory-cloudformation
deploy/cloudformation
63:119 (36%)
71:127 (34%)
view
31 x 2 internal/dataprovider/providers/cloud
internal/dataprovider/providers/k8s
25:81 (100%)
25:81 (100%)
view
28 x 2 deploy/test-environments/cdr
deploy/test-environments/cis
71:104 (33%)
32:64 (53%)
view
26 x 2 deploy/test-environments/elk-stack
deploy/test-environments/modules/aws/cloudtrail
62:94 (33%)
31:62 (50%)
view
26 x 2 internal/flavors/benchmark/builder
internal/uniqueness
66:112 (54%)
129:175 (32%)
view
26 x 2 deploy/test-environments/cdr
deploy/test-environments/modules/aws/cloudtrail
73:104 (31%)
31:62 (50%)
view
26 x 2 deploy/test-environments/cdr
deploy/test-environments/elk-stack
73:104 (31%)
62:94 (33%)
view
26 x 2 deploy/test-environments/cis
deploy/test-environments/elk-stack
34:64 (50%)
62:94 (33%)
view
26 x 2 deploy/test-environments/cis
deploy/test-environments/modules/aws/cloudtrail
34:64 (50%)
31:62 (50%)
view
24 x 2 security-policies/bundle...e/cis_gcp/rules/cis_1_5
security-policies/bundle...e/cis_gcp/rules/cis_1_6
81:104 (21%)
67:90 (25%)
view
20 x 2 security-policies/bundle...e/cis_aws/rules/cis_4_3
security-policies/bundle...e/cis_aws/rules/cis_4_4
10:45 (23%)
10:45 (23%)
view
20 x 2 internal/resources/providers/azurelib/inventory
internal/resources/providers/azurelib/inventory
173:197 (13%)
207:231 (13%)
view
20 x 2 security-policies/bundle..._azure/rules/cis_2_1_19
security-policies/bundle..._azure/rules/cis_2_1_20
53:72 (27%)
48:67 (28%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_12
security-policies/bundle...e/cis_aws/rules/cis_4_8
11:41 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_11
security-policies/bundle.../cis_aws/rules/cis_4_14
12:42 (21%)
11:44 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_10
security-policies/bundle...e/cis_aws/rules/cis_4_8
11:41 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_14
security-policies/bundle...e/cis_aws/rules/cis_4_8
11:44 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle...e/cis_aws/rules/cis_4_7
security-policies/bundle...e/cis_aws/rules/cis_4_9
10:40 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_13
security-policies/bundle...e/cis_aws/rules/cis_4_8
11:44 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_10
security-policies/bundle.../cis_aws/rules/cis_4_14
11:41 (22%)
11:44 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_14
security-policies/bundle...e/cis_aws/rules/cis_4_7
11:44 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_11
security-policies/bundle...e/cis_aws/rules/cis_4_5
12:42 (21%)
10:43 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_11
security-policies/bundle...e/cis_aws/rules/cis_4_9
12:42 (21%)
10:40 (22%)
view
19 x 2 security-policies/bundle...e/cis_aws/rules/cis_4_6
security-policies/bundle...e/cis_aws/rules/cis_4_9
11:41 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_12
security-policies/bundle...e/cis_aws/rules/cis_4_7
11:41 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_13
security-policies/bundle...e/cis_aws/rules/cis_4_7
11:44 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_10
security-policies/bundle...e/cis_aws/rules/cis_4_9
11:41 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle...e/cis_aws/rules/cis_4_5
security-policies/bundle...e/cis_aws/rules/cis_4_9
10:43 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_10
security-policies/bundle...e/cis_aws/rules/cis_4_7
11:41 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_11
security-policies/bundle...e/cis_aws/rules/cis_4_8
12:42 (21%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_14
security-policies/bundle...e/cis_aws/rules/cis_4_9
11:44 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_13
security-policies/bundle...e/cis_aws/rules/cis_4_9
11:44 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_12
security-policies/bundle...e/cis_aws/rules/cis_4_9
11:41 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_13
security-policies/bundle.../cis_aws/rules/cis_4_14
11:44 (22%)
11:44 (22%)
view
19 x 2 security-policies/bundle...e/cis_aws/rules/cis_4_5
security-policies/bundle...e/cis_aws/rules/cis_4_7
10:43 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_12
security-policies/bundle...e/cis_aws/rules/cis_4_6
11:41 (22%)
11:41 (22%)
view
19 x 2 security-policies/bundle...e/cis_aws/rules/cis_4_8
security-policies/bundle...e/cis_aws/rules/cis_4_9
10:40 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_13
security-policies/bundle...e/cis_aws/rules/cis_4_6
11:44 (22%)
11:41 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_14
security-policies/bundle...e/cis_aws/rules/cis_4_6
11:44 (22%)
11:41 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_14
security-policies/bundle...e/cis_aws/rules/cis_4_5
11:44 (22%)
10:43 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_13
security-policies/bundle...e/cis_aws/rules/cis_4_5
11:44 (22%)
10:43 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_10
security-policies/bundle.../cis_aws/rules/cis_4_11
11:41 (22%)
12:42 (21%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_12
security-policies/bundle.../cis_aws/rules/cis_4_14
11:41 (22%)
11:44 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_11
security-policies/bundle.../cis_aws/rules/cis_4_12
12:42 (21%)
11:41 (22%)
view
19 x 2 security-policies/bundle...e/cis_aws/rules/cis_4_6
security-policies/bundle...e/cis_aws/rules/cis_4_8
11:41 (22%)
10:40 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_11
security-policies/bundle...e/cis_aws/rules/cis_4_6
12:42 (21%)
11:41 (22%)
view
19 x 2 security-policies/bundle.../cis_aws/rules/cis_4_10
security-policies/bundle.../cis_aws/rules/cis_4_12
11:41 (22%)
11:41 (22%)
view
Duplicated Units
The list of top 36 duplicated units.
See data for all 36 unit duplicates...
Size#FoldersFilesLinesCode
46 x 2 deploy/azure
deploy/asset-inventory-arm
0:0 
0:0 
view
31 x 2 deploy/cloudformation
deploy/asset-inventory-cloudformation
133:170 
129:166 
view
30 x 2 deploy/cloudformation
deploy/asset-inventory-cloudformation
172:209 
168:205 
view
22 x 2 internal/inventory/azurefetcher
internal/resources/providers/msgraph
43:70 
43:70 
view
22 x 2 internal/inventory/azurefetcher
internal/resources/providers/msgraph
101:128 
101:128 
view
22 x 2 internal/inventory/azurefetcher
internal/resources/providers/msgraph
217:244 
217:244 
view
22 x 3 internal/inventory/azurefetcher
internal/inventory/azurefetcher
internal/resources/providers/azurelib
43:70 
574:601 
2016:2043 
view
22 x 2 internal/inventory/azurefetcher
internal/resources/providers/azurelib
43:70 
1308:1335 
view
22 x 2 internal/inventory/azurefetcher
internal/resources/providers/azurelib
515:542 
1780:1807 
view
22 x 9 internal/inventory/awsfetcher
internal/inventory/awsfetcher
internal/inventory/awsfetcher
internal/inventory/awsfetcher
internal/inventory/awsfetcher
internal/inventory/awsfetcher
internal/inventory/awsfetcher
internal/resources/providers/awslib/lambda
internal/resources/providers/awslib/elb
44:71 
44:71 
44:71 
44:71 
44:71 
104:131 
44:71 
44:71 
46:73 
view
22 x 14 internal/inventory/awsfetcher
internal/inventory/awsfetcher
internal/inventory/awsfetcher
internal/inventory/awsfetcher
internal/inventory/awsfetcher
internal/resources/providers/aws_cis/logging
internal/resources/providers/awslib/elb_v2
internal/resources/providers/awslib/sns
internal/resources/providers/awslib/ec2
internal/resources/providers/awslib/rds
...
44:71 
44:71 
44:71 
44:71 
44:71 
44:71 
44:71 
164:191 
46:73 
44:71 
...
view
22 x 2 internal/inventory/awsfetcher
internal/vulnerability
43:70 
43:70 
view
22 x 2 internal/inventory/awsfetcher
internal/resources/providers/awslib/lambda
44:71 
218:245 
view
22 x 2 internal/dataprovider
internal/resources/fetching
38:65 
85:112 
view
22 x 3 internal/resources/providers/azurelib/inventory
internal/resources/providers/azurelib/inventory
internal/resources/providers/azurelib/inventory
42:69 
42:69 
42:69 
view
21 x 2 deploy/cloudformation
deploy/asset-inventory-cloudformation
82:104 
73:95 
view
19 x 2 deploy/cloudformation
deploy/asset-inventory-cloudformation
55:80 
46:71 
view
15 x 2 internal/flavors/benchmark
internal/flavors/benchmark
86:105 
220:240 
view
15 x 2 deploy/cloudformation
deploy/asset-inventory-cloudformation
93:109 
85:101 
view
13 x 2 internal/resources/fetching/registry
internal/resources/fetching
43:60 
142:159 
view
11 x 3 internal/flavors
internal/flavors/benchmark
internal/resources/providers/gcplib/inventory
38:53 
107:122 
42:57 
view
11 x 2 internal/uniqueness
internal/resources/fetching
42:57 
38:53 
view
11 x 2 internal/uniqueness
internal/vulnerability
87:102 
45:60 
view
11 x 3 internal/resources/fetching
internal/resources/providers/awslib
internal/processor/add_cluster_id
83:98 
38:53 
38:53 
view
9 x 2 internal/flavors/benchmark
internal/flavors/benchmark
51:62 
44:55 
view
9 x 4 internal/resources/fetching/fetchers/gcp
internal/resources/fetching/fetchers/gcp
internal/resources/fetching/fetchers/gcp
internal/resources/fetching/fetchers/gcp
88:98 
82:92 
83:93 
83:93 
view
8 x 2 internal/flavors/benchmark
internal/flavors/benchmark
44:54 
55:65 
view
8 x 2 deploy/cloudformation
deploy/asset-inventory-cloudformation
47:57 
39:49 
view
7 x 2 internal/flavors/benchmark
internal/flavors/assetinventory
153:163 
104:114 
view
7 x 4 internal/flavors/benchmark/builder
internal/dataprovider/providers/cloud
internal/dataprovider/providers/k8s
internal/resources/fetching/registry
72:82 
72:82 
72:82 
72:82 
view
7 x 2 internal/flavors/benchmark/builder
internal/uniqueness
103:113 
166:176 
view
7 x 2 internal/resources/providers/gcplib/auth
internal/resources/providers/azurelib/auth
106:116 
100:110 
view
7 x 2 internal/resources/providers/gcplib/inventory
internal/resources/providers/azurelib
106:116 
103:113 
view
7 x 17 internal/resources/providers/aws_cis/logging
internal/resources/providers/aws_cis/monitoring
internal/resources/providers/awslib/ecr
internal/resources/providers/awslib/elb_v2
internal/resources/providers/awslib/sns
internal/resources/providers/awslib/ec2
internal/resources/providers/awslib/rds
internal/resources/providers/awslib/cloudtrail
internal/resources/providers/awslib/lambda
internal/resources/providers/awslib/kms
...
103:113 
101:111 
118:128 
192:202 
192:202 
1376:1386 
118:128 
266:276 
340:350 
266:276 
...
view
7 x 3 internal/resources/providers/msgraph
internal/resources/providers/azurelib
internal/resources/providers/azurelib/governance
276:286 
2133:2143 
103:113 
view
7 x 2 internal/resources/providers/awslib/elb_v2
internal/resources/providers/awslib/elb
103:113 
164:174 
view