Skip to content

Commit 32f4774

Browse files
authored
Merge pull request #200 from aws-solutions/release/v2.1.3
Upgrade to v2.1.3
2 parents 8168010 + ba7af27 commit 32f4774

File tree

163 files changed

+826
-690
lines changed

Some content is hidden

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

163 files changed

+826
-690
lines changed

.viperlightignore

Lines changed: 0 additions & 5 deletions
This file was deleted.

.viperlightrc

Lines changed: 0 additions & 1 deletion
This file was deleted.

.viperlightrc_global

Lines changed: 0 additions & 15 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 11 additions & 0 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.3] - 2024-09-18
9+
10+
### Fixed
11+
- Resolved an issue in the remediation scripts for EC2.18 and EC2.19 where security group rules with IpProtocol set to "-1" were being incorrectly ignored.
12+
13+
### Changed
14+
- Upgraded all Python runtimes in remediation SSM documents from Python 3.8 to Python 3.11.
15+
16+
### Security
17+
- Upgraded micromatch package to mitigate [CVE-2024-4067](https://avd.aquasec.com/nvd/2024/cve-2024-4067/)
18+
819
## [2.1.2] - 2024-06-20
920

1021
### Fixed

SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,4 @@ subsequently address any potential vulnerabilities as quickly as possible. If yo
55
security issue in this project, please notify AWS/Amazon Security via
66
our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or
77
directly via email to [AWS Security](mailto:aws-security@amazon.com). Please do not create a public GitHub issue in this
8-
project.
8+
project.

deployment/run-unit-tests.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ export overrideWarningsEnabled=false
1313
echo "UPDATE MODE: CDK Snapshots will be updated. CDK UNIT TESTS WILL BE SKIPPED"
1414
} || update="false"
1515

16-
[[ ! -d .venv ]] && python3 -m venv .venv
16+
[[ ! -d .venv ]] && python3.11 -m venv .venv
1717
source ./.venv/bin/activate
18-
python3 -m pip install -U pip setuptools
18+
python3.11 -m pip install -U pip setuptools
1919

2020
echo 'Installing required Python testing modules'
2121
pip install -r ./requirements_dev.txt
@@ -39,7 +39,7 @@ run_pytest() {
3939
echo "coverage report path set to ${report_file}"
4040

4141
# Use -vv for debugging
42-
python3 -m pytest --cov --cov-report=term-missing --cov-report "xml:$report_file"
42+
python3.11 -m pytest --cov --cov-report=term-missing --cov-report "xml:$report_file"
4343
rc=$?
4444

4545
if [ "$rc" -ne "0" ]; then

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.2"
3+
version = "2.1.3"
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.2
3+
version: 2.1.3
44
cloudformation_templates:
55
- template: aws-sharr-deploy.template
66
main_template: true

source/package-lock.json

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

source/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "aws-security-hub-automated-response-and-remediation",
3-
"version": "2.1.2",
3+
"version": "2.1.3",
44
"description": "Automated remediation for AWS Security Hub (SO0111)",
55
"bin": {
66
"solution_deploy": "bin/solution_deploy.js"

source/playbooks/AFSBP/ssmdocs/AFSBP_AutoScaling.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ mainSteps:
6565
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):autoscaling:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:autoScalingGroup:(?:[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}):autoScalingGroupName/(.{1,255})$'
6666
expected_control_id:
6767
- 'AutoScaling.1'
68-
Runtime: python3.8
68+
Runtime: python3.11
6969
Handler: parse_event
7070
Script: |-
7171
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_CloudFormation.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ mainSteps:
5757
parse_id_pattern: '^(arn:(?:aws|aws-us-gov|aws-cn):cloudformation:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:stack/[a-zA-Z][a-zA-Z0-9-]{0,127}/[a-fA-F0-9]{8}-(?:[a-fA-F0-9]{4}-){3}[a-fA-F0-9]{12})$'
5858
expected_control_id:
5959
- 'CloudFormation.1'
60-
Runtime: 'python3.8'
60+
Runtime: 'python3.11'
6161
Handler: 'parse_event'
6262
Script: |-
6363
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_CloudFront.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ mainSteps:
5757
parse_id_pattern: '^(arn:(?:aws|aws-us-gov|aws-cn):cloudfront::\d{12}:distribution\/([A-Z0-9]+))$'
5858
expected_control_id:
5959
- 'CloudFront.1'
60-
Runtime: 'python3.8'
60+
Runtime: 'python3.11'
6161
Handler: 'parse_event'
6262
Script: |-
6363
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_CloudFront.12.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ mainSteps:
5757
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):cloudfront::[0-9]{12}:distribution\/([A-Z0-9]*)$'
5858
expected_control_id:
5959
- 'CloudFront.12'
60-
Runtime: 'python3.8'
60+
Runtime: 'python3.11'
6161
Handler: 'parse_event'
6262
Script: |-
6363
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_CloudTrail.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ mainSteps:
5454
parse_id_pattern: ''
5555
expected_control_id:
5656
- 'CloudTrail.1'
57-
Runtime: python3.8
57+
Runtime: python3.11
5858
Handler: parse_event
5959
Script: |-
6060
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_CloudTrail.2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ mainSteps:
6969
parse_id_pattern: ''
7070
expected_control_id:
7171
- 'CloudTrail.2'
72-
Runtime: python3.8
72+
Runtime: python3.11
7373
Handler: parse_event
7474
Script: |-
7575
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_CloudTrail.4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ mainSteps:
6464
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):cloudtrail:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:trail/([A-Za-z0-9._-]{3,128})$'
6565
expected_control_id:
6666
- 'CloudTrail.4'
67-
Runtime: python3.8
67+
Runtime: python3.11
6868
Handler: parse_event
6969
Script: |-
7070
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_CloudTrail.5.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ mainSteps:
6363
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):cloudtrail:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:trail/([A-Za-z0-9._-]{3,128})$'
6464
expected_control_id:
6565
- 'CloudTrail.5'
66-
Runtime: python3.8
66+
Runtime: python3.11
6767
Handler: parse_event
6868
Script: |-
6969
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_CodeBuild.2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ mainSteps:
5050
Finding: '{{Finding}}'
5151
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):codebuild:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:project/([A-Za-z0-9][A-Za-z0-9\-_]{1,254})$'
5252
expected_control_id: [ 'CodeBuild.2' ]
53-
Runtime: python3.8
53+
Runtime: python3.11
5454
Handler: parse_event
5555
Script: |-
5656
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_CodeBuild.5.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mainSteps:
6060
Finding: '{{Finding}}'
6161
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):codebuild:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:project/([A-Za-z0-9][A-Za-z0-9\-_]{1,254})$'
6262
expected_control_id: [ 'CodeBuild.5' ]
63-
Runtime: python3.8
63+
Runtime: python3.11
6464
Handler: parse_event
6565
Script: |-
6666
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_Config.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ mainSteps:
5858
parse_id_pattern: ''
5959
expected_control_id:
6060
- 'Config.1'
61-
Runtime: python3.8
61+
Runtime: python3.11
6262
Handler: parse_event
6363
Script: |-
6464
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_EC2.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ mainSteps:
5555
resource_index: 2
5656
expected_control_id:
5757
- 'EC2.1'
58-
Runtime: python3.8
58+
Runtime: python3.11
5959
Handler: parse_event
6060
Script: |-
6161
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_EC2.15.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ mainSteps:
6565
parse_id_pattern: ''
6666
expected_control_id:
6767
- 'EC2.15'
68-
Runtime: python3.8
68+
Runtime: python3.11
6969
Handler: parse_event
7070
Script: |-
7171
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_EC2.18.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ mainSteps:
6868
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):ec2:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:security-group/(sg-[0-9a-f]*)$'
6969
expected_control_id:
7070
- 'EC2.18'
71-
Runtime: python3.8
71+
Runtime: python3.11
7272
Handler: parse_event
7373
Script: |-
7474
%%SCRIPT=common/parse_input.py%%
@@ -90,7 +90,7 @@ mainSteps:
9090
"authorizedUdpPorts": [],
9191
}
9292
expected_control_id: [ 'EC2.18' ]
93-
Runtime: python3.8
93+
Runtime: python3.11
9494
Handler: get_input_params
9595
Script: |-
9696
%%SCRIPT=common/get_input_params.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_EC2.19.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ mainSteps:
6565
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):ec2:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:security-group/(sg-[0-9a-f]*)$'
6666
expected_control_id:
6767
- 'EC2.19'
68-
Runtime: python3.8
68+
Runtime: python3.11
6969
Handler: parse_event
7070
Script: |-
7171
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_EC2.2.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ mainSteps:
6464
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):ec2:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:security-group/(sg-[0-9a-f]*)$'
6565
expected_control_id:
6666
- 'EC2.2'
67-
Runtime: python3.8
67+
Runtime: python3.11
6868
Handler: parse_event
6969
Script: |-
7070
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_EC2.23.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ mainSteps:
6565
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):ec2:[a-z]{2}-[a-z]+-\d{1}:\d{12}:transit-gateway\/(tgw-[a-z0-9\-]+)$'
6666
expected_control_id:
6767
- 'EC2.23'
68-
Runtime: python3.8
68+
Runtime: python3.11
6969
Handler: parse_event
7070
Script: |-
7171
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_EC2.4.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mainSteps:
6060
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):ec2:(?:[a-z]{2}(?:-gov)?-[a-z]+-\d):\d{12}:instance\/(i-[0-9a-f]*)$'
6161
expected_control_id:
6262
- 'EC2.4'
63-
Runtime: python3.8
63+
Runtime: python3.11
6464
Handler: parse_event
6565
Script: |-
6666
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_EC2.6.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ mainSteps:
6363
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):ec2:.*:\d{12}:vpc/(vpc-[0-9a-f]{8,17})$'
6464
expected_control_id:
6565
- 'EC2.6'
66-
Runtime: python3.8
66+
Runtime: python3.11
6767
Handler: parse_event
6868
Script: |-
6969
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_EC2.7.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ mainSteps:
5151
parse_id_pattern: ''
5252
expected_control_id:
5353
- 'EC2.7'
54-
Runtime: python3.8
54+
Runtime: python3.11
5555
Handler: parse_event
5656
Script: |-
5757
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_EC2.8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ mainSteps:
6060
parse_id_pattern: ''
6161
expected_control_id:
6262
- 'EC2.8'
63-
Runtime: python3.8
63+
Runtime: python3.11
6464
Handler: parse_event
6565
Script: |-
6666
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_ECR.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ mainSteps:
6565
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):ecr:[a-z]{2}-[a-z]+-\d{1}:\d{12}:repository\/([a-z0-9._\/\-]+)$'
6666
expected_control_id:
6767
- 'ECR.1'
68-
Runtime: python3.8
68+
Runtime: python3.11
6969
Handler: parse_event
7070
Script: |-
7171
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_GuardDuty.1.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ mainSteps:
6565
parse_id_pattern: ''
6666
expected_control_id:
6767
- 'GuardDuty.1'
68-
Runtime: python3.8
68+
Runtime: python3.11
6969
Handler: parse_event
7070
Script: |-
7171
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_IAM.3.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ mainSteps:
6464
parse_id_pattern: '^arn:(?:aws|aws-cn|aws-us-gov):iam::\d{12}:user(?:(?:\u002F)|(?:\u002F[\u0021-\u007F]{1,510}\u002F))([\w+=,.@-]{1,64})$'
6565
expected_control_id:
6666
- 'IAM.3'
67-
Runtime: python3.8
67+
Runtime: python3.11
6868
Handler: parse_event
6969
Script: |-
7070
%%SCRIPT=common/parse_input.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_IAM.7.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ mainSteps:
5454
Finding: '{{Finding}}'
5555
parse_id_pattern: ''
5656
expected_control_id: [ 'IAM.7' ]
57-
Runtime: python3.8
57+
Runtime: python3.11
5858
Handler: parse_event
5959
Script: |-
6060
%%SCRIPT=common/parse_input.py%%
@@ -104,7 +104,7 @@ mainSteps:
104104
"PasswordReusePrevention": 24
105105
}
106106
expected_control_id: [ 'IAM.7' ]
107-
Runtime: python3.8
107+
Runtime: python3.11
108108
Handler: get_input_params
109109
Script: |-
110110
%%SCRIPT=common/get_input_params.py%%

source/playbooks/AFSBP/ssmdocs/AFSBP_IAM.8.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ mainSteps:
5656
parse_id_pattern: ''
5757
expected_control_id:
5858
- 'IAM.8'
59-
Runtime: python3.8
59+
Runtime: python3.11
6060
Handler: parse_event
6161
Script: |-
6262
%%SCRIPT=common/parse_input.py%%

0 commit comments

Comments
 (0)