aws-cis-controls-assessment 1.0.7__py3-none-any.whl → 1.0.9__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.
- aws_cis_assessment/__init__.py +1 -1
- aws_cis_assessment/controls/ig1/control_advanced_security.py +2 -2
- aws_cis_assessment/core/assessment_engine.py +4 -0
- aws_cis_assessment/core/models.py +1 -0
- aws_cis_assessment/core/scoring_engine.py +30 -0
- aws_cis_assessment/reporters/base_reporter.py +2 -0
- aws_cis_assessment/reporters/html_reporter.py +826 -45
- {aws_cis_controls_assessment-1.0.7.dist-info → aws_cis_controls_assessment-1.0.9.dist-info}/METADATA +6 -1
- {aws_cis_controls_assessment-1.0.7.dist-info → aws_cis_controls_assessment-1.0.9.dist-info}/RECORD +20 -16
- docs/README.md +1 -0
- docs/dual-scoring-implementation.md +303 -0
- docs/html-report-improvements.md +422 -0
- docs/installation.md +78 -27
- docs/scoring-comparison-aws-config.md +379 -0
- docs/scoring-methodology.md +350 -0
- docs/user-guide.md +7 -1
- {aws_cis_controls_assessment-1.0.7.dist-info → aws_cis_controls_assessment-1.0.9.dist-info}/WHEEL +0 -0
- {aws_cis_controls_assessment-1.0.7.dist-info → aws_cis_controls_assessment-1.0.9.dist-info}/entry_points.txt +0 -0
- {aws_cis_controls_assessment-1.0.7.dist-info → aws_cis_controls_assessment-1.0.9.dist-info}/licenses/LICENSE +0 -0
- {aws_cis_controls_assessment-1.0.7.dist-info → aws_cis_controls_assessment-1.0.9.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
# Compliance Scoring Methodology
|
|
2
|
+
|
|
3
|
+
This document explains how compliance scores are calculated in the AWS CIS Controls Assessment Framework.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The scoring system uses a **weighted, hierarchical approach** that calculates compliance at three levels:
|
|
8
|
+
1. **Control Level** - Individual CIS Control compliance
|
|
9
|
+
2. **Implementation Group Level** - IG1, IG2, IG3 compliance
|
|
10
|
+
3. **Overall Score** - Aggregate compliance across all IGs
|
|
11
|
+
|
|
12
|
+
## Scoring Hierarchy
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Overall Score (0-100%)
|
|
16
|
+
├── IG1 Score (weight: 1.0)
|
|
17
|
+
│ ├── Control 1.1 (weight: 1.0)
|
|
18
|
+
│ ├── Control 3.3 (weight: 1.5)
|
|
19
|
+
│ └── ... (74 controls)
|
|
20
|
+
├── IG2 Score (weight: 1.5)
|
|
21
|
+
│ ├── Control 3.10 (weight: 1.4)
|
|
22
|
+
│ ├── Control 3.11 (weight: 1.4)
|
|
23
|
+
│ └── ... (58 additional controls)
|
|
24
|
+
└── IG3 Score (weight: 2.0)
|
|
25
|
+
└── ... (13 additional controls)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## 1. Control-Level Scoring
|
|
29
|
+
|
|
30
|
+
### Basic Calculation
|
|
31
|
+
|
|
32
|
+
For each CIS Control, the compliance percentage is calculated as:
|
|
33
|
+
|
|
34
|
+
```
|
|
35
|
+
Control Compliance % = (Compliant Resources / Total Resources) × 100
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Example:**
|
|
39
|
+
- Control 3.3 (Data Access Control)
|
|
40
|
+
- Total Resources Evaluated: 50
|
|
41
|
+
- Compliant Resources: 40
|
|
42
|
+
- Non-Compliant Resources: 10
|
|
43
|
+
- **Control Compliance: 80%**
|
|
44
|
+
|
|
45
|
+
### Resource Status Classification
|
|
46
|
+
|
|
47
|
+
Resources are classified into these statuses:
|
|
48
|
+
|
|
49
|
+
| Status | Description | Counted in Score? |
|
|
50
|
+
|--------|-------------|-------------------|
|
|
51
|
+
| **COMPLIANT** | Resource meets requirements | ✅ Yes (numerator) |
|
|
52
|
+
| **NON_COMPLIANT** | Resource fails requirements | ✅ Yes (denominator only) |
|
|
53
|
+
| **NOT_APPLICABLE** | Rule doesn't apply to resource | ✅ Yes (excluded from both) |
|
|
54
|
+
| **ERROR** | Assessment error occurred | ❌ No (excluded from scoring) |
|
|
55
|
+
|
|
56
|
+
### Control Weighting
|
|
57
|
+
|
|
58
|
+
Controls are weighted based on their security criticality:
|
|
59
|
+
|
|
60
|
+
| Control ID | Weight | Rationale |
|
|
61
|
+
|------------|--------|-----------|
|
|
62
|
+
| 3.3 | 1.5 | Data Access Control - Critical |
|
|
63
|
+
| 3.10 | 1.4 | Encryption in Transit - Critical |
|
|
64
|
+
| 3.11 | 1.4 | Encryption at Rest - Critical |
|
|
65
|
+
| 5.2 | 1.3 | Password Management - Important |
|
|
66
|
+
| 12.8 | 1.3 | Network Segmentation - Important |
|
|
67
|
+
| 4.1 | 1.2 | Secure Configuration - Important |
|
|
68
|
+
| 3.14 | 1.2 | Sensitive Data Logging - Important |
|
|
69
|
+
| 13.1 | 1.2 | Network Monitoring - Important |
|
|
70
|
+
| 7.1 | 1.1 | Vulnerability Management - Important |
|
|
71
|
+
| 1.1 | 1.0 | Asset Inventory - Foundational |
|
|
72
|
+
| Others | 1.0 | Standard weight |
|
|
73
|
+
|
|
74
|
+
**Weighted Control Score:**
|
|
75
|
+
```
|
|
76
|
+
Weighted Control Score = Control Compliance % × Control Weight
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
## 2. Implementation Group (IG) Scoring
|
|
80
|
+
|
|
81
|
+
### IG Compliance Calculation
|
|
82
|
+
|
|
83
|
+
The IG score is a **weighted average** of all control scores within that IG:
|
|
84
|
+
|
|
85
|
+
```
|
|
86
|
+
IG Compliance % = Σ(Control Compliance % × Control Weight) / Σ(Control Weights)
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
**Example - IG1 with 3 controls:**
|
|
90
|
+
- Control 1.1: 90% × 1.0 = 90
|
|
91
|
+
- Control 3.3: 80% × 1.5 = 120
|
|
92
|
+
- Control 4.1: 75% × 1.2 = 90
|
|
93
|
+
- **Total Weighted Score: 300**
|
|
94
|
+
- **Total Weight: 3.7**
|
|
95
|
+
- **IG1 Compliance: 300 / 3.7 = 81.1%**
|
|
96
|
+
|
|
97
|
+
### Control Compliance Threshold
|
|
98
|
+
|
|
99
|
+
A control is considered "compliant" if it achieves **≥80% compliance**. This is used for the "compliant controls" count but doesn't affect the percentage calculation.
|
|
100
|
+
|
|
101
|
+
### IG Weighting
|
|
102
|
+
|
|
103
|
+
Implementation Groups have different weights reflecting their security maturity:
|
|
104
|
+
|
|
105
|
+
| IG | Weight | Description |
|
|
106
|
+
|----|--------|-------------|
|
|
107
|
+
| **IG1** | 1.0 | Essential Cyber Hygiene (baseline) |
|
|
108
|
+
| **IG2** | 1.5 | Enhanced Security (50% more weight) |
|
|
109
|
+
| **IG3** | 2.0 | Advanced Security (2x weight) |
|
|
110
|
+
|
|
111
|
+
## 3. Overall Compliance Score
|
|
112
|
+
|
|
113
|
+
The overall score is a **weighted average** across all assessed Implementation Groups:
|
|
114
|
+
|
|
115
|
+
```
|
|
116
|
+
Overall Score = Σ(IG Compliance % × IG Weight) / Σ(IG Weights)
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### Scenario Examples
|
|
120
|
+
|
|
121
|
+
#### Scenario 1: All IGs Assessed
|
|
122
|
+
```
|
|
123
|
+
IG1: 85% × 1.0 = 85
|
|
124
|
+
IG2: 75% × 1.5 = 112.5
|
|
125
|
+
IG3: 60% × 2.0 = 120
|
|
126
|
+
Total: 317.5 / 4.5 = 70.6%
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
#### Scenario 2: Only IG1 Assessed
|
|
130
|
+
```
|
|
131
|
+
IG1: 85% × 1.0 = 85
|
|
132
|
+
Total: 85 / 1.0 = 85%
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
#### Scenario 3: IG1 + IG2 Assessed
|
|
136
|
+
```
|
|
137
|
+
IG1: 85% × 1.0 = 85
|
|
138
|
+
IG2: 75% × 1.5 = 112.5
|
|
139
|
+
Total: 197.5 / 2.5 = 79%
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Scoring Formula Summary
|
|
143
|
+
|
|
144
|
+
### Complete Formula
|
|
145
|
+
|
|
146
|
+
```
|
|
147
|
+
Overall Score =
|
|
148
|
+
Σ(IG in [IG1, IG2, IG3]) [
|
|
149
|
+
IG_Weight(IG) × (
|
|
150
|
+
Σ(Control in IG) [
|
|
151
|
+
Control_Weight(Control) × (
|
|
152
|
+
Count(Compliant Resources) / Count(Total Scorable Resources)
|
|
153
|
+
)
|
|
154
|
+
] / Σ(Control_Weights in IG)
|
|
155
|
+
)
|
|
156
|
+
] / Σ(IG_Weights)
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
### Simplified View
|
|
160
|
+
|
|
161
|
+
```
|
|
162
|
+
Overall = Weighted Average of IGs
|
|
163
|
+
├─ IG Score = Weighted Average of Controls
|
|
164
|
+
│ └─ Control Score = Compliant / Total Resources
|
|
165
|
+
└─ Weights applied at both levels
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Compliance Ratings
|
|
169
|
+
|
|
170
|
+
Scores are typically interpreted as:
|
|
171
|
+
|
|
172
|
+
| Score Range | Rating | Interpretation |
|
|
173
|
+
|-------------|--------|----------------|
|
|
174
|
+
| 90-100% | **Excellent** | Strong security posture |
|
|
175
|
+
| 80-89% | **Good** | Solid compliance, minor gaps |
|
|
176
|
+
| 70-79% | **Fair** | Moderate compliance, improvement needed |
|
|
177
|
+
| 60-69% | **Poor** | Significant gaps, action required |
|
|
178
|
+
| 0-59% | **Critical** | Major security risks, urgent action needed |
|
|
179
|
+
|
|
180
|
+
## Risk Area Identification
|
|
181
|
+
|
|
182
|
+
The scoring engine identifies top risk areas by:
|
|
183
|
+
|
|
184
|
+
1. **Sorting controls** by compliance percentage (lowest first)
|
|
185
|
+
2. **Filtering** controls with <80% compliance
|
|
186
|
+
3. **Selecting top 5** lowest-scoring controls
|
|
187
|
+
4. **Reporting** with control ID, title, and compliance percentage
|
|
188
|
+
|
|
189
|
+
**Example Risk Areas:**
|
|
190
|
+
```
|
|
191
|
+
1. Control 3.11 (Encryption at Rest): 45.2% compliant
|
|
192
|
+
2. Control 5.2 (Password Management): 52.8% compliant
|
|
193
|
+
3. Control 12.8 (Network Segmentation): 61.3% compliant
|
|
194
|
+
4. Control 3.10 (Encryption in Transit): 68.7% compliant
|
|
195
|
+
5. Control 13.1 (Network Monitoring): 72.4% compliant
|
|
196
|
+
```
|
|
197
|
+
|
|
198
|
+
## Remediation Prioritization
|
|
199
|
+
|
|
200
|
+
Remediation priorities are calculated using:
|
|
201
|
+
|
|
202
|
+
### Priority Calculation
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
Priority = f(Control Weight, Affected Resources, Rule Complexity)
|
|
206
|
+
|
|
207
|
+
HIGH: Control Weight ≥ 1.4 OR Affected Resources ≥ 10
|
|
208
|
+
MEDIUM: Control Weight ≥ 1.2 OR Affected Resources ≥ 5
|
|
209
|
+
LOW: All others
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Effort Estimation
|
|
213
|
+
|
|
214
|
+
```
|
|
215
|
+
Effort = f(Affected Resources, Rule Complexity)
|
|
216
|
+
|
|
217
|
+
Base Effort:
|
|
218
|
+
- Low: ≤5 resources
|
|
219
|
+
- Medium: 6-20 resources
|
|
220
|
+
- High: >20 resources
|
|
221
|
+
|
|
222
|
+
Adjusted for complex rules:
|
|
223
|
+
- IAM password policies
|
|
224
|
+
- VPC security group rules
|
|
225
|
+
- Multi-region CloudTrail
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Example: Complete Scoring Walkthrough
|
|
229
|
+
|
|
230
|
+
### Input Data
|
|
231
|
+
```
|
|
232
|
+
Assessment of IG1 with 3 controls:
|
|
233
|
+
|
|
234
|
+
Control 1.1 (Asset Inventory):
|
|
235
|
+
- 100 resources evaluated
|
|
236
|
+
- 90 compliant
|
|
237
|
+
- 10 non-compliant
|
|
238
|
+
- Weight: 1.0
|
|
239
|
+
|
|
240
|
+
Control 3.3 (Data Access Control):
|
|
241
|
+
- 50 resources evaluated
|
|
242
|
+
- 40 compliant
|
|
243
|
+
- 10 non-compliant
|
|
244
|
+
- Weight: 1.5
|
|
245
|
+
|
|
246
|
+
Control 4.1 (Secure Configuration):
|
|
247
|
+
- 75 resources evaluated
|
|
248
|
+
- 60 compliant
|
|
249
|
+
- 15 non-compliant
|
|
250
|
+
- Weight: 1.2
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
### Step 1: Calculate Control Scores
|
|
254
|
+
```
|
|
255
|
+
Control 1.1: 90/100 = 90%
|
|
256
|
+
Control 3.3: 40/50 = 80%
|
|
257
|
+
Control 4.1: 60/75 = 80%
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### Step 2: Apply Control Weights
|
|
261
|
+
```
|
|
262
|
+
Control 1.1: 90% × 1.0 = 90
|
|
263
|
+
Control 3.3: 80% × 1.5 = 120
|
|
264
|
+
Control 4.1: 80% × 1.2 = 96
|
|
265
|
+
Total Weighted: 306
|
|
266
|
+
Total Weight: 3.7
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Step 3: Calculate IG1 Score
|
|
270
|
+
```
|
|
271
|
+
IG1 Score = 306 / 3.7 = 82.7%
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
### Step 4: Calculate Overall Score
|
|
275
|
+
```
|
|
276
|
+
(Only IG1 assessed)
|
|
277
|
+
Overall Score = 82.7% × 1.0 / 1.0 = 82.7%
|
|
278
|
+
```
|
|
279
|
+
|
|
280
|
+
### Result
|
|
281
|
+
```
|
|
282
|
+
Overall Compliance: 82.7% (Good)
|
|
283
|
+
IG1 Compliance: 82.7%
|
|
284
|
+
Compliant Controls: 2/3 (Controls 3.3 and 4.1 ≥80%)
|
|
285
|
+
Total Resources: 225
|
|
286
|
+
Compliant Resources: 190
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
## Customization
|
|
290
|
+
|
|
291
|
+
### Custom Control Weights
|
|
292
|
+
|
|
293
|
+
You can customize control weights when initializing the scoring engine:
|
|
294
|
+
|
|
295
|
+
```python
|
|
296
|
+
from aws_cis_assessment.core.scoring_engine import ScoringEngine
|
|
297
|
+
|
|
298
|
+
custom_weights = {
|
|
299
|
+
'3.3': 2.0, # Increase data access control importance
|
|
300
|
+
'1.1': 0.5, # Decrease asset inventory importance
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
scoring_engine = ScoringEngine(control_weights=custom_weights)
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
### Custom IG Weights
|
|
307
|
+
|
|
308
|
+
Similarly, you can adjust IG weights:
|
|
309
|
+
|
|
310
|
+
```python
|
|
311
|
+
custom_ig_weights = {
|
|
312
|
+
'IG1': 1.0,
|
|
313
|
+
'IG2': 1.2, # Reduce IG2 weight
|
|
314
|
+
'IG3': 1.5, # Reduce IG3 weight
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
scoring_engine = ScoringEngine(ig_weights=custom_ig_weights)
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Scoring Best Practices
|
|
321
|
+
|
|
322
|
+
1. **Focus on weighted scores** - They reflect security priorities
|
|
323
|
+
2. **Track trends over time** - Compare scores across assessments
|
|
324
|
+
3. **Prioritize high-weight controls** - Maximum security impact
|
|
325
|
+
4. **Address ≥80% threshold** - Get controls to "compliant" status
|
|
326
|
+
5. **Review risk areas** - Focus remediation on lowest scores
|
|
327
|
+
6. **Consider resource counts** - High resource counts = higher impact
|
|
328
|
+
|
|
329
|
+
## Limitations
|
|
330
|
+
|
|
331
|
+
1. **No historical trending** - Current implementation doesn't track score changes over time
|
|
332
|
+
2. **Static weights** - Weights don't adapt to organizational priorities automatically
|
|
333
|
+
3. **Equal resource weighting** - All resources within a control are weighted equally
|
|
334
|
+
4. **No severity levels** - Non-compliance is binary (pass/fail)
|
|
335
|
+
|
|
336
|
+
## Future Enhancements
|
|
337
|
+
|
|
338
|
+
Potential improvements to the scoring system:
|
|
339
|
+
|
|
340
|
+
- **Historical trending** - Track compliance changes over time
|
|
341
|
+
- **Severity-based scoring** - Weight findings by severity (critical, high, medium, low)
|
|
342
|
+
- **Resource criticality** - Weight production resources higher than dev/test
|
|
343
|
+
- **Custom scoring profiles** - Industry-specific weight profiles (finance, healthcare, etc.)
|
|
344
|
+
- **Benchmark comparisons** - Compare scores against industry averages
|
|
345
|
+
- **Predictive scoring** - Estimate future compliance based on trends
|
|
346
|
+
|
|
347
|
+
---
|
|
348
|
+
|
|
349
|
+
**Last Updated**: January 26, 2026
|
|
350
|
+
**Version**: 1.0.8
|
docs/user-guide.md
CHANGED
|
@@ -210,7 +210,7 @@ JSON structure:
|
|
|
210
210
|
|
|
211
211
|
### HTML Format
|
|
212
212
|
|
|
213
|
-
Interactive web-based report:
|
|
213
|
+
Interactive web-based report with enhanced readability features:
|
|
214
214
|
|
|
215
215
|
```bash
|
|
216
216
|
aws-cis-assess assess --output-format html --output-file report.html
|
|
@@ -218,11 +218,17 @@ aws-cis-assess assess --output-format html --output-file report.html
|
|
|
218
218
|
|
|
219
219
|
Features:
|
|
220
220
|
- Executive dashboard with charts
|
|
221
|
+
- Control display names with AWS Config rule names
|
|
222
|
+
- Unique controls per Implementation Group (eliminates duplication)
|
|
223
|
+
- IG membership badges for easy identification
|
|
224
|
+
- Consolidated detailed findings (each resource listed once)
|
|
221
225
|
- Drill-down capabilities
|
|
222
226
|
- Responsive design
|
|
223
227
|
- Remediation guidance
|
|
224
228
|
- Export capabilities
|
|
225
229
|
|
|
230
|
+
> **Note:** See [HTML Report Improvements](html-report-improvements.md) for detailed documentation on the enhanced features, customization options, and examples.
|
|
231
|
+
|
|
226
232
|
### CSV Format
|
|
227
233
|
|
|
228
234
|
Spreadsheet-compatible format:
|
{aws_cis_controls_assessment-1.0.7.dist-info → aws_cis_controls_assessment-1.0.9.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|