<!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 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.11.2.min.js"></script>

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

    <!-- Scout2 -->
    <script src="inc-scoutsuite/scoutsuite.js"></script>
    <script src="inc-scoutsuite/helpers.js"></script>
    <link href="inc-scoutsuite/scoutsuite.css" rel="stylesheet">
</head>

<body>

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

    <div class="navbar navbar-inverse navbar-fixed-top" role="navigation" id="metadata.list"></div>

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

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

        <!-- Empty header -->
        <div class="page-header">
        </div>

        <!-- Overlay divs used to show entity details in a pop up fashion -->
        <div id="overlay-background" class="overlay-bg"></div>
        <div id="overlay-details" class="overlay col-sm-6"></div>

        <!-- AWS account ID -->
        <div class="row" id="aws_account_id.details" style="margin-bottom: -10px">
            <h4>
                <div class="list-group-item-text center" style="text-align: center" onclick="javascript: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" 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;position:relative;">
            <h2 id="section_title-h2"></h2>
            <div id="findings_download_button" style="display:none;position:absolute;right:0;transform:translateY(+50%);">
                <button id="findings_download_csv_button" type="button" class="btn btn-default"><span class="glyphicon glyphicon-download-alt"></span>CSV</button>
                <button id="findings_download_json_button" type="button" class="btn btn-default"><span class="glyphicon glyphicon-download-alt"></span>JSON</button>
            </div>
        </div>

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

            <!-- Two columns container -->
            <div class="row">
                <div class="col-sm-4" id="double-column-left"></div>
                <div class="col-sm-8" id="double-column-right"></div>
            </div>

            <!-- PLACEHOLDER -->

            <!-- About Scout2 -->
            <div class="row" id="about.details">
                <div class="list-group">
                    <div class="row list-group-item active">
                        About Scout Suite
                    </div>
                    <div class="row list-group-item">
                        <p>Scout Suite is an open-source tool released by <a href="https://www.nccgroup.trust" rel="author" target="_blank">NCC Group</a>.</p>
                        <p>Use the top navigation bar to review the configuration of the supported cloud provider services.</p>
                        <p>
                            For more information about Scout Suite, 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://nccgroup.github.io/Scout2/" target="_blank">https://nccgroup.github.io/Scout2/</a>.
                        </p>
                    </div>
                </div>
            </div>

            <!-- Please wait -->
            <div class="row" id="please_wait.details">
                <div class="list-group">
                    <div class="row list-group-item active">
                        Please wait
                    </div>
                    <div class="row list-group-item">
                        <p>&nbsp;</p>
                        <p>Loading data, this may take a while...</p>
                        <p>&nbsp;</p>
                    </div>
                </div>
            </div>

            <!-- About-run dashboard -->
            <script id="last_run.details.template" type="text/x-handlebars-template">
                <h4>
                    <div class="row" id="last_run.details">
                        <div class="list-group-item active">
                            <div class="list-group-item-heading">Dashboard</div>
                        </div>
                        <div class="list-group-item">
                            <div class="list-group-item-text item-margin">
                                <div class="list-group-item-text" style="text-align: center">&nbsp;</div>
                                <div class="list-group-item">Service
                                    <div class="col-sm-2 pull-right" style="text-align: center">Checks</div>
                                    <div class="col-sm-2 pull-right" style="text-align: center">Findings</div>
                                    <div class="col-sm-2 pull-right" style="text-align: center">Rules</div>
                                    <div class="col-sm-2 pull-right" style="text-align: center">Resources</div>
                                </div>
                                {{#each items.summary}}
                                <a href="#services.{{@key}}.findings" style="color: black !important;">
                                    <div class="list-group-item finding-title-{{dashboard_color max_level checked_items flagged_items}}">{{make_title @key}}
                                        <div class="col-sm-2 pull-right" style="text-align: center">{{checked_items}}</div>
                                        <div class="col-sm-2 pull-right" style="text-align: center">{{flagged_items}}</div>
                                        <div class="col-sm-2 pull-right" style="text-align: center">{{rules_count}}</div>
                                        <div class="col-sm-2 pull-right" style="text-align: center">{{resources_count}}</div>
                                    </div>
                                </a>
                                {{/each}}
                            </div>
                            <div class="list-group-item-text item-margin">&nbsp;</div>
                            <div class="list-group-item-text item-margin">Last run:
                                <div class="list-group-item-text item-margin">Time: {{items.time}}</div>
                                <div class="list-group-item-text item-margin">Command: <code>{{items.cmd}}</code></div>
                            </div>
                            <div class="list-group-item-text item-margin">&nbsp;</div>
                            <div class="list-group-item-text item-margin">Report generated with Scout Suite version <samp>{{items.version}}</samp></div>
                            <div class="list-group-item-text item-margin">&nbsp;</div>
                            <div class="list-group-item-text item-margin">Using ruleset <samp>{{items.ruleset_name}}</samp>:
                                <div class="list-group-item-text item-margin"><p><em>{{items.ruleset_about}}</em></p></div>
                            </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="inc-scoutsuite-run/scoutsuite_config.js"></script>
        <script src="inc-scoutsuite-run/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>

        <!--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;
                if (footerTop < docHeight)
                    $('#footer').css('margin-top', 0 + (docHeight - footerTop) + 'px');
            });
        </script>

    </div>

</body>

</html>
