runbooks 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
runbooks/__init__.py CHANGED
@@ -4,4 +4,4 @@ runbooks
4
4
  Provides utility functions for math operations, AWS S3 interactions, and data management.
5
5
  """
6
6
 
7
- # __version__ = "0.2.0"
7
+ # __version__ = "0.2.2"
@@ -0,0 +1,24 @@
1
+ {
2
+ "max_workers": 10,
3
+ "checks": {
4
+ "root_mfa": "check_root_mfa_setting",
5
+ "root_usage": "check_root_usage",
6
+ "root_access_key": "check_root_accesskey_usage",
7
+ "iam_user_mfa": "check_iam_user_mfa_setting",
8
+ "iam_password_policy": "check_iam_password_policy",
9
+ "direct_attached_policy": "check_iam_direct_attached_policy",
10
+ "alternate_contacts": "check_alternate_contact_filling",
11
+ "trail_enabled": "check_trail_enabled",
12
+ "multi_region_trail": "check_multi_region_trail_enabled",
13
+ "account_level_bucket_public_access": "check_account_level_bucket_public_access",
14
+ "bucket_public_access": "check_bucket_public_access",
15
+ "cloudwatch_alarm_configuration": "check_cloudwatch_alarm_configuration",
16
+ "multi_region_instance_usage": "check_multiregion_instance_usage",
17
+ "guardduty_enabled": "check_guard_duty_enabled",
18
+ "trusted_advisor": "check_trust_advisor_configuration"
19
+ },
20
+ "credential_report": {
21
+ "first_iam_user_row_index": 2,
22
+ "root_row_index": 1
23
+ }
24
+ }
@@ -0,0 +1,24 @@
1
+ {
2
+ "max_workers": 10,
3
+ "checks": {
4
+ "root_mfa": "check_root_mfa_setting",
5
+ "root_usage": "check_root_usage",
6
+ "root_access_key": "check_root_accesskey_usage",
7
+ "iam_user_mfa": "check_iam_user_mfa_setting",
8
+ "iam_password_policy": "check_iam_password_policy",
9
+ "direct_attached_policy": "check_iam_direct_attached_policy",
10
+ "alternate_contacts": "check_alternate_contact_filling",
11
+ "trail_enabled": "check_trail_enabled",
12
+ "multi_region_trail": "check_multi_region_trail_enabled",
13
+ "account_level_bucket_public_access": "check_account_level_bucket_public_access",
14
+ "bucket_public_access": "check_bucket_public_access",
15
+ "cloudwatch_alarm_configuration": "check_cloudwatch_alarm_configuration",
16
+ "multi_region_instance_usage": "check_multiregion_instance_usage",
17
+ "guardduty_enabled": "check_guard_duty_enabled",
18
+ "trusted_advisor": "check_trust_advisor_configuration"
19
+ },
20
+ "credential_report": {
21
+ "first_iam_user_row_index": 2,
22
+ "root_row_index": 1
23
+ }
24
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "Version": "2012-10-17",
3
+ "Statement": [
4
+ {
5
+ "Sid": "SecurityBaselinePermission",
6
+ "Effect": "Allow",
7
+ "Action": [
8
+ "account:GetAlternateContact",
9
+ "iam:GenerateCredentialReport",
10
+ "iam:GetAccountPasswordPolicy",
11
+ "iam:GetCredentialReport",
12
+ "iam:ListAttachedUserPolicies",
13
+ "iam:ListUserPolicies",
14
+ "iam:ListUsers",
15
+ "sts:GetCallerIdentity",
16
+ "cloudtrail:DescribeTrails",
17
+ "cloudtrail:GetTrail",
18
+ "cloudtrail:GetTrailStatus",
19
+ "cloudwatch:DescribeAlarms",
20
+ "ec2:DescribeInstances",
21
+ "ec2:DescribeNetworkInterfaces",
22
+ "ec2:DescribeRegions",
23
+ "ec2:DescribeSubnets",
24
+ "ec2:DescribeVpcs",
25
+ "guardduty:GetDetector",
26
+ "guardduty:ListDetectors",
27
+ "s3:GetAccountPublicAccessBlock",
28
+ "s3:GetBucketPublicAccessBlock",
29
+ "s3:ListAllMyBuckets",
30
+ "s3:ListBucket",
31
+ "support:DescribeTrustedAdvisorChecks"
32
+ ],
33
+ "Resource": "*"
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,152 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet">
7
+ <title>Security Baseline Assessment Report</title>
8
+ </head>
9
+ <body>
10
+ <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
11
+ <symbol id="check-circle-fill" fill="currentColor" viewBox="0 0 16 16">
12
+ <path
13
+ d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z">
14
+ </path>
15
+ </symbol>
16
+ <symbol id="info-fill" fill="currentColor" viewBox="0 0 16 16">
17
+ <path
18
+ d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z">
19
+ </path>
20
+ </symbol>
21
+ <symbol id="exclamation-triangle-fill" fill="currentColor" viewBox="0 0 16 16">
22
+ <path
23
+ d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z">
24
+ </path>
25
+ </symbol>
26
+ <symbol id="bi-x-circle-fill" fill="currentColor" viewBox="0 0 16 16">
27
+ <path
28
+ d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z">
29
+ </path>
30
+ </symbol>
31
+ <symbol id="bi-dash-circle" fill="currentColor" viewBox="0 0 16 16">
32
+ <path
33
+ d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z">
34
+ </path>
35
+ <path
36
+ d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z">
37
+ </path>
38
+ </symbol>
39
+ </svg>
40
+
41
+ <div class="container">
42
+ <div class="row justify-content-center">
43
+ <div class="col-10 col-lg-8">
44
+ <br>
45
+ <h1 class="text-center">Security Baseline Assessment Report</h1>
46
+ <br>
47
+ <div class="row justify-content-center">
48
+ <div class="col-6"></div>
49
+ <div class="col-6">
50
+ <table class="table">
51
+ <tr>
52
+ <td>Account</td><td>{{ account_id }}</td>
53
+ </tr>
54
+ <tr>
55
+ <td>Generated at</td><td>{{ generated_at }}</td>
56
+ </tr>
57
+ </table>
58
+ </div>
59
+ </div>
60
+
61
+ <div class="row justify-content-center">
62
+ <div class="card">
63
+ <div class="card-body">
64
+ <div class="card-title">
65
+ <b>Overview</b>
66
+ </div>
67
+
68
+ <div class="row">
69
+ {% for level, count in overview %}
70
+ <div class="col">
71
+ <div class="alert alert-{% if level == 'Error' %}dark{% elif level == 'Info' %}primary{% else %}{{ level|lower }}{% endif %}">
72
+ <div class="d-flex align-items-center justify-content-around">
73
+ <h1><a href="#{{ level|lower }}-list" class="link-{% if level == 'Error' %}secondary{% elif level == 'Info' %}primary{% else %}{{ level|lower }}{% endif %}">{{ count }}</a></h1>
74
+ </div>
75
+ <div class="row align-items-center justify-content-center h6">{{ level|upper }}</div>
76
+ </div>
77
+ </div>
78
+ {% endfor %}
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </div>
83
+
84
+ <br>
85
+
86
+ <div class="row justify-content-center">
87
+ <div class="card">
88
+ {% for section in result_sections %}
89
+ <div class="card-body" id="{{ section.level|lower }}-list">
90
+ <div class="accordion" id="accordionSection{{ section.level }}">
91
+
92
+ {% for item in section.result_items %}
93
+ <div class="accordion-item">
94
+ <h2 class="accordion-header" id="panelsStayOpen-heading-{{ section.level|lower }}-{{ '%02d'|format(loop.index) }}">
95
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}" aria-expanded="true" aria-controls="panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}">
96
+ <span class="badge text-bg-{% if section.level == 'Error' %}dark{% elif section.level == 'Info' %}primary{% else %}{{ section.level|lower }}{% endif %} rounded-pill">{{ section.level }}</span>
97
+ <div class="ms-2 me-auto">{{ item.title }}</div>
98
+ </button>
99
+ </h2>
100
+ <div id="panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}" class="accordion-collapse collapse" aria-labelledby="panelsStayOpen-heading-{{ section.level|lower }}-{{ '%02d'|format(loop.index) }}">
101
+ <div class="accordion-body">
102
+ <div class="alert alert-{% if section.level == 'Error' %}dark{% elif section.level == 'Info' %}primary{% else %}{{ section.level|lower }}{% endif %} d-flex align-items-center" role="alert">
103
+ <svg aria-label="{{ section.level }}:" class="bi flex-shrink-0 me-2" width="24" height="24" role="img">
104
+ <use xlink:href="{% if section.level == 'Success' %}#check-circle-fill{% elif section.level == 'Info' or 'Error' %}#info-fill{% else %}#exclamation-triangle-fill{% endif %}"></use>
105
+ </svg>
106
+ <span>{{ item.message }}</span>
107
+ </div>
108
+ <table class="table">
109
+ <thead>
110
+ <tr>
111
+ {% for header in item.table.headers %}
112
+ <th>{{ header }}</th>
113
+ {% endfor %}
114
+ </tr>
115
+ </thead>
116
+ <tbody>
117
+ {% for row in item.table.rows %}
118
+ <tr>
119
+ {% for cell in row %}
120
+ <td>{{ cell }}</td>
121
+ {% endfor %}
122
+ </tr>
123
+ {% endfor %}
124
+ </tbody>
125
+ </table>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ {% endfor %}
130
+ </div>
131
+ </div>
132
+ {% endfor %}
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+
139
+ <div class="container">
140
+ <div class="row justify-content-center">
141
+ <div class="col-10 col-lg-8">
142
+ <br>
143
+
144
+ <!-- Below this section, you can add content references for each language. -->
145
+
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"></script>
151
+ </body>
152
+ </html>
@@ -0,0 +1,152 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet">
7
+ <title>Security Baseline Assessment Report</title>
8
+ </head>
9
+ <body>
10
+ <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
11
+ <symbol id="check-circle-fill" fill="currentColor" viewBox="0 0 16 16">
12
+ <path
13
+ d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z">
14
+ </path>
15
+ </symbol>
16
+ <symbol id="info-fill" fill="currentColor" viewBox="0 0 16 16">
17
+ <path
18
+ d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z">
19
+ </path>
20
+ </symbol>
21
+ <symbol id="exclamation-triangle-fill" fill="currentColor" viewBox="0 0 16 16">
22
+ <path
23
+ d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z">
24
+ </path>
25
+ </symbol>
26
+ <symbol id="bi-x-circle-fill" fill="currentColor" viewBox="0 0 16 16">
27
+ <path
28
+ d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z">
29
+ </path>
30
+ </symbol>
31
+ <symbol id="bi-dash-circle" fill="currentColor" viewBox="0 0 16 16">
32
+ <path
33
+ d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z">
34
+ </path>
35
+ <path
36
+ d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z">
37
+ </path>
38
+ </symbol>
39
+ </svg>
40
+
41
+ <div class="container">
42
+ <div class="row justify-content-center">
43
+ <div class="col-10 col-lg-8">
44
+ <br>
45
+ <h1 class="text-center">Security Baseline Assessment Report</h1>
46
+ <br>
47
+ <div class="row justify-content-center">
48
+ <div class="col-6"></div>
49
+ <div class="col-6">
50
+ <table class="table">
51
+ <tr>
52
+ <td>Account</td><td>{{ account_id }}</td>
53
+ </tr>
54
+ <tr>
55
+ <td>Generated at</td><td>{{ generated_at }}</td>
56
+ </tr>
57
+ </table>
58
+ </div>
59
+ </div>
60
+
61
+ <div class="row justify-content-center">
62
+ <div class="card">
63
+ <div class="card-body">
64
+ <div class="card-title">
65
+ <b>Overview</b>
66
+ </div>
67
+
68
+ <div class="row">
69
+ {% for level, count in overview %}
70
+ <div class="col">
71
+ <div class="alert alert-{% if level == 'Error' %}dark{% elif level == 'Info' %}primary{% else %}{{ level|lower }}{% endif %}">
72
+ <div class="d-flex align-items-center justify-content-around">
73
+ <h1><a href="#{{ level|lower }}-list" class="link-{% if level == 'Error' %}secondary{% elif level == 'Info' %}primary{% else %}{{ level|lower }}{% endif %}">{{ count }}</a></h1>
74
+ </div>
75
+ <div class="row align-items-center justify-content-center h6">{{ level|upper }}</div>
76
+ </div>
77
+ </div>
78
+ {% endfor %}
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </div>
83
+
84
+ <br>
85
+
86
+ <div class="row justify-content-center">
87
+ <div class="card">
88
+ {% for section in result_sections %}
89
+ <div class="card-body" id="{{ section.level|lower }}-list">
90
+ <div class="accordion" id="accordionSection{{ section.level }}">
91
+
92
+ {% for item in section.result_items %}
93
+ <div class="accordion-item">
94
+ <h2 class="accordion-header" id="panelsStayOpen-heading-{{ section.level|lower }}-{{ '%02d'|format(loop.index) }}">
95
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}" aria-expanded="true" aria-controls="panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}">
96
+ <span class="badge text-bg-{% if section.level == 'Error' %}dark{% elif section.level == 'Info' %}primary{% else %}{{ section.level|lower }}{% endif %} rounded-pill">{{ section.level }}</span>
97
+ <div class="ms-2 me-auto">{{ item.title }}</div>
98
+ </button>
99
+ </h2>
100
+ <div id="panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}" class="accordion-collapse collapse" aria-labelledby="panelsStayOpen-heading-{{ section.level|lower }}-{{ '%02d'|format(loop.index) }}">
101
+ <div class="accordion-body">
102
+ <div class="alert alert-{% if section.level == 'Error' %}dark{% elif section.level == 'Info' %}primary{% else %}{{ section.level|lower }}{% endif %} d-flex align-items-center" role="alert">
103
+ <svg aria-label="{{ section.level }}:" class="bi flex-shrink-0 me-2" width="24" height="24" role="img">
104
+ <use xlink:href="{% if section.level == 'Success' %}#check-circle-fill{% elif section.level == 'Info' or 'Error' %}#info-fill{% else %}#exclamation-triangle-fill{% endif %}"></use>
105
+ </svg>
106
+ <span>{{ item.message }}</span>
107
+ </div>
108
+ <table class="table">
109
+ <thead>
110
+ <tr>
111
+ {% for header in item.table.headers %}
112
+ <th>{{ header }}</th>
113
+ {% endfor %}
114
+ </tr>
115
+ </thead>
116
+ <tbody>
117
+ {% for row in item.table.rows %}
118
+ <tr>
119
+ {% for cell in row %}
120
+ <td>{{ cell }}</td>
121
+ {% endfor %}
122
+ </tr>
123
+ {% endfor %}
124
+ </tbody>
125
+ </table>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ {% endfor %}
130
+ </div>
131
+ </div>
132
+ {% endfor %}
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+
139
+ <div class="container">
140
+ <div class="row justify-content-center">
141
+ <div class="col-10 col-lg-8">
142
+ <br>
143
+
144
+ <!-- Below this section, you can add content references for each language. -->
145
+
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"></script>
151
+ </body>
152
+ </html>
@@ -0,0 +1,194 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet">
7
+ <title>Security Baseline Assessment Report</title>
8
+ </head>
9
+ <body>
10
+ <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
11
+ <symbol id="check-circle-fill" fill="currentColor" viewBox="0 0 16 16">
12
+ <path
13
+ d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z">
14
+ </path>
15
+ </symbol>
16
+ <symbol id="info-fill" fill="currentColor" viewBox="0 0 16 16">
17
+ <path
18
+ d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z">
19
+ </path>
20
+ </symbol>
21
+ <symbol id="exclamation-triangle-fill" fill="currentColor" viewBox="0 0 16 16">
22
+ <path
23
+ d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z">
24
+ </path>
25
+ </symbol>
26
+ <symbol id="bi-x-circle-fill" fill="currentColor" viewBox="0 0 16 16">
27
+ <path
28
+ d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z">
29
+ </path>
30
+ </symbol>
31
+ <symbol id="bi-dash-circle" fill="currentColor" viewBox="0 0 16 16">
32
+ <path
33
+ d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z">
34
+ </path>
35
+ <path
36
+ d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z">
37
+ </path>
38
+ </symbol>
39
+ </svg>
40
+
41
+ <div class="container">
42
+ <div class="row justify-content-center">
43
+ <div class="col-10 col-lg-8">
44
+ <br>
45
+ <h1 class="text-center">Security Baseline Assessment Report</h1>
46
+ <br>
47
+ <div class="row justify-content-center">
48
+ <div class="col-6"></div>
49
+ <div class="col-6">
50
+ <table class="table">
51
+ <tr>
52
+ <td>Account</td><td>{{ account_id }}</td>
53
+ </tr>
54
+ <tr>
55
+ <td>Generated at</td><td>{{ generated_at }}</td>
56
+ </tr>
57
+ </table>
58
+ </div>
59
+ </div>
60
+
61
+ <div class="row justify-content-center">
62
+ <div class="card">
63
+ <div class="card-body">
64
+ <div class="card-title">
65
+ <b>Overview</b>
66
+ </div>
67
+
68
+ <div class="row">
69
+ {% for level, count in overview %}
70
+ <div class="col">
71
+ <div class="alert alert-{% if level == 'Error' %}dark{% elif level == 'Info' %}primary{% else %}{{ level|lower }}{% endif %}">
72
+ <div class="d-flex align-items-center justify-content-around">
73
+ <h1><a href="#{{ level|lower }}-list" class="link-{% if level == 'Error' %}secondary{% elif level == 'Info' %}primary{% else %}{{ level|lower }}{% endif %}">{{ count }}</a></h1>
74
+ </div>
75
+ <div class="row align-items-center justify-content-center h6">{{ level|upper }}</div>
76
+ </div>
77
+ </div>
78
+ {% endfor %}
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </div>
83
+
84
+ <br>
85
+
86
+ <div class="row justify-content-center">
87
+ <div class="card">
88
+ {% for section in result_sections %}
89
+ <div class="card-body" id="{{ section.level|lower }}-list">
90
+ <div class="accordion" id="accordionSection{{ section.level }}">
91
+
92
+ {% for item in section.result_items %}
93
+ <div class="accordion-item">
94
+ <h2 class="accordion-header" id="panelsStayOpen-heading-{{ section.level|lower }}-{{ '%02d'|format(loop.index) }}">
95
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}" aria-expanded="true" aria-controls="panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}">
96
+ <span class="badge text-bg-{% if section.level == 'Error' %}dark{% elif section.level == 'Info' %}primary{% else %}{{ section.level|lower }}{% endif %} rounded-pill">{{ section.level }}</span>
97
+ <div class="ms-2 me-auto">{{ item.title }}</div>
98
+ </button>
99
+ </h2>
100
+ <div id="panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}" class="accordion-collapse collapse" aria-labelledby="panelsStayOpen-heading-{{ section.level|lower }}-{{ '%02d'|format(loop.index) }}">
101
+ <div class="accordion-body">
102
+ <div class="alert alert-{% if section.level == 'Error' %}dark{% elif section.level == 'Info' %}primary{% else %}{{ section.level|lower }}{% endif %} d-flex align-items-center" role="alert">
103
+ <svg aria-label="{{ section.level }}:" class="bi flex-shrink-0 me-2" width="24" height="24" role="img">
104
+ <use xlink:href="{% if section.level == 'Success' %}#check-circle-fill{% elif section.level == 'Info' or 'Error' %}#info-fill{% else %}#exclamation-triangle-fill{% endif %}"></use>
105
+ </svg>
106
+ <span>{{ item.message }}</span>
107
+ </div>
108
+ <table class="table">
109
+ <thead>
110
+ <tr>
111
+ {% for header in item.table.headers %}
112
+ <th>{{ header }}</th>
113
+ {% endfor %}
114
+ </tr>
115
+ </thead>
116
+ <tbody>
117
+ {% for row in item.table.rows %}
118
+ <tr>
119
+ {% for cell in row %}
120
+ <td>{{ cell }}</td>
121
+ {% endfor %}
122
+ </tr>
123
+ {% endfor %}
124
+ </tbody>
125
+ </table>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ {% endfor %}
130
+ </div>
131
+ </div>
132
+ {% endfor %}
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+
139
+ <div class="container">
140
+ <div class="row justify-content-center">
141
+ <div class="col-10 col-lg-8">
142
+
143
+ <!-- Below this section, you can add content references for each language. -->
144
+
145
+ <br>
146
+ <div class="row">
147
+ <div class="alert alert-primary d-flex align-items-center" role="alert">
148
+ <svg aria-label="Info:" class="bi flex-shrink-0 me-2" width="24" height="24" role="img">
149
+ <use xlink:href="#info-fill"></use>
150
+ </svg>
151
+ <span>
152
+ 계정 보안을 위한 추가적인 사항은&nbsp;
153
+ [<a href="https://www.awsstartup.io/security/network-security/aws-tip" target="_blank" style="overflow:hidden;word-break:break-all;">
154
+ 계정 안전하게 지키기 Tip
155
+ </a>]&nbsp;을 참고해주세요.
156
+ </span>
157
+ </div>
158
+ </div>
159
+
160
+ <div class="row">
161
+ <div class="alert alert-primary d-flex align-items-center" role="alert">
162
+ <svg aria-label="Info:" class="bi flex-shrink-0 me-2" width="24" height="24" role="img">
163
+ <use xlink:href="#info-fill"></use>
164
+ </svg>
165
+ <span>
166
+ <a href="https://aws.amazon.com/ko/blogs/korea/aws-trusted-advisor-new-priority-capability/" target="_blank" style="overflow:hidden;word-break:break-all;">
167
+ AWS Trusted Advisor
168
+ </a>는 지속적으로 AWS 계정에 대한 비용 절감, 가용성 및 성능 향상, 보안 개선을 위한 정보를 고객에게 제공합니다.
169
+ </span>
170
+ </div>
171
+ </div>
172
+
173
+ <div class="row">
174
+ <div class="alert alert-primary d-flex align-items-center" role="alert">
175
+ <svg aria-label="Info:" class="bi flex-shrink-0 me-2" width="24" height="24" role="img">
176
+ <use xlink:href="#info-fill"></use>
177
+ </svg>
178
+ <span>
179
+ AWS Trusted Advisor 사용 방법에 대한 자세한 내용은
180
+ <a href="https://aws.amazon.com/ko/premiumsupport/knowledge-center/trusted-advisor-intro/" target="_blank" style="overflow:hidden;word-break:break-all;">
181
+ 여기
182
+ </a>를 눌러 확인해주세요.
183
+ </span>
184
+ </div>
185
+ </div>
186
+
187
+ <div class="col"></div>
188
+ </div>
189
+ </div>
190
+ </div>
191
+
192
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"></script>
193
+ </body>
194
+ </html>
@@ -0,0 +1,152 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1">
6
+ <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/css/bootstrap.min.css" rel="stylesheet">
7
+ <title>Security Baseline Assessment Report</title>
8
+ </head>
9
+ <body>
10
+ <svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
11
+ <symbol id="check-circle-fill" fill="currentColor" viewBox="0 0 16 16">
12
+ <path
13
+ d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zm-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z">
14
+ </path>
15
+ </symbol>
16
+ <symbol id="info-fill" fill="currentColor" viewBox="0 0 16 16">
17
+ <path
18
+ d="M8 16A8 8 0 1 0 8 0a8 8 0 0 0 0 16zm.93-9.412-1 4.705c-.07.34.029.533.304.533.194 0 .487-.07.686-.246l-.088.416c-.287.346-.92.598-1.465.598-.703 0-1.002-.422-.808-1.319l.738-3.468c.064-.293.006-.399-.287-.47l-.451-.081.082-.381 2.29-.287zM8 5.5a1 1 0 1 1 0-2 1 1 0 0 1 0 2z">
19
+ </path>
20
+ </symbol>
21
+ <symbol id="exclamation-triangle-fill" fill="currentColor" viewBox="0 0 16 16">
22
+ <path
23
+ d="M8.982 1.566a1.13 1.13 0 0 0-1.96 0L.165 13.233c-.457.778.091 1.767.98 1.767h13.713c.889 0 1.438-.99.98-1.767L8.982 1.566zM8 5c.535 0 .954.462.9.995l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 5.995A.905.905 0 0 1 8 5zm.002 6a1 1 0 1 1 0 2 1 1 0 0 1 0-2z">
24
+ </path>
25
+ </symbol>
26
+ <symbol id="bi-x-circle-fill" fill="currentColor" viewBox="0 0 16 16">
27
+ <path
28
+ d="M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0zM5.354 4.646a.5.5 0 1 0-.708.708L7.293 8l-2.647 2.646a.5.5 0 0 0 .708.708L8 8.707l2.646 2.647a.5.5 0 0 0 .708-.708L8.707 8l2.647-2.646a.5.5 0 0 0-.708-.708L8 7.293 5.354 4.646z">
29
+ </path>
30
+ </symbol>
31
+ <symbol id="bi-dash-circle" fill="currentColor" viewBox="0 0 16 16">
32
+ <path
33
+ d="M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z">
34
+ </path>
35
+ <path
36
+ d="M4 8a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7A.5.5 0 0 1 4 8z">
37
+ </path>
38
+ </symbol>
39
+ </svg>
40
+
41
+ <div class="container">
42
+ <div class="row justify-content-center">
43
+ <div class="col-10 col-lg-8">
44
+ <br>
45
+ <h1 class="text-center">Security Baseline Assessment Report</h1>
46
+ <br>
47
+ <div class="row justify-content-center">
48
+ <div class="col-6"></div>
49
+ <div class="col-6">
50
+ <table class="table">
51
+ <tr>
52
+ <td>Account</td><td>{{ account_id }}</td>
53
+ </tr>
54
+ <tr>
55
+ <td>Generated at</td><td>{{ generated_at }}</td>
56
+ </tr>
57
+ </table>
58
+ </div>
59
+ </div>
60
+
61
+ <div class="row justify-content-center">
62
+ <div class="card">
63
+ <div class="card-body">
64
+ <div class="card-title">
65
+ <b>Overview</b>
66
+ </div>
67
+
68
+ <div class="row">
69
+ {% for level, count in overview %}
70
+ <div class="col">
71
+ <div class="alert alert-{% if level == 'Error' %}dark{% elif level == 'Info' %}primary{% else %}{{ level|lower }}{% endif %}">
72
+ <div class="d-flex align-items-center justify-content-around">
73
+ <h1><a href="#{{ level|lower }}-list" class="link-{% if level == 'Error' %}secondary{% elif level == 'Info' %}primary{% else %}{{ level|lower }}{% endif %}">{{ count }}</a></h1>
74
+ </div>
75
+ <div class="row align-items-center justify-content-center h6">{{ level|upper }}</div>
76
+ </div>
77
+ </div>
78
+ {% endfor %}
79
+ </div>
80
+ </div>
81
+ </div>
82
+ </div>
83
+
84
+ <br>
85
+
86
+ <div class="row justify-content-center">
87
+ <div class="card">
88
+ {% for section in result_sections %}
89
+ <div class="card-body" id="{{ section.level|lower }}-list">
90
+ <div class="accordion" id="accordionSection{{ section.level }}">
91
+
92
+ {% for item in section.result_items %}
93
+ <div class="accordion-item">
94
+ <h2 class="accordion-header" id="panelsStayOpen-heading-{{ section.level|lower }}-{{ '%02d'|format(loop.index) }}">
95
+ <button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}" aria-expanded="true" aria-controls="panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}">
96
+ <span class="badge text-bg-{% if section.level == 'Error' %}dark{% elif section.level == 'Info' %}primary{% else %}{{ section.level|lower }}{% endif %} rounded-pill">{{ section.level }}</span>
97
+ <div class="ms-2 me-auto">{{ item.title }}</div>
98
+ </button>
99
+ </h2>
100
+ <div id="panelsStayOpen-collapse-{{ section.level|lower }}-{{ '%02d'|format(loop.index)}}" class="accordion-collapse collapse" aria-labelledby="panelsStayOpen-heading-{{ section.level|lower }}-{{ '%02d'|format(loop.index) }}">
101
+ <div class="accordion-body">
102
+ <div class="alert alert-{% if section.level == 'Error' %}dark{% elif section.level == 'Info' %}primary{% else %}{{ section.level|lower }}{% endif %} d-flex align-items-center" role="alert">
103
+ <svg aria-label="{{ section.level }}:" class="bi flex-shrink-0 me-2" width="24" height="24" role="img">
104
+ <use xlink:href="{% if section.level == 'Success' %}#check-circle-fill{% elif section.level == 'Info' or 'Error' %}#info-fill{% else %}#exclamation-triangle-fill{% endif %}"></use>
105
+ </svg>
106
+ <span>{{ item.message }}</span>
107
+ </div>
108
+ <table class="table">
109
+ <thead>
110
+ <tr>
111
+ {% for header in item.table.headers %}
112
+ <th>{{ header }}</th>
113
+ {% endfor %}
114
+ </tr>
115
+ </thead>
116
+ <tbody>
117
+ {% for row in item.table.rows %}
118
+ <tr>
119
+ {% for cell in row %}
120
+ <td>{{ cell }}</td>
121
+ {% endfor %}
122
+ </tr>
123
+ {% endfor %}
124
+ </tbody>
125
+ </table>
126
+ </div>
127
+ </div>
128
+ </div>
129
+ {% endfor %}
130
+ </div>
131
+ </div>
132
+ {% endfor %}
133
+ </div>
134
+ </div>
135
+ </div>
136
+ </div>
137
+ </div>
138
+
139
+ <div class="container">
140
+ <div class="row justify-content-center">
141
+ <div class="col-10 col-lg-8">
142
+ <br>
143
+
144
+ <!-- Below this section, you can add content references for each language. -->
145
+
146
+ </div>
147
+ </div>
148
+ </div>
149
+
150
+ <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.0-beta1/dist/js/bootstrap.bundle.min.js"></script>
151
+ </body>
152
+ </html>
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: runbooks
3
- Version: 0.2.0
3
+ Version: 0.2.2
4
4
  Summary: CloudOps Automation Toolkit for DevOps and SRE teams.
5
5
  Author-email: runbooks maintainers <nnthanh101@gmail.com>
6
6
  License: Apache License
@@ -246,7 +246,7 @@ Requires-Dist: jmespath>=1.0.1
246
246
  Requires-Dist: python-dateutil>=2.9.0
247
247
  Requires-Dist: s3transfer>=0.10.4
248
248
  Requires-Dist: six>=1.17.0
249
- Requires-Dist: urllib3>=2.3.0
249
+ Requires-Dist: urllib3~=2.3.0
250
250
  Requires-Dist: openai>=1.58.1
251
251
  Requires-Dist: pydantic>=2.10.4
252
252
  Requires-Dist: pydantic-ai>=0.0.16
@@ -255,7 +255,7 @@ Requires-Dist: pandas>=2.2.3
255
255
  Requires-Dist: plotly>=5.24.1
256
256
  Requires-Dist: vizro>=0.1.30
257
257
  Requires-Dist: vizro-ai>=0.3.2
258
- Requires-Dist: runbooks>=0.2.0
258
+ Requires-Dist: runbooks>=0.2.2
259
259
 
260
260
  # 🔥 CloudOps Automation at Scale 🦅
261
261
 
@@ -1,4 +1,4 @@
1
- runbooks/__init__.py,sha256=kY6D9wYJKiQCqN99mrzFp9V5Hyh3ij_exozC2AL6FRc,133
1
+ runbooks/__init__.py,sha256=qeIbPORHnybodq1itJ5LeDQ49K9KMNhyZb1SLIePLxg,133
2
2
  runbooks/aws/__init__.py,sha256=iswGPspnFaHLE_Zzw2uRraYI2zvJ1Nma5PbdOiBUdEo,1646
3
3
  runbooks/aws/dynamodb_operations.py,sha256=c91YACBHnOELL8Ufj7tRQws9azGqnB6flQsacTi57xQ,6490
4
4
  runbooks/aws/ec2_copy_image_cross-region.py,sha256=2Afoo2ddzswgtdhdzsDq5aZiqXkQ0_kUyRdHbhkaLAA,6017
@@ -20,7 +20,14 @@ runbooks/python101/exceptions.py,sha256=4KuSN-Kz-Xx17dU8i4rMbECANA4IXdT5dAposuv3
20
20
  runbooks/python101/file_manager.py,sha256=7QLxO2eiwlgcTpdnbd80TIP1CNFGz0ZGpGKnBZvpdAk,7163
21
21
  runbooks/python101/toolkit.py,sha256=bWoP_r8GhsEPFsgTKSeJiilcjxO4A1fynjSDSOnlmzQ,3709
22
22
  runbooks/security_baseline/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
23
+ runbooks/security_baseline/config-origin.json,sha256=PGgnYqIezumoAO_q5Wav6HDmC7O-OLFucqwC_0dkCcQ,1008
24
+ runbooks/security_baseline/config.json,sha256=PGgnYqIezumoAO_q5Wav6HDmC7O-OLFucqwC_0dkCcQ,1008
25
+ runbooks/security_baseline/permission.json,sha256=rpn6jdZja8SidfjHtQDjzNBx9qlg9Xl4ZZ3RxDXzKGc,1260
23
26
  runbooks/security_baseline/report_generator.py,sha256=rHh9d6OBg_Qcy59ZJSCfZu0ur-LeE_dSIc2LJQAtWMY,6333
27
+ runbooks/security_baseline/report_template_en.html,sha256=wXommD4UxeorrsvPDMTclGMycCW0tT0sq3S2thztc8I,8039
28
+ runbooks/security_baseline/report_template_jp.html,sha256=wXommD4UxeorrsvPDMTclGMycCW0tT0sq3S2thztc8I,8039
29
+ runbooks/security_baseline/report_template_kr.html,sha256=3zAQOM5Wwy_J3dXt_KxfvLm-0uksWgenBwySUXvFhU4,10489
30
+ runbooks/security_baseline/report_template_vn.html,sha256=wXommD4UxeorrsvPDMTclGMycCW0tT0sq3S2thztc8I,8039
24
31
  runbooks/security_baseline/run_script.py,sha256=lrvbcOtofspBnI17YYw2q_3CG4q3awoEnsaZ2HcGZ_E,2084
25
32
  runbooks/security_baseline/security_baseline_tester.py,sha256=mOVvWWXByaQklth0QeEHxGCMT7bVGrUIVRgmUhINeg0,7354
26
33
  runbooks/security_baseline/checklist/__init__.py,sha256=gXjVSA36zv5jCkaw3XASG8DpLPo6Fu8yxquUdX8YSFY,455
@@ -47,8 +54,8 @@ runbooks/security_baseline/utils/level_const.py,sha256=l8uYBmgEMjIQTGVVuXPAfDd_P
47
54
  runbooks/security_baseline/utils/permission_list.py,sha256=nq06vlILHp9rfnCpJauCmFCOEGdgFMF-XO3uBFrrd-o,767
48
55
  runbooks/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
49
56
  runbooks/utils/logger.py,sha256=ifxqLjDlZoDaG8rtAGVKLZ5dAwcMn16rB4YgMfeUC3E,972
50
- runbooks-0.2.0.dist-info/METADATA,sha256=mLyTl1No0at27s2qw15cDpiOjl6N6xsIgXhS2Tcsr04,24982
51
- runbooks-0.2.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
52
- runbooks-0.2.0.dist-info/entry_points.txt,sha256=OJnk7J9_zVLbo3ZDr9DZ-RviRA8TsU9nMZJnNI91otQ,120
53
- runbooks-0.2.0.dist-info/top_level.txt,sha256=1EwNxU12QGOLtO0Naw75hXIdSIhgV_b-z_6vhlhVkhM,9
54
- runbooks-0.2.0.dist-info/RECORD,,
57
+ runbooks-0.2.2.dist-info/METADATA,sha256=myHAk6MRwOOFjRu2vYWUxrx4SafUC8To5cHvqoEqCWw,24982
58
+ runbooks-0.2.2.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
59
+ runbooks-0.2.2.dist-info/entry_points.txt,sha256=OJnk7J9_zVLbo3ZDr9DZ-RviRA8TsU9nMZJnNI91otQ,120
60
+ runbooks-0.2.2.dist-info/top_level.txt,sha256=1EwNxU12QGOLtO0Naw75hXIdSIhgV_b-z_6vhlhVkhM,9
61
+ runbooks-0.2.2.dist-info/RECORD,,