<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<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>Scout Suite Report</title>

    <!--NCC favicon as base64-->
    <link href="data:image/x-icon;base64, " rel="icon" type="image/x-icon" />

    <!-- Bootstrap core CSS -->
    <link href="inc-bootstrap/css/bootstrap.min.css" rel="stylesheet">
    
    <!-- Bootstrap theme -->
    <link id="bootstrap-theme" href="inc-bootstrap/css/bootstrap-light.min.css" rel="stylesheet">
    
    <!-- Fontawesome CSS -->
    <link href="inc-fontawesome/css/all.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-3.3.1.min.js"></script>

    <!-- Handlebars -->
    <script src="inc-handlebars/handlebars-v3.0.0.js"></script>

    <!-- Scout -->
    <script src="inc-scoutsuite/scoutsuite.js"></script>
    <script src="inc-scoutsuite/provider.js"></script>
    <script src="inc-scoutsuite/helpers.js"></script>
    <link href="inc-scoutsuite/css/scoutsuite.css" rel="stylesheet">
    <link id="scout-theme" href="inc-scoutsuite/css/scoutsuite-light.css" rel="stylesheet">
</head>

<body>

    <!------------------>
    <!-- Fixed navbar -->
    <!------------------>

    <div class="navbar fixed-top navbar-expand-md bg-primary" role="navigation" id="metadata.list"></div>

    <!--------------->
    <!-- Container -->
    <!--------------->

    <div class="container theme-showcase mt-5 pt-5" id="container-user">

        <!-- AWS account ID -->
        <div class="row justify-content-center" id="aws_account_id.details">
            <h4>
                <div class="list-group-item-text std-size" onclick="toggle_element('scout2_display_account_id_on_all_pages_form')" >
                    <span id="aws_account_id"></span>
                </div>
                <div id="scout2_display_account_id_on_all_pages_form" class="list-group-item-text center std-size" style="text-align: center; display: none">
                    <label><input id="scout2_display_account_id_on_all_pages" type="checkbox" value="">Display account ID on all pages</label>
                </div>
            </h4>
        </div>

        <!-- Title section -->
        <!--<div id="section_title-div">-->
        <div id="section_title-div" style="display:flex;flex-direction:column;position:relative;">
            <h2 id="section_title-h2"></h2>
            <div id="findings_download_button" style="display:none;position:relative;margin-left:auto">
                <button id="findings_download_csv_button" type="button" class="btn btn-secondary"><i class="fa fa-download"></i>CSV</button>
                <button id="findings_download_json_button" type="button" class="btn btn-secondary"><i class="fa fa-download"></i>JSON</button>
            </div>
        </div>

        <!-- One column container -->
        <div class="row">
            <div class="col-sm-12 w-100" id="single-column">
            </div>

            <!-- Two columns container -->
            <div class="row w-100">
                <div class="col-sm-4 w-100 text-overflow" id="double-column-left"></div>
                <div class="col-sm-8 w-100 pr-0" id="double-column-right"></div>
            </div>

            <!-- PLACEHOLDER -->

            <div class="modal-backdrop fade show" id="please-wait-backdrop"></div>
            <div class="modal fade show" tabindex="-1" role="dialog" id="please-wait-modal" style="padding-right: 17px; display: block;" aria-modal="true">
                <div class="modal-dialog modal-dialog-centered" role="document">
                    <div class="modal-content">
                        <div class="modal-header">
                            <h5 class="modal-title">Please wait</h5>
                        </div>
                        <div class="modal-body">
                            <div class="row list-group-item">
                                <p>Loading data, this may take a while...</p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- About-run dashboard -->
            <script id="last_run.details.template" type="text/x-handlebars-template">
                <h4>
                    <div class="row std-size" id="last_run.details">
                        <div class="list-group-item active">
                            <div class="list-group-item-heading">Dashboard</div>
                        </div>
                        <div class="accordion" id="last_run">
                            <a class="card">
                                <div class="card-header">Service
                                    <div class="col-sm-2 float-right" style="text-align: center">Checks</div>
                                    <div class="col-sm-2 float-right" style="text-align: center">Findings</div>
                                    <div class="col-sm-2 float-right" style="text-align: center">Rules</div>
                                    <div class="col-sm-2 float-right" style="text-align: center">Resources</div>
                                </div>
                            </a>
                            {{#each items.summary}}
                            <a href="#services.{{@key}}.findings" class="card" style="color: black !important">
                                <div class="finding-title card-header">
                                    <i class="fa finding-badge finding-badge-{{dashboard_color max_level checked_items flagged_items}}"></i>
                                    {{make_title @key}}
                                    <div class="col-sm-2 float-right" style="text-align: center">{{checked_items}}</div>
                                    <div class="col-sm-2 float-right" style="text-align: center">{{flagged_items}}</div>
                                    <div class="col-sm-2 float-right" style="text-align: center">{{rules_count}}</div>
                                    <div class="col-sm-2 float-right" style="text-align: center">{{resources_count}}</div>
                                </div>
                            </a>
                            {{/each}}
                            </div>
                        </div>
                    </div>
                </h4>
            </script>

            <!-- Service-specific dashboards -->
            <div class="row">
                <div class="col-sm-12" id="services.id.findings.details">
                    <script id="services.id.findings.details.template" type="text/x-handlebars-template">
                        {{#each items}}
                        {{> dashboard service_name = @key}}
                        {{/each}}
                    </script>
                </div>
            </div>

        </div> <!-- /container -->

        <!-- Include all AWS services configs -->
        <script src="scoutsuite-results/scoutsuite_results.js"></script>
        <script src="scoutsuite-results/scoutsuite_exceptions.js"></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>

        <!-- Display dashbord -->
        <script>
            load_metadata();
        </script>

        <footer>
            <div class="row" id="footer">
                <div>
                    <p>Scout Suite is an open-source tool released by <a href="https://www.nccgroup.trust" rel="author" target="_blank">NCC Group</a>
                        <img src="data:image/x-icon;base64, " rel="icon" type="image/x-icon" alt="Red dot" /></p>
                </div>
            </div>
        </footer>

        <!-- Used by showPopup -->
        <div id="modal-container" class="modal fade" tabindex="-1" role="dialog"></div>

        <!--Always put footer at end of page-->
        <script>
            $(document).ready(function() {
                var docHeight = $(window).height();
                var footerHeight = $('#footer').height();
                var footerTop = $('#footer').position().top + footerHeight;
            });
        </script>
    </div>
</body>

</html>
