forked from nccgroup/Scout2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathreport.html
806 lines (765 loc) · 36.1 KB
/
report.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>AWS Scout2 Report</title>
<!-- Bootstrap core CSS -->
<link href="inc-bootstrap/css/bootstrap.min.css" rel="stylesheet">
<!-- Bootstrap theme -->
<link href="inc-bootstrap/css/bootstrap-theme.min.css" rel="stylesheet">
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
<![endif]-->
<!-- jQuery -->
<script src="inc-jquery/jquery-1.10.2.min.js"></script>
<!-- Handlebars -->
<script src="inc-handlebars/handlebars-v2.0.0-alpha.2.js"></script>
<!-- Scout2 -->
<script src="inc-scout2/scout2.js"></script>
<link href="inc-scout2/scout2.css" rel="stylesheet">
</head>
<body>
<!-- Finding menu item partial -->
<script id="finding_menu_item-partial" type="text/x-handlebars-template">
{{#if macro_items}}
<li><a href="javascript:list_findings('{{finding_entity keyword_prefix entity}}', {{keyword_prefix}}_info['violations'], '{{@key}}')">
{{description}} ({{macro_items.length}})
</a></li>
{{/if}}
</script>
<script>
Handlebars.registerPartial("finding_menu_item", $("#finding_menu_item-partial").html());
</script>
<!-- EC2 security group partial -->
<script id="ec2_security_group-instance_list-partial" type="text/x-handlebars-template">
{{#if instances}}
<div class="accordion">
<h5 class="list-group-item-heading item-margin accordion-heading">{{status}}
<a class="accordion-toggle" data-toggle="collapse" href="#ec2_security_group-{{group}}-instance_list-{{status}}">
<span class="badge pull-right btn-info">{{instances.length}}</span>
</a>
</h5>
<div id="ec2_security_group-{{group}}-instance_list-{{status}}" class="accordion-body collapse">
<div class="accordion-inner">
<ul class="no-bullet">
{{#each instances}}
<li class="list-group-item-text"><a href="javascript:showEC2InstanceDetails('{{../region}}','{{../vpc}}','{{this}}')">{{this}}</a></li>
{{/each}}
</ul>
</div>
</div>
</div>
{{else}}
<h5 class="list-group-item-heading item-margin accordion-heading">{{status}}
<span class="badge pull-right">{{instances.length}}</span>
</h5>
{{/if}}
</script>
<script>
Handlebars.registerPartial("ec2_security_group-instance_list", $("#ec2_security_group-instance_list-partial").html());
</script>
<!-- EC2 instance partial -->
<script id="ec2_instance-partial" type="text/x-handlebars-template">
<div class="list-group" id="ec2_instance-details-{{id}}">
<div class="list-group-item active">
<h4 class="list-group-item-heading">{{id}}</h4>
</div>
<div class="list-group-item">
<h4>Information</h4>
<ul>
<li class="list-group-item-text">Region: {{region}}</li>
<li class="list-group-item-text">Reservation ID: {{reservation_id}}</li>
<li class="list-group-item-text">Access Key name: {{key_name}}</li>
<li class="list-group-item-text">State: {{state}}</li>
<li class="list-group-item-text">Up since: {{launch_time}}</li>
</ul>
</div>
<div class="list-group-item">
<h4>Network</h4>
<ul>
<li class="list-grou-item-text">Public IP: {{ip_address}}</li>
<li class="list-grou-item-text">Public DNS: {{public_dns_name}}</li>
<li class="list-grou-item-text">Private IP: {{private_ip_address}}</li>
<li class="list-grou-item-text">Private DNS: {{private_dns_name}}</li>
</ul>
</div>
</div>
</script>
<script>
Handlebars.registerPartial("ec2_instance", $("#ec2_instance-partial").html());
</script>
<!-- IAM permission resources partial -->
<script id="iam_resources-partial" type=="text/x-handlebars-template">
{{#if Resource}}
<li>Resources:</li>
<ul class="no-bullet">
{{#each Resource}}
<li class="list-group-item-text">{{this}}</li>
{{/each}}
</ul>
{{/if}}
{{#if NotResource}}
<li>NotResources:</li>
<ul class="no-bullet">
{{#each NotResource}}
<li class="list-group-item-text">{{this}}</li>
{{/each}}
</ul>
{{/if}}
</script>
<script>
Handlebars.registerPartial("iam_resources", $("#iam_resources-partial").html());
</script>
<!-- IAM group partial -->
<script id="iam_group-partial" type="text/x-handlebars-template">
<div class="list-group" id="iam_group-details-{{group_id}}">
<div class="list-group-item active">
<h4 class="list-group-item-heading">{{group_name}}</h4>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Information</h4>
<div class="list-group-item-text item-margin">Creation date: {{create_date}}</div>
</div>
<div class="list-group-item" style="padding-bottom: 0 !important;">
<div class="accordion">
<h4 class="list-group-item-heading accordion-heading">Members
{{#if users}}
<a class="accordion-toggle" data-toggle="collapse" href="#iam_group-{{group_id}}"><span class="badge pull-right btn-info">{{users.length}}</span></a>
{{else}}
<span class="badge pull-right">{{users.length}}</span>
{{/if}}
</h4>
<div id="iam_group-{{group_id}}" class="accordion-body collapse">
<div class="accordion-inner">
<ul class="no-bullet">
{{#each users}}
<li><a href="javascript:showIAMUser('{{this}}')">{{this}}</a></li>
{{/each}}
</ul>
</div>
</div>
</div>
</div>
<div class="list-group-item">
{{#if policies}}
<h4 class="list-group-item-heading">Group Policies <spcan class="badge pull-right btn-info">{{count policies}}</span></h4>
{{else}}
<h4 class="list-group-item-heading">Group Policies <spcan class="badge pull-right">{{count policies}}</span></h4>
{{/if}}
{{#each policies}}
<hr>
<div class="accordion item-margin">
<h5 class="list-group-item-heading accordion-heading">{{policy_name}}
<a class="accordion-toggle" data-toggle="collapse" href="#iam_group_policy_details-{{../group_id}}-{{policy_name}}"><span class="badge pull-right btn-info">Details</span></a>
</h5>
<div id="iam_group_policy_details-{{../group_id}}-{{policy_name}}" class="accordion-body collapse">
<div class="accordion-inner">
{{{decodeURIComponent policy_document}}}
</div>
</div>
</div>
{{/each}}
</div>
</div>
</script>
<script>
Handlebars.registerPartial("iam_group", $("#iam_group-partial").html());
</script>
<!-- IAM role partial -->
<script id="iam_role-partial" type="text/x-handlebars-template">
<div class="list-group" id="iam_role-details-{{role_id}}">
<div class="list-group-item active">
<h4 class="list-group-item-heading">{{role_name}}</h4>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Information</h4>
<div class="list-group-item-text item-margin">Creation date: {{create_date}}</div>
</div>
<div class="list-group-item">
<div class="accordion">
<h4 class="list-group-item-heading accordion-heading">Instances
<a class="accordion-toggle" data-toggle="collapse" href="#iam_role_instances-{{role_id}}"><span class="badge pull-right btn-info">{{count_role_instances instance_profiles}}</span></a>
</h4>
<div id="iam_role_instances-{{role_id}}" class="accordion-body collapse">
<div class="accordion-inner">
<ul class="no-bullet">
{{#each instance_profiles}}
{{#each instances}}
<li><a href="javascript:findAndShowEC2InstanceDetails('{{this}}')">{{this}}</a></li>
{{/each}}
{{/each}}
</ul>
</div>
</div>
</div>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Role Policies</h4>
{{#each policies}}
<hr>
<div class="accordion item-margin">
<h5 class="list-group-item-heading accordion-heading">{{policy_name}}
<a class="accordion-toggle" data-toggle="collapse" href="#iam_role_policy_details-{{../role_name}}-{{policy_name}}"><span class="badge pull-right btn-info">Details</span></a>
</h5>
<div id="iam_role_policy_details-{{../role_name}}-{{policy_name}}" class="accordion-body collapse">
<div class="accordion-inner">
{{{decodeURIComponent policy_document}}}
</div>
</div>
</div>
{{/each}}
</div>
</div>
</script>
<script>
Handlebars.registerPartial("iam_role", $("#iam_role-partial").html());
</script>
<!-- IAM user partial -->
<script id="iam_user-partial" type="text/x-handlebars-template">
<div class="list-group" id="iam_user-details-{{user_name}}">
<div class="list-group-item active">
<h4 class="list-group-item-heading">{{user_name}}</h4>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Information</h4>
<div class="list-group-item-text item-margin">Creation date: {{create_date}}</div>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Authentication methods</h4>
<p class="list-group-item-text item-margin">Password enabled: {{has_profiles? logins}}</p>
<ul></ul>
<p class="list-group-item-text item-margin">Multi-Factor enabled: <span id="iam_users-no-mfa-{{user_name}}">{{has_mfa? mfa_devices}}</span></p>
<ul class="item-margin">
{{#each mfa_devices}}
<li class="list-group-item-text"> Serial number: {{serial_number}}</li>
{{/each}}
</ul>
<p class="list-group-item-text item-margin">Access Keys: {{has_access_keys? access_keys}}</p>
<ul class="item-margin">
{{#each access_keys}}
<li class="list-group-item-text"><span id="iam_users-{{status}}-key-no-rotation-{{access_key_id}}">{{access_key_id}}, {{status}}, created on {{create_date}}</span></li>
{{/each}}
</ul>
{{#ifPasswordAndKey logins access_keys}}
<p class="list-group-item-text item-margin">
<span id="iam_users-password-and-key-{{user_name}}"><i class="glyphicon glyphicon-warning-sign"></i> Review the need for password-based and key-based authentication</span>
</p>
{{/ifPasswordAndKey}}
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Groups</h4>
<ul class="no-bullet">
{{#each groups}}
<li class="list-group-item-text"><a href="javascript:showIAMGroup('{{group_name}}')">{{group_name}}</a></li>
{{/each}}
</ul>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">User Policies <span class="badge pull-right" id="iam_users-user-policy-{{user_name}}">{{count policies}}</span></h4>
{{#each policies}}
<hr>
<div class="accordion item-margin">
<h5 class="list-group-item-heading accordion-heading">{{policy_name}}
<a class="accordion-toggle" data-toggle="collapse" href="#iam_user_policy_details-{{../user_name}}-{{policy_name}}"><span class="badge pull-right btn-info">Details</span></a>
</h5>
<div id="iam_user_policy_details-{{../user_name}}-{{policy_name}}" class="accordion-body collapse">
<div class="accordion-inner">
{{{decodeURIComponent policy_document}}}
</div>
</div>
</div>
{{/each}}
</div>
</div>
</script>
<script>
Handlebars.registerPartial("iam_user", $("#iam_user-partial").html());
</script>
<!-- Single EC2 instance template -->
<script id="single_ec2_instance-template" type="text/x-handlebars-template">
<div style="text-align: right; padding-right: 10px; text-weight: bold;"><a href="javascript:hidePopup()">X</a></div>
{{> ec2_instance}}
</script>
<script>
var single_ec2_instance_template = Handlebars.compile($("#single_ec2_instance-template").html());
</script>
<!-- Single IAM group template -->
<script id="single_iam_group-template" type="text/x-handlebars-template">
<div style="text-align: right; padding-right: 10px; text-weight: bold;"><a href="javascript:hidePopup()">X</a></div>
{{> iam_group}}
</script>
<script>
var single_iam_group_template = Handlebars.compile($("#single_iam_group-template").html());
</script>
<!-- Single IAM role template -->
<script id="single_iam_role-template" type="text/x-handlebars-template">
<div style="text-align: right; padding-right: 10px; text-weight: bold;"><a href="javascript:hidePopup()">X</a></div>
{{> iam_role}}
</script>
<script>
var single_iam_role_template = Handlebars.compile($("#single_iam_role-template").html());
</script>
<!-- Single IAM user template -->
<script id="single_iam_user-template" type="text/x-handlebars-template">
<div style="text-align: right; padding-right: 10px; text-weight: bold;"><a href="javascript:hidePopup()">X</a></div>
{{> iam_user}}
</script>
<script>
var single_iam_user_template = Handlebars.compile($("#single_iam_user-template").html());
</script>
<!-- Fixed navbar -->
<div class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<span class="navbar-brand">AWS Scout</span>
</div>
<div class="navbar-collapse collapse">
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
<li class="dropdown">
<a href="javascript:show_ec2()" class="dropdown-toggle" data-toggle="dropdown"><span id="ec2_dropdown">EC2</span><b class="caret"></b></a>
<ul class="dropdown-menu" id="ec2_violations-list">
<script id="ec2_violation-list-template" type="text/x-handlebars-template">
<li><a href="javascript:list_generic('ec2_instance')">Instances</a></li>
<li><a href="javascript:list_generic('ec2_network_acl')">Network ACLs</a></li>
<li><a href="javascript:list_generic('ec2_security_group')">Security Groups</a></li>
<li class="divider"></li>
<li class="dropdown-header">Security risks</li>
{{#each items}}
{{#if macro_items}}
<li><a href="javascript:list_findings('{{finding_entity keyword_prefix entity}}', {{keyword_prefix}}_info['violations'], '{{@key}}')">
{{description}} ({{macro_items.length}})
</a></li>
{{/if}}
{{/each}}
</script>
</ul>
<li class="dropdown">
<a href="javascript:show_iam()" class="dropdown-toggle" data-toggle="dropdown"><span id="iam_dropdown">IAM</span><b class="caret"></b></a>
<ul class="dropdown-menu" id="iam_violations-list">
<script id="iam_violation-list-template" type="text/x-handlebars-template">
<li><a href="javascript:list_generic('iam_group')">Groups</a></li>
<li><a href="javascript:list_generic('iam_permission')">Permissions</a></li>
<li><a href="javascript:list_generic('iam_role')">Roles</a></li>
<li><a href="javascript:list_generic('iam_user')">Users</a></li>
<li class="divider"></li>
<li class="dropdown-header">Security risks</li>
{{#each items}}
{{> finding_menu_item}}
{{/each}}
</script>
</ul>
</li>
<li class="dropdown">
<a href="javascript:show_s3()" class="dropdown-toggle" data-toggle="dropdown"><span id="s3_dropdown">S3</span><b class="caret"></b></a>
<ul class="dropdown-menu" id="s3_violations-list">
<script id="s3_violation-list-template" type="text/x-handlebars-template">
<li><a href="javascript:list_generic('s3_bucket')">Buckets</a></li>
<li class="divider"></li>
<li class="dropdown-header">Security risks</li>
{{#each items}}
{{> finding_menu_item}}
{{/each}}
</script>
</ul>
</li>
<li class="dropdown">
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Help<b class="caret"></b></a>
<ul class="dropdown-menu">
<li><a href="javascript:about()">About AWS Scout2</a></li>
</ul>
</li>
</ul>
</div>
</div><!--/.nav-collapse -->
</div>
</div>
<div class="container theme-showcase" id="container-user">
<div class="page-header">
</div>
<!-- Overlay divs used to show entity details in pop up -->
<div id="overlay-background" class="overlay-bg"></div>
<div id="overlay-details" class="overlay col-sm-6"></div>
<!-- Template for EC2 security groups -->
<div class="row" id="ec2_security_groups-row">
<div class="col-sm-4" id="ec2_security_groups-list">
<script id="ec2_security_group-list-template" type="text/x-handlebars-template">
<ul class="list-group">
<li class="list-group-item"><a href="javascript:showAll('ec2_security_group')">Show all<span class="badge pull-right">{{count_ec2 "regions.vpcs.security_groups"}}</span></a></li>
</ul>
{{#each items}}
{{#if vpcs}}
<ul class="list-group">
<li class="list-group-item active">{{@key}}</li>
{{#each vpcs}}
<div class="list-group-item list-sub-element">
{{@key}}
{{#each security_groups}}
<div class="list-group-item-text list-sub-element" id="ec2_security_group-list-{{id}}"><a href="javascript:browseTo('ec2_security_group', '{{id}}')">{{@key}}</a></div>
{{/each}}
</div>
{{/each}}
</ul>
{{/if}}
{{/each}}
</script>
</ul>
</div>
<div class="col-sm-8" id="ec2_security_groups-details">
<script id="ec2_security_group-detail-template" type="text/x-handlebars-template">
{{#each items}}
{{#each vpcs}}
{{#each security_groups}}
<div class="list-group" id="ec2_security_group-details-{{id}}">
<div class="list-group-item active">
<h4 class="list-group-item-heading">{{@key}}</h4>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Information</h4>
<div class="list-group-item-text item-margin">Description: {{description}}</div>
<div class="list-group-item-text item-margin">ID: {{id}}</div>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Rules</h4>
<ul>
{{# each protocols}}
<li class="list-group-item-text">{{name}}</li>
<ul>
{{# each rules}}
<li class="list-group-item-text">Ports: <span id="ec2_security_groups-{{../name}}-{{ports}}-{{../../id}}">{{ports}}</span></li>
<ul>
{{# each grants}}
<li class="list-group-item-text">{{format_grant this}}<span id="ec2_security_groups-{{../../name}}-{{../ports}}-{{this}}-{{../../../id}}">{{this}}</span></li>
{{/each}}
</ul>
{{/each}}
</ul>
{{/each}}
</ul>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Instances</h4>
{{> ec2_security_group-instance_list instances=running-instances status='Running' region=../../name vpc=../id group=id}}
{{> ec2_security_group-instance_list instances=stopped-instances status='Stopped' region=../../name vpc=../id group=id}}
</div>
</div>
{{/each}}
{{/each}}
{{/each}}
</script>
</div><!-- /.col-sm-8 -->
</div><!-- /.row -->
<!-- Template for EC2 network ACLs -->
<div class="row" id="ec2_network_acls-row">
<div class="col-sm-4" id="ec2_network_acls-list">
<script id="ec2_network_acl-list-template" type="text/x-handlebars-template">
<ul class="list-group">
<li class="list-group-item"><a href="javascript:showAll('ec2_network_acl')">Show all<span class="badge pull-right">{{count_ec2 "regions.vpcs.network_acls"}}</span></a></li>
</ul>
{{#each items}}
{{#if vpcs}}
<ul class="list-group">
<li class="list-group-item active">{{@key}}</li>
{{#each vpcs}}
<div class="list-group-item list-sub-element">
{{@key}}
{{#if network_acls}}
{{#each network_acls}}
<div class="list-group-item-text list-sub-element"><a href="javascript:browseTo('ec2_network_acl', '{{@key}}')">{{@key}}</a></div>
{{/each}}
{{/if}}
</div>
{{/each}}
</ul>
{{/if}}
{{/each}}
</script>
</ul>
</div>
<div class="col-sm-8" id="ec2_network_acls-details">
<script id="ec2_network_acl-detail-template" type="text/x-handlebars-template">
{{#each items}}
{{#each vpcs}}
{{#each network_acls}}
<div class="list-group" id="ec2_network_acl-details-{{@key}}">
<div class="list-group-item active">
<h4 class="list-group-item-heading">{{@key}}</h4>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Inbound rules</h4>
{{{format_network_acls inbound_network_acls 'Source'}}}
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Outbound rules</h4>
{{{format_network_acls outbound_network_acls 'Destination'}}}
</div>
</div>
{{/each}}
{{/each}}
{{/each}}
</script>
</div><!-- /.col-sm-8 -->
</div><!-- /.row -->
<!-- Template for EC2 instances -->
<div class="row" id="ec2_instances-row">
<div class="col-sm-4" id="ec2_instances-list">
<script id="ec2_instance-list-template" type="text/x-handlebars-template">
<ul class="list-group">
<li class="list-group-item"><a href="javascript:showAll('ec2_instance')">Show all<span class="badge pull-right">{{count_ec2 "regions.vpcs.instances"}}</span></a></li>
</ul>
{{#each items}}
{{#if vpcs}}
<ul class="list-group">
<li class="list-group-item active">{{@key}}</li>
{{#each vpcs}}
<div class="list-group-item list-sub-element">
{{@key}}
{{#each instances}}
<div class="list-group-item-text list-sub-element" id="ec2_instance-list-{{id}}"><a href="javascript:browseTo('ec2_instance', '{{id}}')">{{@key}}</a></div>
{{/each}}
</div>
{{/each}}
</ul>
{{/if}}
{{/each}}
</script>
</ul>
</div>
<div class="col-sm-8" id="ec2_instances-details">
<script id="ec2_instance-detail-template" type="text/x-handlebars-template">
{{#each items}}
{{#each vpcs}}
{{#each instances}}
{{> ec2_instance}}
{{/each}}
{{/each}}
{{/each}}
</script>
</div><!-- /.col-sm-8 -->
</div><!-- /.row -->
<!-- Template for IAM groups -->
<div class="row" id="iam_groups-row">
<div class="col-sm-4">
<ul class="list-group" id="iam_groups-list">
<script id="iam_group-list-template" type="text/x-handlebars-template">
<li class="list-group-item"><a href="javascript:showAll('iam_group')">Show all <span class="badge pull-right">{{count items}}</span></a></li>
{{#each items}}
<li class="list-group-item" id="iam_group-list-{{group_id}}">
<a href="javascript:browseTo('iam_group','{{group_id}}')">{{group_name}}</a>
</li>
{{/each}}
</script>
</ul>
</div>
<div class="col-sm-8" id="iam_groups-details">
<script id="iam_group-detail-template" type="text/x-handlebars-template">
{{#each items}}
{{> iam_group}}
{{/each}}
</script>
</div><!-- /.col-sm-8 -->
</div><!-- /.row -->
<!-- Template for IAM permissions -->
<div class="row" id="iam_permissions-row">
<div id="iam_permissions-list"></div>
<script id="iam_permission-list-template" type="text/x-handlebars-template">
{{#each items}}
<div class="list-group">
<div class="row list-group-item active">
<div class="col-sm-4"><h4>{{@key}} Permission</h4></div>
<div class="col-sm-8"><h4>Details</h4></div>
</div>
{{#each this}}
<div class="row list-group-item" id="iam_permission-details-{{@key}}">
<div class="col-sm-4">{{@key}}:</div>
<div class="col-sm-8">
{{#each this}}
<div class="list-group-item-text">{{make_title @key}}:</div>
<ul>
{{#each this}}
{{#if Allow}}
<li class="list-group-item-text">Allow: <a href="javascript:{{entity_details_callback ../../type}}('{{@key}}')">{{@key}}</a></li>
<ul>
{{> iam_resources Allow}}
</ul>
{{/if}}
{{#if Deny}}
<li class="list-group-item-text">Deny: <a href="javascript:{{entity_details_callback ../../type}}('{{@key}}')">{{@key}}</a></li>
<ul>
{{> iam_resources Deny}}
</ul>
{{/if}}
{{/each}}
</ul>
{{/each}}
</div>
</div>
{{/each}}
</div>
{{/each}}
</script>
</div><!-- /.row -->
<!-- Template for IAM roles -->
<div class="row" id="iam_roles-row">
<div class="col-sm-3">
<ul class="list-group" id="iam_roles-list">
<script id="iam_role-list-template" type="text/x-handlebars-template">
<li class="list-group-item"><a href="javascript:showAll('iam_role')">Show all <span class="badge pull-right">{{count items}}</span></a></li>
{{#each items}}
<li class="list-group-item" id="iam_role-list-{{role_id}}">
<a href="javascript:browseTo('iam_role','{{role_id}}')">{{role_name}}</a>
</li>
{{/each}}
</script>
</ul>
</div>
<div class="col-sm-8" id="iam_roles-details">
<script id="iam_role-detail-template" type="text/x-handlebars-template">
{{#each items}}
{{> iam_role}}
{{/each}}
</script>
</div><!-- /.col-sm-8 -->
</div><!-- /.row -->
<!-- Template for IAM users -->
<div class="row" id="iam_users-row">
<div class="col-sm-4">
<ul class="list-group" id="iam_users-list">
<script id="iam_user-list-template" type="text/x-handlebars-template">
<li class="list-group-item"><a href="javascript:showAll('iam_user')">Show all <span class="badge pull-right">{{count items}}</span></a></li>
{{#each items}}
<li class="list-group-item" id="iam_user-list-{{user_name}}">
<a href="javascript:browseTo('iam_user','{{user_name}}')">{{user_name}}</a>
</li>
{{/each}}
</script>
</ul>
</div>
<div class="col-sm-8" id="iam_users-details">
<script id="iam_user-detail-template" type="text/x-handlebars-template">
{{#each items}}
{{> iam_user}}
{{/each}}
</script>
</div><!-- /.col-sm-8 -->
</div><!-- /.row -->
<!-- Template for S3 buckets -->
<div class="row" id="s3_buckets-row">
<div class="col-sm-4">
<ul class="list-group" id="s3_buckets-list">
<script id="s3_bucket-list-template" type="text/x-handlebars-template">
<li class="list-group-item"><a href="javascript:showAll('s3_bucket')">Show all <span class="badge pull-right">{{count items}}</span></a></li>
{{#each items}}
<li class="list-group-item" id="s3_bucket-list-{{@key}}">
<a href="javascript:browseTo('s3_bucket','{{@key}}')">{{@key}}</a>
</li>
{{/each}}
</script>
</ul>
</div>
<div class="col-sm-8" id="s3_buckets-details">
<script id="s3_bucket-detail-template" type="text/x-handlebars-template">
{{#each items}}
<div class="list-group" id="s3_bucket-details-{{@key}}">
<div class="list-group-item active">
<h4 class="list-group-item-heading">{{@key}}</h4>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Information</h4>
<div class="list-group-item-text item-margin">Creation date: {{creation_date}}</div>
<div class="list-group-item-text item-margin">Logging: <span id="s3_buckets-logging-disabled-{{name}}">{{has_logging? logging}}</span></div>
<div class="list-group-item-text item-margin">Versioning: {{versioning}}</div>
</div>
<div class="list-group-item">
<h4 class="list-group-item-heading">Permissions</h4>
<table class="table-striped" width="100%" >
<tr>
<td width="20%"></td>
<td width="20%" class="text-center">Read access</td>
<td width="20%" class="text-center">Read permissions</td>
<td width="20%" class="text-center">Write access</td>
<td width="20%" class="text-center">Write permissions</td>
</tr>
{{#each grants}}
<tr>
<td width="20%">{{@key}}</td>
<td width="20%" class="text-center">
<span id="s3_buckets-{{name}}-read-{{../name}}">{{{s3_grant_2_icon this.read}}}</td></span>
</td>
<td width="20%" class="text-center">
<span id="s3_buckets-{{name}}-read_acp-{{../name}}">{{{s3_grant_2_icon this.read_acp}}}</td></span>
</td>
<td width="20%" class="text-center">
<span id="s3_buckets-{{name}}-write-{{../name}}">{{{s3_grant_2_icon this.write}}}</td></span>
</td>
<td width="20%" class="text-center">
<span id="s3_buckets-{{name}}-write_acp-{{../name}}">{{{s3_grant_2_icon this.write_acp}}}</td></span>
</td>
</tr>
{{/each}}
</table>
</div>
</div>
{{/each}}
</script>
</div><!-- /.col-sm-8 -->
</div><!-- /.row -->
<div class="row" id="about-row">
<div class="list-group">
<div class="row list-group-item active">
About
</div>
<div class="row list-group-item">
<p> </p>
<p>AWS Scout2 is an open-source security tool release by <a href="https://www.isecpartners.com" target="_blank">iSEC Partners</a>.</p>
<p> </p>
<p>Use the top navigation bar to review the configuration of the
supported AWS services. For more information about Scout2, please
check out the project's page on
<a href="https://github.com/iSECPartners/Scout2" target="_blank">Github</a>
and the project's website at
<a href="https://isecpartners.github.io/Scout2/" target="_blank">https://isecpartners.github.io/Scout2/</a>.
<p> </p>
The AWS documentation is available at
<a href="https://aws.amazon.com/documentation" target="_blank">https://aws.amazon.com/documentation</a>.
</p>
</div>
</div>
</div>
</div> <!-- /container -->
<!-- Load EC2 data -->
<script src="inc-awsconfig/ec2_config.js"></script>
<script>
Handlebars.registerPartial("ec2_instance", $("#ec2_instance-partial").html());
load_aws_config_from_json(ec2_info['regions'], 'ec2_security_group', 2);
load_aws_config_from_json(ec2_info['regions'], 'ec2_network_acl', 2);
load_aws_config_from_json(ec2_info['regions'], 'ec2_instance', 2);
highlight_violations(ec2_info['violations'], 'ec2');
</script>
<!-- Load IAM data -->
<script src="inc-awsconfig/iam_config.js"></script>
<script>
load_aws_config_from_json(iam_info['groups'], 'iam_group', 2);
load_aws_config_from_json(iam_info['permissions'], 'iam_permission', 1);
load_aws_config_from_json(iam_info['roles'], 'iam_role', 2);
load_aws_config_from_json(iam_info['users'], 'iam_user', 2);
highlight_violations(iam_info['violations'], 'iam');
</script>
<!-- Load S3 data -->
<script src="inc-awsconfig/s3_config.js"></script>
<script>
load_aws_config_from_json(s3_info['buckets'], 's3_bucket', 2);
highlight_violations(s3_info['violations'], 's3');
</script>
<!-- Bootstrap core JavaScript, placed at the end of the document so the pages load faster -->
<script src="inc-bootstrap/js/bootstrap.min.js"></script>
<!-- Hide the please wait message -->
<script>$('#please_wait-row').hide();</script>
</body>
</html>