aws-cis-controls-assessment 1.0.9__py3-none-any.whl → 1.0.10__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/config/rules/cis_controls_ig1.yaml +94 -1
- aws_cis_assessment/config/rules/cis_controls_ig2.yaml +83 -1
- aws_cis_assessment/controls/ig1/__init__.py +17 -0
- aws_cis_assessment/controls/ig1/control_aws_backup_service.py +1276 -0
- aws_cis_assessment/controls/ig2/__init__.py +12 -0
- aws_cis_assessment/controls/ig2/control_aws_backup_ig2.py +23 -0
- aws_cis_assessment/core/assessment_engine.py +20 -0
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.0.10.dist-info}/METADATA +53 -10
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.0.10.dist-info}/RECORD +23 -20
- docs/README.md +14 -3
- docs/adding-aws-backup-controls.md +562 -0
- docs/assessment-logic.md +291 -3
- docs/cli-reference.md +1 -1
- docs/config-rule-mappings.md +46 -5
- docs/developer-guide.md +312 -3
- docs/installation.md +2 -2
- docs/troubleshooting.md +211 -2
- docs/user-guide.md +47 -2
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.0.10.dist-info}/WHEEL +0 -0
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.0.10.dist-info}/entry_points.txt +0 -0
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.0.10.dist-info}/licenses/LICENSE +0 -0
- {aws_cis_controls_assessment-1.0.9.dist-info → aws_cis_controls_assessment-1.0.10.dist-info}/top_level.txt +0 -0
aws_cis_assessment/__init__.py
CHANGED
|
@@ -6,6 +6,6 @@ CIS Controls Implementation Groups (IG1, IG2, IG3). Implements 145 comprehensive
|
|
|
6
6
|
across all implementation groups for complete security compliance assessment.
|
|
7
7
|
"""
|
|
8
8
|
|
|
9
|
-
__version__ = "1.0.
|
|
9
|
+
__version__ = "1.0.10"
|
|
10
10
|
__author__ = "AWS CIS Assessment Team"
|
|
11
11
|
__description__ = "Production-ready AWS CIS Controls Compliance Assessment Framework"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
implementation_group: IG1
|
|
2
|
-
total_rules:
|
|
2
|
+
total_rules: 76
|
|
3
3
|
description: Essential cyber hygiene - foundational safeguards for all enterprises
|
|
4
4
|
controls:
|
|
5
5
|
'1.1':
|
|
@@ -108,6 +108,99 @@ controls:
|
|
|
108
108
|
parameters: {}
|
|
109
109
|
description: Assessment for s3-bucket-replication-enabled AWS Config rule.
|
|
110
110
|
remediation_guidance: Follow AWS Config rule guidance for s3-bucket-replication-enabled
|
|
111
|
+
- name: backup-plan-min-frequency-and-min-retention-check
|
|
112
|
+
resource_types:
|
|
113
|
+
- AWS::Backup::BackupPlan
|
|
114
|
+
parameters: {}
|
|
115
|
+
description: Validates AWS Backup plans have appropriate backup frequency and retention policies to ensure data protection and recovery capabilities
|
|
116
|
+
remediation_guidance: |
|
|
117
|
+
Ensure backup plans have:
|
|
118
|
+
- Backup frequency of at least daily
|
|
119
|
+
- Retention period of at least 7 days
|
|
120
|
+
- Appropriate lifecycle policies
|
|
121
|
+
|
|
122
|
+
To create or update a backup plan:
|
|
123
|
+
1. Go to AWS Backup console
|
|
124
|
+
2. Create or edit a backup plan
|
|
125
|
+
3. Add backup rules with:
|
|
126
|
+
- Schedule: Use cron or rate expressions (e.g., "cron(0 5 * * ? *)" for daily at 5 AM)
|
|
127
|
+
- Retention: Set to at least 7 days
|
|
128
|
+
- Lifecycle: Configure cold storage transition if needed
|
|
129
|
+
|
|
130
|
+
AWS CLI example:
|
|
131
|
+
aws backup create-backup-plan --backup-plan '{
|
|
132
|
+
"BackupPlanName": "daily-backup-plan",
|
|
133
|
+
"Rules": [{
|
|
134
|
+
"RuleName": "daily-rule",
|
|
135
|
+
"ScheduleExpression": "cron(0 5 * * ? *)",
|
|
136
|
+
"Lifecycle": {"DeleteAfterDays": 30}
|
|
137
|
+
}]
|
|
138
|
+
}'
|
|
139
|
+
- name: backup-vault-access-policy-check
|
|
140
|
+
resource_types:
|
|
141
|
+
- AWS::Backup::BackupVault
|
|
142
|
+
parameters: {}
|
|
143
|
+
description: Checks AWS Backup vault access policies for security to ensure vaults follow principle of least privilege and do not allow public access
|
|
144
|
+
remediation_guidance: |
|
|
145
|
+
Ensure backup vaults:
|
|
146
|
+
- Do not allow public access (Principal: "*")
|
|
147
|
+
- Have restrictive access policies
|
|
148
|
+
- Follow principle of least privilege
|
|
149
|
+
- Consider using vault lock for critical vaults
|
|
150
|
+
|
|
151
|
+
To secure a backup vault:
|
|
152
|
+
1. Go to AWS Backup console
|
|
153
|
+
2. Select the backup vault
|
|
154
|
+
3. Review and update access policy:
|
|
155
|
+
- Remove any wildcard principals
|
|
156
|
+
- Restrict to specific IAM roles/users
|
|
157
|
+
- Limit permissions to necessary actions only
|
|
158
|
+
4. Consider enabling vault lock to prevent deletion
|
|
159
|
+
|
|
160
|
+
AWS CLI example to remove public access:
|
|
161
|
+
aws backup delete-backup-vault-access-policy --backup-vault-name MyVault
|
|
162
|
+
|
|
163
|
+
To set a restrictive policy:
|
|
164
|
+
aws backup put-backup-vault-access-policy --backup-vault-name MyVault --policy '{
|
|
165
|
+
"Version": "2012-10-17",
|
|
166
|
+
"Statement": [{
|
|
167
|
+
"Effect": "Allow",
|
|
168
|
+
"Principal": {"AWS": "arn:aws:iam::123456789012:role/BackupRole"},
|
|
169
|
+
"Action": ["backup:DescribeBackupVault", "backup:ListRecoveryPointsByBackupVault"],
|
|
170
|
+
"Resource": "*"
|
|
171
|
+
}]
|
|
172
|
+
}'
|
|
173
|
+
- name: backup-selection-resource-coverage-check
|
|
174
|
+
resource_types:
|
|
175
|
+
- AWS::Backup::BackupPlan
|
|
176
|
+
parameters: {}
|
|
177
|
+
description: Validates that AWS Backup plans have backup selections that cover critical resources ensuring comprehensive backup coverage
|
|
178
|
+
remediation_guidance: |
|
|
179
|
+
Ensure backup plans have proper resource coverage:
|
|
180
|
+
- At least one backup selection per plan
|
|
181
|
+
- Selections target specific resources or use tags
|
|
182
|
+
- Critical resource types are included
|
|
183
|
+
- Selections are not empty
|
|
184
|
+
|
|
185
|
+
To add backup selections:
|
|
186
|
+
1. Go to AWS Backup console
|
|
187
|
+
2. Select your backup plan
|
|
188
|
+
3. Add backup selection:
|
|
189
|
+
- Specify resources by ARN, or
|
|
190
|
+
- Use resource tags to automatically include resources, or
|
|
191
|
+
- Use conditions to dynamically select resources
|
|
192
|
+
4. Ensure critical resources (RDS, EBS, EFS, DynamoDB) are covered
|
|
193
|
+
|
|
194
|
+
AWS CLI example to create a backup selection:
|
|
195
|
+
aws backup create-backup-selection --backup-plan-id <plan-id> --backup-selection '{
|
|
196
|
+
"SelectionName": "CriticalResources",
|
|
197
|
+
"IamRoleArn": "arn:aws:iam::123456789012:role/AWSBackupRole",
|
|
198
|
+
"ListOfTags": [{
|
|
199
|
+
"ConditionType": "STRINGEQUALS",
|
|
200
|
+
"ConditionKey": "backup",
|
|
201
|
+
"ConditionValue": "true"
|
|
202
|
+
}]
|
|
203
|
+
}'
|
|
111
204
|
'12.2':
|
|
112
205
|
title: Control 12.2
|
|
113
206
|
weight: 1.0
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
implementation_group: IG2
|
|
2
|
-
total_rules:
|
|
2
|
+
total_rules: 53
|
|
3
3
|
description: Enhanced security for enterprises with regulatory compliance burdens
|
|
4
4
|
controls:
|
|
5
5
|
'11.4':
|
|
@@ -344,6 +344,88 @@ controls:
|
|
|
344
344
|
parameters: {}
|
|
345
345
|
description: Assessment for acm-certificate-expiration-check AWS Config rule.
|
|
346
346
|
remediation_guidance: Follow AWS Config rule guidance for acm-certificate-expiration-check
|
|
347
|
+
'11.3':
|
|
348
|
+
title: Establish and Maintain Data Recovery Process - Advanced
|
|
349
|
+
weight: 1.0
|
|
350
|
+
config_rules:
|
|
351
|
+
- name: backup-vault-lock-check
|
|
352
|
+
resource_types:
|
|
353
|
+
- AWS::Backup::BackupVault
|
|
354
|
+
parameters: {}
|
|
355
|
+
description: Validates that AWS Backup vaults have Vault Lock enabled to prevent deletion of recovery points providing ransomware protection
|
|
356
|
+
remediation_guidance: |
|
|
357
|
+
Enable Vault Lock for critical backup vaults:
|
|
358
|
+
- Vault Lock provides immutable backups (WORM - Write Once Read Many)
|
|
359
|
+
- Protects against accidental or malicious deletion
|
|
360
|
+
- Compliance mode prevents even root user from deleting backups
|
|
361
|
+
|
|
362
|
+
To enable Vault Lock:
|
|
363
|
+
1. Go to AWS Backup console
|
|
364
|
+
2. Select your backup vault
|
|
365
|
+
3. Configure Vault Lock:
|
|
366
|
+
- Set minimum retention period
|
|
367
|
+
- Set maximum retention period (optional)
|
|
368
|
+
- Choose compliance mode for strictest protection
|
|
369
|
+
4. Test the configuration before finalizing
|
|
370
|
+
|
|
371
|
+
AWS CLI example:
|
|
372
|
+
aws backup put-backup-vault-lock-configuration \
|
|
373
|
+
--backup-vault-name MyVault \
|
|
374
|
+
--min-retention-days 35 \
|
|
375
|
+
--max-retention-days 365
|
|
376
|
+
- name: backup-report-plan-exists-check
|
|
377
|
+
resource_types:
|
|
378
|
+
- AWS::Backup::ReportPlan
|
|
379
|
+
parameters: {}
|
|
380
|
+
description: Validates that AWS Backup has report plans configured to monitor backup compliance and provide audit trails
|
|
381
|
+
remediation_guidance: |
|
|
382
|
+
Configure backup report plans for compliance monitoring:
|
|
383
|
+
- At least one report plan should exist
|
|
384
|
+
- Reports should cover backup job status and compliance
|
|
385
|
+
- Report delivery should be configured to S3
|
|
386
|
+
- Reports provide audit trails for compliance
|
|
387
|
+
|
|
388
|
+
To create a report plan:
|
|
389
|
+
1. Go to AWS Backup console
|
|
390
|
+
2. Navigate to Reports section
|
|
391
|
+
3. Create report plan:
|
|
392
|
+
- Choose report template (backup job report, compliance report, etc.)
|
|
393
|
+
- Configure S3 bucket for delivery
|
|
394
|
+
- Set report frequency
|
|
395
|
+
4. Review generated reports regularly
|
|
396
|
+
|
|
397
|
+
AWS CLI example:
|
|
398
|
+
aws backup create-report-plan \
|
|
399
|
+
--report-plan-name ComplianceReport \
|
|
400
|
+
--report-delivery-channel S3BucketName=my-backup-reports \
|
|
401
|
+
--report-setting ReportTemplate=BACKUP_JOB_REPORT
|
|
402
|
+
- name: backup-restore-testing-plan-exists-check
|
|
403
|
+
resource_types:
|
|
404
|
+
- AWS::Backup::RestoreTestingPlan
|
|
405
|
+
parameters: {}
|
|
406
|
+
description: Validates that AWS Backup has restore testing plans configured to ensure backups are actually recoverable and meet RTO/RPO requirements
|
|
407
|
+
remediation_guidance: |
|
|
408
|
+
Configure restore testing plans to validate backup recoverability:
|
|
409
|
+
- At least one restore testing plan should exist
|
|
410
|
+
- Testing plans should be actively running
|
|
411
|
+
- Critical backup vaults should be included in testing
|
|
412
|
+
- Testing frequency should be appropriate (weekly/monthly)
|
|
413
|
+
|
|
414
|
+
To create a restore testing plan:
|
|
415
|
+
1. Go to AWS Backup console
|
|
416
|
+
2. Navigate to Restore testing section
|
|
417
|
+
3. Create restore testing plan:
|
|
418
|
+
- Select backup vaults to test
|
|
419
|
+
- Configure testing schedule
|
|
420
|
+
- Define validation rules
|
|
421
|
+
- Set up notifications for test results
|
|
422
|
+
4. Monitor test execution and results
|
|
423
|
+
|
|
424
|
+
AWS CLI example:
|
|
425
|
+
aws backup create-restore-testing-plan \
|
|
426
|
+
--restore-testing-plan-name WeeklyRestoreTest \
|
|
427
|
+
--schedule-expression "cron(0 2 ? * SUN *)" \
|
|
428
|
+
--start-window-hours 2
|
|
347
429
|
'5.2':
|
|
348
430
|
title: Use Unique Passwords
|
|
349
431
|
weight: 1.0
|
|
@@ -125,6 +125,15 @@ from .control_backup_recovery import (
|
|
|
125
125
|
S3BucketReplicationEnabledAssessment
|
|
126
126
|
)
|
|
127
127
|
|
|
128
|
+
from .control_aws_backup_service import (
|
|
129
|
+
BackupPlanMinFrequencyAndMinRetentionCheckAssessment,
|
|
130
|
+
BackupVaultAccessPolicyCheckAssessment,
|
|
131
|
+
BackupVaultLockCheckAssessment,
|
|
132
|
+
BackupSelectionResourceCoverageCheckAssessment,
|
|
133
|
+
BackupReportPlanExistsCheckAssessment,
|
|
134
|
+
BackupRestoreTestingPlanExistsCheckAssessment
|
|
135
|
+
)
|
|
136
|
+
|
|
128
137
|
from .control_s3_enhancements import (
|
|
129
138
|
S3AccountLevelPublicAccessBlocksPeriodicAssessment,
|
|
130
139
|
S3BucketPublicWriteProhibitedAssessment
|
|
@@ -230,6 +239,14 @@ __all__ = [
|
|
|
230
239
|
'ElastiCacheRedisClusterAutomaticBackupCheckAssessment',
|
|
231
240
|
'S3BucketReplicationEnabledAssessment',
|
|
232
241
|
|
|
242
|
+
# AWS Backup Service Controls
|
|
243
|
+
'BackupPlanMinFrequencyAndMinRetentionCheckAssessment',
|
|
244
|
+
'BackupVaultAccessPolicyCheckAssessment',
|
|
245
|
+
'BackupVaultLockCheckAssessment',
|
|
246
|
+
'BackupSelectionResourceCoverageCheckAssessment',
|
|
247
|
+
'BackupReportPlanExistsCheckAssessment',
|
|
248
|
+
'BackupRestoreTestingPlanExistsCheckAssessment',
|
|
249
|
+
|
|
233
250
|
# S3 Security Enhancements
|
|
234
251
|
'S3AccountLevelPublicAccessBlocksPeriodicAssessment',
|
|
235
252
|
'S3BucketPublicWriteProhibitedAssessment',
|