Skip to content

Commit 28200df

Browse files
authored
Merge pull request #197 from aws-solutions/release/v2.1.2
Updated to version v2.1.2
2 parents 6ec8f5c + 1e3f5b8 commit 28200df

34 files changed

+334
-188
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ assignees: ""
2222

2323
- [ ] Version: [e.g. v1.0.0]
2424

25-
To get the version of the solution, you can look at the description of the created CloudFormation stack. For example, *"(SO0111) AWS Security Hub Automated Response & Remediation Administrator Stack, v1.4.0"*. You can also find the version from [releases](https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation/releases)
25+
To get the version of the solution, you can look at the description of the created CloudFormation stack. For example, *"(SO0111) AWS Security Hub Automated Response & Remediation Administrator Stack, v1.4.0"*. You can also find the version from [releases](https://github.com/aws-solutions/automated-security-response-on-aws/releases)
2626

2727
- [ ] Region: [e.g. us-east-1]
2828
- [ ] Was the solution modified from the version published on this repository?
2929
- [ ] If the answer to the previous question was yes, are the changes available on GitHub?
3030
- [ ] Have you checked your [service quotas](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html) for the sevices this solution uses?
31-
- [ ] Were there any errors in the CloudWatch Logs? [Troubleshooting](https://docs.aws.amazon.com/solutions/latest/aws-security-hub-automated-response-and-remediation/troubleshooting.html)
31+
- [ ] Were there any errors in the CloudWatch Logs? [Troubleshooting](https://docs.aws.amazon.com/solutions/latest/automated-security-response-on-aws/troubleshooting.html)
3232

3333
**Screenshots**
3434
If applicable, add screenshots to help explain your problem (please **DO NOT include sensitive information**).

CHANGELOG.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ 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.2] - 2024-06-20
9+
10+
### Fixed
11+
12+
- Disabled AppRegistry for certain playbooks to avoid errors when updating solution
13+
- Created list of playbooks instead of creating stacks dynamically to avoid this in the future
14+
15+
### Security
16+
17+
- Updated braces package version for CVE-2024-4068 - https://avd.aquasec.com/nvd/cve-2024-4068
18+
819
## [2.1.1] - 2024-04-10
920

1021
### Changed
@@ -32,7 +43,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
3243

3344
### Fixed
3445

35-
- Disabled AppRegistry functionality in China regions. AppRegistry is not available in those regions.
46+
- Disabled AppRegistry functionality in China regions. AppRegistry is not available in those regions
3647
- Added missing EventBridge rules for CloudFormation.1, EC2.15, SNS.1, SNS.2, and SQS.1
3748
- Fixed SC_SNS.2 Not executing due to wrong automation document
3849
- Fixed RDS.4 remediation failing to remediate due to incorrect regex
@@ -114,8 +125,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
114125

115126
### Changed
116127

117-
- Bug Fix for issue [47](https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation/issues/47)
118-
- Bug Fix for issue [48](https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation/issues/48)
128+
- Bug Fix for issue [47](https://github.com/aws-solutions/automated-security-response-on-aws/issues/47)
129+
- Bug Fix for issue [48](https://github.com/aws-solutions/automated-security-response-on-aws/issues/48)
119130

120131
## [1.4.0] - 2021-12-13
121132

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ information to effectively respond to your bug report or contribution.
1111

1212
We welcome you to use the GitHub issue tracker to report bugs or suggest features.
1313

14-
When filing an issue, please check [existing open](https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation/issues), or [recently closed](https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
14+
When filing an issue, please check [existing open](https://github.com/aws-solutions/automated-security-response-on-aws/issues), or [recently closed](https://github.com/aws-solutions/automated-security-response-on-aws/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already
1515
reported the issue. Please try to include as much information as you can. Details like these are incredibly useful:
1616

1717
* A reproducible test case or series of steps
@@ -41,7 +41,7 @@ GitHub provides additional document on [forking a repository](https://help.githu
4141

4242

4343
## Finding contributions to work on
44-
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation/labels/help%20wanted) issues is a great place to start.
44+
Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/aws-solutions/automated-security-response-on-aws/labels/help%20wanted) issues is a great place to start.
4545

4646

4747
## Code of Conduct
@@ -56,6 +56,6 @@ If you discover a potential security issue in this project we ask that you notif
5656

5757
## Licensing
5858

59-
See the [LICENSE](https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation/blob/main/LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
59+
See the [LICENSE](https://github.com/aws-solutions/automated-security-response-on-aws/blob/main/LICENSE.txt) file for our project's licensing. We will ask you to confirm the licensing of your contribution.
6060

6161
We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes.

README.md

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
[🚀 Solution Landing Page](https://aws.amazon.com/solutions/implementations/automated-security-response-on-aws/) \| [🚧
44
Feature
5-
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=)
5+
request](https://github.com/aws-solutions/automated-security-response-on-aws/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/issues/new?assignees=&labels=bug%2C+triage&template=bug_report.md&title=)
7+
Report](https://github.com/aws-solutions/automated-security-response-on-aws/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
@@ -63,13 +63,13 @@ make to your private copy of the solution.
6363
**Git Clone example:**
6464

6565
```bash
66-
git clone https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation.git
66+
git clone https://github.com/aws-solutions/automated-security-response-on-aws.git
6767
```
6868

6969
**Download Zip example:**
7070

7171
```bash
72-
wget https://github.com/aws-solutions/aws-security-hub-automated-response-and-remediation/archive/main.zip
72+
wget https://github.com/aws-solutions/automated-security-response-on-aws/archive/main.zip
7373
```
7474

7575
### Custom Playbooks
@@ -127,6 +127,26 @@ from the StandardsControlArn:
127127
const remediations: IControl[] = [{ control: "RDS.6" }];
128128
```
129129

130+
#### Add your playbook as a new nested stack in the solution template
131+
132+
Edit **playbooks/playbook-index.ts** to include the new playbook.
133+
134+
Add the new playbook to the end of the `standardPlaybookProps` array.
135+
136+
**Important** Do not change the order of the items in this array. Doing so will change the App Registry logical IDs for the nested stacks.
137+
This will cause an error when updating the solution.
138+
139+
Interface:
140+
141+
```typescript
142+
export interface PlaybookProps {
143+
name: string; // Playbook short name
144+
useAppRegistry: boolean; // Add this playbook's nested stack to app registry for the solution
145+
defaultParameterValue?: 'yes' | 'no'; // Default value for enabling this playbook in CloudFormation. Will default to 'no' if not provided.
146+
description?: string; // Description for the CloudFormation parameter. Solution will provide a generated description if left blank.
147+
}
148+
```
149+
130150
#### Create the Remediations
131151

132152
Remediations are executed using SSM Automation Runbooks. Each control has a specific runbook. ASR Runbooks must follow
@@ -187,7 +207,7 @@ Confirm that all unit tests pass.
187207
**Note**: Verify bucket ownership before uploading.
188208

189209
By default, the templates created by build-s3-dist.sh expect the software to be stored in
190-
**aws-security-hub-automated-response-and-remediation/v\<version\>**. If in doubt, view the template.
210+
**automated-security-response-on-aws/v\<version\>**. If in doubt, view the template.
191211

192212
Use a tool such as the AWS S3 CLI "sync" command to upload your templates to the reference bucket and code to the
193213
regional bucket.
@@ -198,7 +218,7 @@ See the [Automated Security Response on AWS Implementation
198218
Guide](https://docs.aws.amazon.com/solutions/latest/automated-security-response-on-aws/solution-overview.html) for
199219
deployment instructions, using the link to the SolutionDeployStack.template from your bucket, rather than the one for
200220
AWS Solutions. Ex.
201-
https://mybucket-reference.s3.amazonaws.com/aws-security-hub-automated-response-and-remediation/v1.3.0.mybuild/aws-sharr-deploy.template
221+
https://mybucket-reference.s3.amazonaws.com/automated-security-response-on-aws/v1.3.0.mybuild/aws-sharr-deploy.template
202222

203223
## Directory structure
204224

deployment/build-s3-dist.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ main() {
148148
header "[Create] Playbooks"
149149

150150
for playbook in $(ls "$source_dir"/playbooks); do
151-
if [ $playbook == 'NEWPLAYBOOK' ] || [ $playbook == '.coverage' ] || [ $playbook == 'common' ]; then
151+
if [ $playbook == 'NEWPLAYBOOK' ] || [ $playbook == '.coverage' ] || [ $playbook == 'common' ] || [ $playbook == 'playbook-index.ts' ]; then
152152
continue
153153
fi
154154
echo Create $playbook playbook

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "automated_security_response_on_aws"
3-
version = "2.1.1"
3+
version = "2.1.2"
44

55
[tool.setuptools]
66
package-dir = {"" = "source"}

solution-manifest.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
id: SO0111
22
name: security-hub-automated-response-and-remediation
3-
version: 2.1.1
3+
version: 2.1.2
44
cloudformation_templates:
55
- template: aws-sharr-deploy.template
66
main_template: true

source/lib/__snapshots__/member-stack.test.ts.snap

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,16 @@ exports[`member stack snapshot matches 1`] = `
3131
"yes",
3232
],
3333
},
34+
"loadAFSBPCondAndShouldDeployAppReg": {
35+
"Fn::And": [
36+
{
37+
"Condition": "ShouldDeployAppReg",
38+
},
39+
{
40+
"Condition": "loadAFSBPCond",
41+
},
42+
],
43+
},
3444
"loadCIS120Cond": {
3545
"Fn::Equals": [
3646
{
@@ -39,6 +49,16 @@ exports[`member stack snapshot matches 1`] = `
3949
"yes",
4050
],
4151
},
52+
"loadCIS120CondAndShouldDeployAppReg": {
53+
"Fn::And": [
54+
{
55+
"Condition": "ShouldDeployAppReg",
56+
},
57+
{
58+
"Condition": "loadCIS120Cond",
59+
},
60+
],
61+
},
4262
"loadCIS140Cond": {
4363
"Fn::Equals": [
4464
{
@@ -47,6 +67,16 @@ exports[`member stack snapshot matches 1`] = `
4767
"yes",
4868
],
4969
},
70+
"loadCIS140CondAndShouldDeployAppReg": {
71+
"Fn::And": [
72+
{
73+
"Condition": "ShouldDeployAppReg",
74+
},
75+
{
76+
"Condition": "loadCIS140Cond",
77+
},
78+
],
79+
},
5080
"loadNIST80053Cond": {
5181
"Fn::Equals": [
5282
{
@@ -55,6 +85,16 @@ exports[`member stack snapshot matches 1`] = `
5585
"yes",
5686
],
5787
},
88+
"loadNIST80053CondAndShouldDeployAppReg": {
89+
"Fn::And": [
90+
{
91+
"Condition": "ShouldDeployAppReg",
92+
},
93+
{
94+
"Condition": "loadNIST80053Cond",
95+
},
96+
],
97+
},
5898
"loadPCI321Cond": {
5999
"Fn::Equals": [
60100
{
@@ -307,6 +347,101 @@ exports[`member stack snapshot matches 1`] = `
307347
},
308348
"Type": "AWS::ServiceCatalogAppRegistry::AttributeGroupAssociation",
309349
},
350+
"AppRegistryResourceAssociation142839FB0": {
351+
"Condition": "ShouldDeployAppReg",
352+
"DependsOn": [
353+
"RunbookStackNoRoles",
354+
],
355+
"Properties": {
356+
"Application": {
357+
"Fn::GetAtt": [
358+
"AppRegistry968496A3",
359+
"Id",
360+
],
361+
},
362+
"Resource": {
363+
"Ref": "RunbookStackNoRoles",
364+
},
365+
"ResourceType": "CFN_STACK",
366+
},
367+
"Type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
368+
},
369+
"AppRegistryResourceAssociation2BB1A3300": {
370+
"Condition": "loadAFSBPCondAndShouldDeployAppReg",
371+
"DependsOn": [
372+
"PlaybookMemberStackAFSBP",
373+
],
374+
"Properties": {
375+
"Application": {
376+
"Fn::GetAtt": [
377+
"AppRegistry968496A3",
378+
"Id",
379+
],
380+
},
381+
"Resource": {
382+
"Ref": "PlaybookMemberStackAFSBP",
383+
},
384+
"ResourceType": "CFN_STACK",
385+
},
386+
"Type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
387+
},
388+
"AppRegistryResourceAssociation3BEAC7BB7": {
389+
"Condition": "loadCIS120CondAndShouldDeployAppReg",
390+
"DependsOn": [
391+
"PlaybookMemberStackCIS120",
392+
],
393+
"Properties": {
394+
"Application": {
395+
"Fn::GetAtt": [
396+
"AppRegistry968496A3",
397+
"Id",
398+
],
399+
},
400+
"Resource": {
401+
"Ref": "PlaybookMemberStackCIS120",
402+
},
403+
"ResourceType": "CFN_STACK",
404+
},
405+
"Type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
406+
},
407+
"AppRegistryResourceAssociation46F7B9873": {
408+
"Condition": "loadCIS140CondAndShouldDeployAppReg",
409+
"DependsOn": [
410+
"PlaybookMemberStackCIS140",
411+
],
412+
"Properties": {
413+
"Application": {
414+
"Fn::GetAtt": [
415+
"AppRegistry968496A3",
416+
"Id",
417+
],
418+
},
419+
"Resource": {
420+
"Ref": "PlaybookMemberStackCIS140",
421+
},
422+
"ResourceType": "CFN_STACK",
423+
},
424+
"Type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
425+
},
426+
"AppRegistryResourceAssociation5FAA30631": {
427+
"Condition": "loadNIST80053CondAndShouldDeployAppReg",
428+
"DependsOn": [
429+
"PlaybookMemberStackNIST80053",
430+
],
431+
"Properties": {
432+
"Application": {
433+
"Fn::GetAtt": [
434+
"AppRegistry968496A3",
435+
"Id",
436+
],
437+
},
438+
"Resource": {
439+
"Ref": "PlaybookMemberStackNIST80053",
440+
},
441+
"ResourceType": "CFN_STACK",
442+
},
443+
"Type": "AWS::ServiceCatalogAppRegistry::ResourceAssociation",
444+
},
310445
"DefaultApplicationAttributesFC1CC26B": {
311446
"Condition": "ShouldDeployAppReg",
312447
"Properties": {

source/lib/member-stack.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { Runtime } from 'aws-cdk-lib/aws-lambda';
55
import { Template } from 'aws-cdk-lib/assertions';
66
import { AwsSolutionsChecks } from 'cdk-nag';
77
import { MemberStack } from './member-stack';
8-
import { AppRegister } from '../lib/appregistry/applyAppRegistry';
8+
import { AppRegister } from './appregistry/applyAppRegistry';
99

1010
const description = 'ASR Member Stack';
1111
const solutionId = 'SO9999';
@@ -33,7 +33,7 @@ function getMemberStack(): Stack {
3333
solutionDistBucket,
3434
runtimePython: Runtime.PYTHON_3_9,
3535
});
36-
appregistry.applyAppRegistryToStacks(stack, []);
36+
appregistry.applyAppRegistryToStacks(stack, stack.nestedStacksWithAppRegistry);
3737
Aspects.of(app).add(new AwsSolutionsChecks({ verbose: true }));
3838
return stack;
3939
}

0 commit comments

Comments
 (0)