Skip to content

Commit fdbfb69

Browse files
committed
Update to version v4.0.6
1 parent 885146e commit fdbfb69

23 files changed

+334
-209
lines changed

CHANGELOG.md

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

7+
## [4.0.6] - 2024-12-17
8+
9+
### Changed
10+
11+
- Update the lambda to python 3.12
12+
13+
### Fixed
14+
15+
- Added a check for payload for logging before sanitizing and logging [Github issue 274](https://github.com/aws-solutions/aws-waf-security-automations/issues/274)
16+
717
## [4.0.5] - 2024-10-24
818

919
### Changed
@@ -15,13 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1525
## [4.0.4] - 2024-09-23
1626

1727
### Fixed
18-
- Patched dependency version of `requests` to `2.32.3` to mitigate [CVE-2024-3651](https://nvd.nist.gov/vuln/detail/CVE-2024-3651)
19-
- Pinned all dependencies to specific versions for reproducable builds and enable security scanning
20-
- Allow to install latest version of `urllib3` as transitive dependency
2128

22-
## [4.0.4] - 2024-09-23
23-
24-
### Fixed
2529
- Patched dependency version of `requests` to `2.32.3` to mitigate [CVE-2024-3651](https://nvd.nist.gov/vuln/detail/CVE-2024-3651)
2630
- Pinned all dependencies to specific versions for reproducable builds and enable security scanning
2731
- Allow to install latest version of `urllib3` as transitive dependency
@@ -53,7 +57,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
5357
- Added support for 10 new AWS Managed Rules rule groups (AMR)
5458
- Added support for country and URI configurations in HTTP Flood Athena log parser
5559
- Added support for user-defined S3 prefix for application access log bucket
56-
- Added support for CloudWatch log retention period configuration
60+
- Added support for CloudWatch log retention period configuration
5761
- Added support for multiple solution deployments in the same account and region
5862
- Added support for exporting CloudFormation stack output values
5963
- Replaced the hard coded amazonaws.com with {AWS::URLSuffix} in BadBotHoneypot API endpoint
@@ -94,9 +98,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
9498
### Added
9599

96100
- Added support for configuring oversize handling for requests components
97-
- Added support for configuring sensitivity level for SQL injection rule
101+
- Added support for configuring sensitivity level for SQL injection rule
98102

99-
## [3.2] - 2021-09-22
103+
## [3.2.0] - 2021-09-22
100104

101105
### Added
102106

@@ -106,15 +110,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
106110

107111
- Bug fixes
108112

109-
## [3.1] - 2020-10-22
113+
## [3.1.0] - 2020-10-22
110114

111115
### Changed
112116

113117
- Replaced s3 path-style with virtual-hosted style
114118
- Added partition variable to all ARNs
115119
- Updated bug report
116120

117-
## [3.0] - 2020-07-08
121+
## [3.0.0] - 2020-07-08
118122

119123
### Added
120124

NOTICE.txt

Lines changed: 46 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -10,45 +10,51 @@ specific language governing permissions and limitations under the License.
1010
**********************
1111
THIRD PARTY COMPONENTS
1212
**********************
13+
1314
This software includes third party software subject to the following copyrights:
1415

15-
freezegun under the Apache Software License
16-
boto3 under the Apache Software License
17-
botocore under the Apache Software License
18-
Mock under the BDS License
19-
moto under the Apache Software License
20-
pytest under the MIT License
21-
pytest-mock under the MIT License
22-
pytest-cov under the MIT License
23-
pytest-env under the MIT License
24-
pyparsing under the MIT License
25-
pytest-runner under the MIT License
26-
uuid under the MIT License
27-
backoff under the MIT License
28-
requests under the Apache Software License
29-
certifi under the Mozilla Public License
30-
charset_normalizer under the Apache Software License
31-
python-dateutil under the Apache Software License and BSD License
32-
inda under the BSD License
33-
urllib3 under the MIT License
34-
jmespath under the MIT License
35-
s3transfer under the Apache Software License
36-
cryptography under the Apache Software License and BSD License
37-
Werkzeug under the BSD-3-Clause
38-
xmltodict under the MIT License
39-
responses under the Apache-2.0
40-
Jinja2 under the BSD License
41-
pycparser under the BSD License
42-
pyyaml under the MIT License
43-
attrs under the MIT License
44-
pluggy under the MIT License
45-
iniconfig under the MIT License
46-
exceptiongroup under the MIT License
47-
packaging under the Apache Software License and BSD License
48-
tomli under the MIT License
49-
coverage under the Apache Software License
50-
cffi under the MIT License
51-
six under the MIT License
52-
types-PyYAML under the Apache Software License
53-
MarkupSafe under the BSD-3-Clause
54-
typing_extensions under the PSF License and BSD License
16+
aws-lambda-powertools under the MIT license.
17+
backoff under the MIT license.
18+
boto3 under the Apache-2.0 license.
19+
botocore under the Apache-2.0 license.
20+
certifi under the MPL-2.0 license.
21+
cffi under the MIT license.
22+
charset-normalizer under the MIT license.
23+
colorama under the 0BSD license.
24+
coverage under the Apache-2.0 license.
25+
cryptography under the Apache-2.0 license.
26+
idna under the 0BSD license.
27+
iniconfig under the MIT license.
28+
jinja2 under the 0BSD license.
29+
jmespath under the MIT license.
30+
markupsafe under the 0BSD license.
31+
moto under the Apache-2.0 license.
32+
packaging under the Apache-2.0 license.
33+
pluggy under the MIT license.
34+
pycparser under the 0BSD license.
35+
pytest under the MIT license.
36+
pytest-cov under the MIT license.
37+
pytest-env under the MIT license.
38+
pytest-mock under the MIT license.
39+
pytest-runner under the MIT license.
40+
python-dateutil under the Apache-2.0 license.
41+
pyyaml under the MIT license.
42+
requests under the Apache-2.0 license.
43+
responses under the Apache-2.0 license.
44+
s3transfer under the Apache-2.0 license.
45+
six under the MIT license.
46+
typing-extensions under the PSF-2.0 license.
47+
urllib3 under the MIT license.
48+
werkzeug under the 0BSD license.
49+
xmltodict under the MIT license.
50+
freezegun under the Apache-2.0 license.
51+
pyparsing under the MIT license.
52+
53+
********************
54+
OPEN SOURCE LICENSES
55+
********************
56+
57+
0BSD - https://spdx.org/licenses/0BSD.html
58+
Apache-2.0 - https://spdx.org/licenses/Apache-2.0.html
59+
MPL-2.0 - https://spdx.org/licenses/MPL-2.0.html
60+
PSF-2.0 - https://spdx.org/licenses/PSF-2.0.html

README.md

Lines changed: 13 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
- [File Structure](#file-structure)
1515
- [License](#license)
1616

17-
<a name="solution-overview"></a>
17+
---
1818

1919
# Solution overview
2020

@@ -26,14 +26,11 @@ You can install this solution in your AWS accounts by launching the provided AWS
2626

2727
For a detailed solution implementation guide, refer to Solution Landing Page [Security Automations for AWS WAF](https://aws.amazon.com/solutions/implementations/security-automations-for-aws-waf).
2828

29-
<a name="architecture-diagram"></a>
29+
---
3030

3131
# Architecture diagram
3232

33-
<p align="center">
34-
<img src="source/image/architecture_diagram.png">
35-
<br/>
36-
</p>
33+
![Diagram](source/image/architecture_diagram.png)
3734

3835
*Security Automations for AWS WAF architecture*
3936

@@ -49,18 +46,17 @@ The components of this solution can be grouped into the following areas of prote
4946
* **IP Reputation Lists (H)** – This component is the IP Lists Parser Lambda function that checks third-party IP reputation lists hourly for new ranges to block. These lists include the Spamhaus Don’t Route Or Peer (DROP) and Extended DROP (EDROP) lists, the Proofpoint Emerging Threats IP list, and the Tor exit node list.
5047
* **Bad Bot (I)** – This component automatically sets up a honeypot, which is a security mechanism intended to lure and deflect an attempted attack.
5148

52-
<a name="customizing-the-solution"></a>
49+
---
50+
5351

5452
# Customizing the solution
5553

56-
<a name="prerequisites-for-customization"></a>
5754

5855
## Prerequisites for customization
5956

6057
- [AWS Command Line Interface](https://aws.amazon.com/cli/)
61-
- Python 3.10
62-
63-
<a name="build"></a>
58+
- Python 3.12
59+
- Poetry
6460

6561
## Build
6662

@@ -120,7 +116,6 @@ cd <rootDir>/deployment
120116
chmod +x ./build-s3-dist.sh && ./build-s3-dist.sh $TEMPLATE_OUTPUT_BUCKET $DIST_OUTPUT_BUCKET $SOLUTION_NAME $VERSION
121117
```
122118

123-
<a name="upload-deployment-assets"></a>
124119

125120
## Upload deployment assets
126121

@@ -131,7 +126,6 @@ aws s3 cp ./deployment/regional-s3-assets s3://$DIST_OUTPUT_BUCKET-$AWS_REGION/$
131126

132127
**Note:** You must use a proper ACL and profile for the copy operation as applicable. Using randomized bucket names is recommended.
133128

134-
<a name="deploy"></a>
135129

136130
## Deploy
137131

@@ -140,13 +134,13 @@ aws s3 cp ./deployment/regional-s3-assets s3://$DIST_OUTPUT_BUCKET-$AWS_REGION/$
140134

141135
**Note:** When deploying the template for your CloudFront endpoint, you can launch it only from the `us-east-1` Region.
142136

143-
<a name="file-structure"></a>
137+
---
144138

145139
# File structure
146140

147141
This project consists of microservices that facilitate the functional areas of the solution. These microservices are deployed to a serverless environment in AWS Lambda.
148142

149-
<pre>
143+
```
150144
|-deployment/ [folder containing templates and build scripts]
151145
|-source/
152146
|-access_handler/ [microservice for processing bad bots honeypot endpoint access. This AWS Lambda function intercepts the suspicious request and adds the source IP address to the AWS WAF block list]
@@ -158,15 +152,16 @@ This project consists of microservices that facilitate the functional areas of t
158152
|-log_parser/ [microservice for processing access logs searching for suspicious behavior and add the corresponding source IP addresses to an AWS WAF block list]
159153
|-reputation_lists_parser/ [microservice for processing third-party IP reputation lists and add malicious IP addresses to an AWS WAF block list]
160154
|-timer/ [creates a sleep function for cloudformation to pace the creation of ip_sets]
161-
</pre>
155+
```
162156

163-
<a name="Collection of operational metrics"></a>
157+
---
164158

165159
# Collection of operational metrics
166160

167161
This solution collects anonymized operational metrics to help AWS improve the quality and features of the solution. For more information, including how to disable this capability, please see the [implementation guide](https://docs.aws.amazon.com/solutions/latest/security-automations-for-aws-waf/reference.html).
168162

169-
<a name="license"></a>
163+
164+
---
170165

171166
# License
172167

SECURITY.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
Reporting Security Issues
2-
-------------------------------------------------------------------------------------------------------------------------------------------------
3-
We take all security reports seriously. When we receive such reports, we will investigate and
4-
subsequently address any potential vulnerabilities as quickly as possible. If you discover a potential
5-
security issue in this project, please notify AWS/Amazon Security via
6-
our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or
7-
directly via email to [AWS Security](mailto:[email protected]). Please do not create a public GitHub issue in this
8-
project.
1+
## Reporting Security Issues
2+
3+
We take all security reports seriously. When we receive such reports,
4+
we will investigate and subsequently address any potential vulnerabilities as
5+
quickly as possible. If you discover a potential security issue in this project,
6+
please notify AWS/Amazon Security via our [vulnerability reporting page]
7+
(http://aws.amazon.com/security/vulnerability-reporting/) or directly via email
8+
to [AWS Security](mailto:[email protected]).
9+
Please do *not* create a public GitHub issue in this project.

deployment/aws-waf-security-automations-webacl.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ Resources:
430430
Code:
431431
S3Bucket: !Join ['-', [!FindInMap ["SourceCode", "General", "SourceBucket"], !Ref 'AWS::Region']]
432432
S3Key: !Join ['/', [!FindInMap ["SourceCode", "General", "KeyPrefix"], 'timer.zip']]
433-
Runtime: python3.10
433+
Runtime: python3.12
434434
MemorySize: 128
435435
Timeout: 300
436436
Environment:

deployment/aws-waf-security-automations.template

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1472,7 +1472,7 @@ Resources:
14721472
LOG_LEVEL: !FindInMap ["Solution", "Data", "LogLevel"]
14731473
SCOPE: !If [AlbEndpoint, 'REGIONAL', 'CLOUDFRONT']
14741474
USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra]
1475-
Runtime: python3.10
1475+
Runtime: python3.12
14761476
MemorySize: 128
14771477
Timeout: 300
14781478
Metadata:
@@ -1798,7 +1798,7 @@ Resources:
17981798
METRICS_URL: !FindInMap [Solution, Data, MetricsURL]
17991799
USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra]
18001800
Version: "%VERSION%"
1801-
Runtime: python3.10
1801+
Runtime: python3.12
18021802
MemorySize: 512
18031803
Timeout: 300
18041804
Metadata:
@@ -1830,7 +1830,7 @@ Resources:
18301830
KEEP_ORIGINAL_DATA: !Ref KeepDataInOriginalS3Location
18311831
ENDPOINT: !Ref EndpointType
18321832
USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra]
1833-
Runtime: python3.10
1833+
Runtime: python3.12
18341834
MemorySize: 512
18351835
Timeout: 300
18361836
Metadata:
@@ -1859,7 +1859,7 @@ Resources:
18591859
Variables:
18601860
LOG_LEVEL: !FindInMap ["Solution", "Data", "LogLevel"]
18611861
USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra]
1862-
Runtime: python3.10
1862+
Runtime: python3.12
18631863
MemorySize: 512
18641864
Timeout: 300
18651865
Metadata:
@@ -1892,7 +1892,7 @@ Resources:
18921892
IP_RETENTION_PERIOD_DENIED_MINUTE: !Ref IPRetentionPeriodDeniedParam
18931893
REMOVE_EXPIRED_IP_LAMBDA_ROLE_NAME: !Ref LambdaRoleRemoveExpiredIP
18941894
USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra]
1895-
Runtime: python3.10
1895+
Runtime: python3.12
18961896
MemorySize: 128
18971897
Timeout: 300
18981898
Metadata:
@@ -1925,7 +1925,7 @@ Resources:
19251925
METRICS_URL: !FindInMap [Solution, Data, MetricsURL]
19261926
USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra]
19271927
Version: "%VERSION%"
1928-
Runtime: python3.10
1928+
Runtime: python3.12
19291929
MemorySize: 512
19301930
Timeout: 300
19311931
Metadata:
@@ -2107,7 +2107,7 @@ Resources:
21072107
Code:
21082108
S3Bucket: !Join ['-', [!FindInMap ["SourceCode", "General", "SourceBucket"], !Ref 'AWS::Region']]
21092109
S3Key: !Join ['/', [!FindInMap ["SourceCode", "General", "KeyPrefix"], 'reputation_lists_parser.zip']]
2110-
Runtime: python3.10
2110+
Runtime: python3.12
21112111
MemorySize: 512
21122112
Timeout: 300
21132113
Environment:
@@ -2215,7 +2215,7 @@ Resources:
22152215
STACK_NAME: !Ref 'AWS::StackName'
22162216
USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra]
22172217
Version: "%VERSION%"
2218-
Runtime: python3.10
2218+
Runtime: python3.12
22192219
MemorySize: 128
22202220
Timeout: 300
22212221
Metadata:
@@ -2409,7 +2409,7 @@ Resources:
24092409
USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra]
24102410
Version: "%VERSION%"
24112411
UUID: !GetAtt CreateUniqueID.UUID
2412-
Runtime: python3.10
2412+
Runtime: python3.12
24132413
MemorySize: 128
24142414
Timeout: 300
24152415
Metadata:

0 commit comments

Comments
 (0)