Skip to content

Commit 362b0ac

Browse files
authored
Merge pull request #192 from aws-solutions/release/v2.1.0
Update to version v2.1.0
2 parents 5244c64 + 994bcc1 commit 362b0ac

File tree

506 files changed

+66789
-15819
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

506 files changed

+66789
-15819
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ coverage/
2828
# Python
2929
.venv/
3030
__pycache__/
31+
*.egg-info/
3132

3233
# pytest
3334
.coverage

.viperlightignore

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,5 @@
1-
# CDK files - files produced/installed by CDK
2-
# js files produced by npm
3-
.*.js
4-
# jest.config
5-
.*.d.ts
6-
.*/node_modules/
7-
.cdk.staging
8-
.*/package-lock.json
9-
# Developer work files - not present in pipeline
10-
deployment/build/
11-
deployment/temp/
12-
deployment/global-s3-assets/
13-
deployment/regional-s3-assets/
14-
deployment/open-source/
15-
deployment/test/
16-
# ignore own scan file
17-
vlscan.json
18-
# Ignore repo Config
19-
Config
20-
.venv
1+
node_modules/
2+
.venv/
213

224
[python-pipoutdated]
235
boto3=1.20.32 # Should match Lambda runtime: https://docs.aws.amazon.com/lambda/latest/dg/lambda-runtimes.html
24-
py-partiql-parser=0.1.0 # trust moto to resolve its own dependencies

.viperlightrc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
1-
{
2-
"failOn": "medium",
3-
"all": true
4-
}
1+
{"failOn":"low","all":true}

.viperlightrc_global

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"all": true,
3+
"failOn": "high",
4+
"safeAccounts": [
5+
"297356227824",
6+
"193023089310",
7+
"023102451235",
8+
"797873946194",
9+
"017000801446"
10+
],
11+
"safeEmails": [
12+
13+
14+
]
15+
}

AWSSD-DevNotes.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88

99
### SSM Parameters
1010
There are N parameters that control processing under /Solutions/SO0111:
11-
CMK_ARN - encryption key for the AFSBP runbooks
11+
CMK_ARN - encryption key for the AWS FSBP runbooks
1212
CMK_ARN - Admin account only, KMS key for solution encryption
1313
SNS_Topic_Arn - arn of the SHARR topic
14-
sendAnonymousMetrics - controls whether the solution sends metrics
14+
sendAnonymizedMetrics - controls whether the solution sends metrics
1515
version - solution version
1616

1717
The following are set by each Security Standard's playbook, enabling remediation mapping in the step function:

AWSSD-README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ Security is **Job 0**. SHARR Runbooks must be tightly secured, validate inputs,
7878

7979
**Remediation Runbooks** are AWS-owned or SHARR-owned runbooks that perform a single remediation or remediation step for a specific resource. For example, creating a logging bucket, enabling an AWS Service, or setting a parameter on an AWS Service. The permissions to the service APIs are within the definition of the Remediation Runbook; SHARR Runbooks must be allowed to assume the remediation role.
8080

81-
A playbook is a set of remediations within a Security Standard (ex. "CIS", "AFSBP"). Each Playbook has a standard-specific Step Function ("Orchestrator") that "understands" the JSON format of that standard's Finding data. The Orchestrator does the following:
82-
1. Verify the finding data matches the Standard (ex. CIS, PCI, AFSBP)
81+
A playbook is a set of remediations within a Security Standard (ex. "CIS", "FSBP"). Each Playbook has a standard-specific Step Function ("Orchestrator") that "understands" the JSON format of that standard's Finding data. The Orchestrator does the following:
82+
1. Verify the finding data matches the Standard (ex. CIS, PCI, FSBP)
8383
2. Identify the control id and target account in the JSON data
8484
3. Derive the runbook name (SHARR-\<standard\>-\<version\>-\<controlid\>)
8585
4. Check the status of the runbook in the target account
@@ -104,7 +104,7 @@ A sample Playbook is provided as a starting point. The estimated time to create
104104

105105
* **StandardControlArn**: arn:aws:securityhub:us-east-1:111111111111:control/aws-foundational-security-best-practices/v/1.0.0/RDS.1
106106
* **securityStandardLongName**: aws-foundational-security-best-practices
107-
* **securityStandardShortName**: AFSBP (can be any value you choose)
107+
* **securityStandardShortName**: FSBP (can be any value you choose)
108108
* **version**: 1.0.0
109109

110110
For the following example, we will create a PCI DSS v3.2.1 Playbook:
@@ -172,7 +172,7 @@ A sample Playbook is provided as a starting point. The estimated time to create
172172
const DIST_OUTPUT_BUCKET = process.env['DIST_OUTPUT_BUCKET'] || '%%BUCKET%%';
173173
const DIST_SOLUTION_NAME = process.env['DIST_SOLUTION_NAME'] || '%%SOLUTION%%';
174174

175-
const standardShortName = 'AFSBP'
175+
const standardShortName = 'FSBP'
176176
const standardLongName = 'aws-foundational-security-best-practices'
177177
const standardVersion = '1.0.0' // DO NOT INCLUDE 'V'
178178
const RESOURCE_PREFIX = SOLUTION_ID.replace(/^DEV-/,''); // prefix on every resource name
@@ -195,11 +195,11 @@ A sample Playbook is provided as a starting point. The estimated time to create
195195
'Lambda.1',
196196
'RDS.1',
197197
'RDS.6',
198-
'RDS.7'
199-
// 'S3.1'
198+
'RDS.7',
199+
'S3.9'
200200
]
201201

202-
const adminStack = new PlaybookPrimaryStack(app, 'AFSBPStack', {
202+
const adminStack = new PlaybookPrimaryStack(app, 'FSBPStack', {
203203
description: `(${SOLUTION_ID}P) ${SOLUTION_NAME} ${standardShortName} ${standardVersion} Compliance Pack - Admin Account, ${DIST_VERSION}`,
204204
solutionId: SOLUTION_ID,
205205
solutionVersion: DIST_VERSION,
@@ -211,7 +211,7 @@ A sample Playbook is provided as a starting point. The estimated time to create
211211
securityStandardVersion: standardVersion
212212
});
213213

214-
const memberStack = new PlaybookMemberStack(app, 'AFSBPMemberStack', {
214+
const memberStack = new PlaybookMemberStack(app, 'FSBPMemberStack', {
215215
description: `(${SOLUTION_ID}C) ${SOLUTION_NAME} ${standardShortName} ${standardVersion} Compliance Pack - Member Account, ${DIST_VERSION}`,
216216
solutionId: SOLUTION_ID,
217217
solutionVersion: DIST_VERSION,
@@ -229,7 +229,7 @@ A sample Playbook is provided as a starting point. The estimated time to create
229229
5. Update test/pci321_stack.test.ts
230230
6. Update cdk.json to point to the new bin/\*.ts name
231231
7. ssmdocs/scripts parse script: the example should work for most Standards. Review what it does and make any adjustments.
232-
8. Update the test script for the parse script. Copy finding json for the Security Standard to use in the test. See AFSBP, CIS for examples.
232+
8. Update the test script for the parse script. Copy finding json for the Security Standard to use in the test. See FSBP, CIS for examples.
233233
10. Create the ssmdocs for each control in the ssmdocs folder. This is the runbook that is invoked directly by the Orchestrator.
234234
11. Update support.txt, README.md, description.txt
235235
12. Add the Playbook to source/jest.config.js
@@ -532,12 +532,12 @@ The Markdown in the Description for each SSM Document is displayed in the consol
532532
SHARR-<standard>_<version>_<control>
533533
```
534534
535-
* **standard**: abbreviation for the Security Standard. The abbreviation is set in an SSM Parameter, /**/Solutions/SO0111/<name>/<version/shortname**. For example, **/Solutions/SO0111/aws-foundational-security-best-practices/1.0.0/shortname** = **AFSBP**
535+
* **standard**: abbreviation for the Security Standard. The abbreviation is set in an SSM Parameter, /**/Solutions/SO0111/<name>/<version/shortname**. For example, **/Solutions/SO0111/aws-foundational-security-best-practices/1.0.0/shortname** = **FSBP**
536536
* **version**: *v*.*r*.*m* - semver format version of the *Security Standard*. Some standards have multiple versions and may not be compatible with other versions.
537-
* **control**: control Id within the standard. Ex. **2.1** (CIS), **CloudTrail.1** (AFSBP)
537+
* **control**: control Id within the standard. Ex. **2.1** (CIS), **CloudTrail.1** (FSBP)
538538
539539
### Example Document Names
540-
* **SHARR-AFSBP-v1.0.0-CloudTrail.1**
540+
* **SHARR-FSBP-v1.0.0-CloudTrail.1**
541541
* **SHARR-CIS-v1.2.0-2.1**
542542
543543
### Header Template
@@ -619,7 +619,7 @@ Remediation runbooks often support more than one Control. They are called by the
619619
* Remediation.Output - stdout messages from the remediation
620620

621621
## Security Standards / Controls
622-
* AFSBP v1.0.0: Autoscaling.1
622+
* FSBP v1.0.0: Autoscaling.1
623623
* CIS v1.2.0: 2.1
624624
* PCI: Autoscaling.1
625625
```

CHANGELOG.md

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,44 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [2.1.0] - 2024-03-28
9+
10+
### Added
11+
12+
- CloudWatch Dashboard for monitoring solution metrics
13+
- Remediations will be scheduled in the future to prevent throttling if many remediations are triggered in a short period of time
14+
- New support for NIST 800-53 standard
15+
- New remediations for CloudFront.1, CloudFront.12, Codebuild.5, EC2.4, EC2.8, EC2.18, EC2.19, EC2.23, ECR.1, GuardDuty.1 IAM.3, S3.9, S3.11, S3.13, SecretsManager.1, SecretsManager.3, SecretsManager.4, SSM.4
16+
- Support for customizable input parameters to remediations
17+
18+
### Changed
19+
20+
- Updated AFBSP to FBSP in docs
21+
- Add HttpEndpoint parameter as enabled for EC2.8 remediation
22+
- Updated imports for moto 5.0.0
23+
24+
### Fixed
25+
26+
- Disabled AppRegistry functionality in China regions. AppRegistry is not available in those regions.
27+
- Added missing EventBridge rules for CloudFormation.1, EC2.15, SNS.1, SNS.2, and SQS.1
28+
- Fixed SC_SNS.2 Not executing due to wrong automation document
29+
- Fixed RDS.4 remediation failing to remediate due to incorrect regex
30+
- RDS.4 regex now includes snapshots created by Backup
31+
- Enable CloudTrail encryption remediation is now a regional remediation
32+
- Fixed SC_SQS.2 incorrect parameter
33+
- Fixed SC_EC2.6 message on finding note
34+
- Added AddTagsToResource to EncryptRDSSnapshot remediation role
35+
- SNS.2 now works in regions other than where the roles are deployed
36+
- Updated SNS.1 parameter to TopicArn instead of SNSTopicArn
37+
- SC_RDS.1 regex now includes snapshots
38+
- Fixed certain remediations failing in opt-in regions due to STS token endpoint
39+
- Rules for CIS 1.4.0 no longer match on CIS 1.2.0 generator ID
40+
- Fixed S3.6 creating malformed policy when all principals are "*"
41+
42+
### Security
43+
44+
- Upgraded urllib3
45+
846
## [2.0.2] - 2023-10-24
947

1048
### Security
@@ -25,7 +63,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2563
### Added
2664

2765
- New remediations contributed by 6Pillars: CIS v1.2.0 1.20
28-
- New AFSBP remediations for CloudFormation.1, EC2.15, SNS.1, SNS.2, SQS.1
66+
- New AWS FSBP remediations for CloudFormation.1, EC2.15, SNS.1, SNS.2, SQS.1
2967
- Service Catalog AppRegistry integration
3068
- New support for Security Controls, finding deduplication
3169
- New support for CIS v1.4.0 standard
@@ -44,7 +82,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4482
### Fixed
4583

4684
- Reverted SSM document custom resource provider to resolve intermittent deployment errors
47-
- Fixed bug in AFSBP AutoScaling.1 and PCI.AutoScaling.1 remediation regexes
85+
- Fixed bug in AWS FSBP AutoScaling.1 and PCI.AutoScaling.1 remediation regexes
4886

4987
## [1.5.0] - 2022-05-31
5088

@@ -74,7 +112,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
74112

75113
### Changed
76114

77-
- Bug fixes for AFSBP EC2.1, CIS 3.x
115+
- Bug fixes for AWS FSBP EC2.1, CIS 3.x
78116
- Separated Member roles from the remediations so that roles can be deployed once per account
79117
- Roles are now global
80118
- Cross-region remediation is now supported
@@ -87,7 +125,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
87125
- Added a get_approval_requirement lambda that customers can use to implement custom business logic
88126
- Added the ability for customers to route findings to an alterate runbook when the finding meets criteria. For example,
89127
potentially destructive remediations can be sent to a runbook that sends the finding data to Incident Manager.
90-
- New remediation for AFSBP & PCI S3.5
128+
- New remediation for AWS FSBP & PCI S3.5
91129

92130
## [1.3.2] - 2021-11-09
93131

@@ -108,7 +146,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
108146

109147
### Added
110148

111-
- New AWS Foundational Best Practices (AFSBP) support: EC2.6, IAM.7-8, S3.1-3
149+
- New AWS Foundational Best Practices (FSBP) support: EC2.6, IAM.7-8, S3.1-3
112150
- New CIS v1.2.0 support: 2.1, 2.7, 3.1-14
113151
- New PCI-DSS v3.2.1 Playbook support for 17 controls (see IG for details)
114152
- Library of remediation SSM Automation runbooks
@@ -136,13 +174,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
136174

137175
### Added
138176

139-
- New AFSBP playbook with 12 new remediations
177+
- New FSBP playbook with 12 new remediations
140178
- New Lambda Layer for use by solution lambdas
141179
- New Playbook architecture: Step Function, microservice Lambdas, Systems Manager runbooks
142180
- Corrected anonymous metrics to log only on final state (FAILED or RESOLVED)
143181
- Added logging to put anonymous metrics in solution logs as an audit trail
144182
- Corrected the anonymous metrics UUID to use standard 8-4-4-4-12 format
145-
- Encrypted CloudWatch logs for AFSBP state machine
183+
- Encrypted CloudWatch logs for FSBP state machine
146184

147185
### Changed
148186

NOTICE.txt

Lines changed: 56 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,47 @@ ts-jest under the MIT License
3535
ts-node under the MIT License
3636
typescript under the Apache License 2.0
3737

38+
attrs under the MIT License
3839
aws-lambda-powertools under the MIT License
40+
awscli under the Apache License 2.0
3941
boto3 under the Apache License 2.0
4042
boto3-stubs-lite under the MIT License
4143
botocore under the Apache License 2.0
44+
botocore-stubs under the MIT License
45+
cffi under the MIT License
46+
colorama under the BSD 3-Clause "New" or "Revised" License
47+
coverage under the Apache License 2.0
48+
cryptography under the Apache License 2.0
49+
docutils under the Creative Commons Public Domain Dedication
50+
exceptiongroup under the MIT License
51+
iniconfig under the MIT License
52+
Jinja2 under the BSD 3-Clause "New" or "Revised" License
4253
jmespath under the MIT License
54+
MarkupSafe under the BSD 3-Clause "New" or "Revised" License
4355
moto under the Apache License 2.0
56+
mypy-boto3-s3 under the MIT License
4457
pip under the MIT License
58+
pluggy under the MIT License
59+
py-partiql-parser under the MIT License
60+
pyasn1 under the BSD 2-Clause "Simplified" License
61+
pycparser under the BSD 3-Clause "New" or "Revised" License
4562
pytest under the MIT License
4663
pytest-cov under the MIT License
4764
pytest-env under the MIT License
4865
pytest-mock under the MIT License
49-
python-dateutil under the Apache License 2.0 and the BSD 3-Clause
66+
python-dateutil under the Apache License 2.0 and the BSD 3-Clause "New" or "Revised" License
67+
responses under the Apache License 2.0
68+
rsa under the Apache License 2.0
5069
s3transfer under the Apache License 2.0
5170
setuptools under the MIT License
5271
six under the MIT License
72+
tomli under the MIT License
73+
types-PyYAML under the Apache License 2.0
74+
types-awscrt under the MIT License
75+
types-s3transfer under the MIT License
76+
typing_extensions under the Python Software Foundation License 2.0
5377
urllib3 under the MIT License
78+
Werkzeug under the BSD 3-Clause "New" or "Revised" License
5479
virtualenv under the MIT License
5580
Jinja2 under the BSD 3-Clause
5681
MarkupSafe under the BSD 3-Clause
@@ -73,4 +98,33 @@ types-PyYAML under the Apache License 2.0
7398
types-awscrt under the MIT License
7499
types-s3transfer under the MIT License
75100
typing_extensions under the Python Software Foundation License
76-
xmltodict under the MIT License
101+
xmltodict under the MIT License
102+
aiohttp under the Apache License 2.0
103+
aiosignal under the Apache License 2.0
104+
async-timeout under the Apache License 2.0
105+
black under the MIT License
106+
cachetools under the MIT License
107+
click under the BSD 3-Clause
108+
distlib under the Python Software Foundation License
109+
docker under the Apache License 2.0
110+
flake8 under the MIT License
111+
frozenlist under the Apache License 2.0
112+
isort under the MIT License
113+
mccabe under the MIT License
114+
multidict under the Apache License 2.0
115+
mypy-boto3-cloudformation under the MIT License
116+
mypy-boto3-cloudfront under the MIT License
117+
mypy-boto3-cloudwatch under the MIT License
118+
mypy-boto3-ec2 under the MIT License
119+
mypy-boto3-iam under the MIT License
120+
mypy-boto3-sns under the MIT License
121+
mypy-boto3-ssm under the MIT License
122+
mypy-boto3-sts under the MIT License
123+
mypy-extensions under the MIT License
124+
platformdirs under the MIT License
125+
pycodestyle under the MIT License
126+
pyflakes under the MIT License
127+
pyproject-api under the MIT License
128+
tox under the MIT License
129+
types-urllib3 under the Apache License 2.0
130+
yarl under the Apache License 2.0

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Feature
55
request](https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation/issues/new?assignees=&labels=feature-request%2C+enhancement&template=feature_request.md&title=)
66
\| [🐛 Bug
7-
Report](https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation%3E/issues/new?assignees=&labels=bug%2C+triage&template=bug_report.md&title=)
7+
Report](https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation/issues/new?assignees=&labels=bug%2C+triage&template=bug_report.md&title=)
88

99
Automated Security Response (ASR) on AWS is a solution that enables AWS Security Hub customers to remediate findings
1010
with a single click using sets of predefined response and remediation actions called Playbooks. The remediations are
@@ -19,6 +19,7 @@ standards:
1919
- Center for Internet Security (CIS) AWS Foundations Benchmark v1.2.0
2020
- Center for Internet Security (CIS) AWS Foundations Benchmark v1.4.0
2121
- Payment Card Industry (PCI) Data Security Standard (DSS) v3.2.1
22+
- National Institute of Standards and Technology (NIST) Special Publication 800-53 Revision 5
2223

2324
A Playbook called Security Control is included that allows operation with AWS Security Hub's Consolidated Control
2425
Findings feature.
@@ -113,7 +114,7 @@ const standardVersion = "1.1.1"; // DO NOT INCLUDE 'V'
113114
```
114115

115116
**standardShortName** can be as you wish. General recommendation is to make it short and meaningful. Ex. PCI, CIS,
116-
AFSBP. This is the name used in many labels throughout the solution. **standardLongName** must match the
117+
FSBP. This is the name used in many labels throughout the solution. **standardLongName** must match the
117118
StandardsControlArn, as _pci-dss_ in the above example. **standardVersion** must match the StandardsControlArn version,
118119
as _.../v/3.2.1/..._ in the above example.
119120

@@ -206,7 +207,7 @@ https://mybucket-reference.s3.amazonaws.com/aws-security-hub-automated-response-
206207
|-deployment/ [ Scripts used to build, test, and upload templates for the solution ]
207208
|-simtest/ [ Tool and sample data used to simulate findings for testing ]
208209
|-source/ [ Solution source code and tests ]
209-
|-LambdaLayers/ [ Common functions used by the Orchestrator and custom resource providers ]
210+
|-layer/ [ Common functions used by the Orchestrator and custom resource providers ]
210211
|-lib/ [ Solution CDK ]
211212
|-appregistry/ [ Resources for integration with Service Catalog AppRegistry ]
212213
|-cdk-helper/ [ CDK helper functions ]
@@ -233,7 +234,7 @@ https://mybucket-reference.s3.amazonaws.com/aws-security-hub-automated-response-
233234

234235
## Collection of operational metrics
235236

236-
This solution collects anonymous operational metrics to help AWS improve the quality of features of the solution. For
237+
This solution collects anonymized operational metrics to help AWS improve the quality of features of the solution. For
237238
more information, including how to disable this capability, please see the [Implementation
238239
Guide](https://docs.aws.amazon.com/solutions/latest/automated-security-response-on-aws/collection-of-operational-metrics.html)
239240

0 commit comments

Comments
 (0)