diff --git a/CHANGELOG.md b/CHANGELOG.md index 4147f2d..46fd309 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,16 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [4.0.6] - 2024-12-17 + +### Changed + +- Update the lambda to python 3.12 + +### Fixed + +- 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) + ## [4.0.5] - 2024-10-24 ### Changed @@ -15,13 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [4.0.4] - 2024-09-23 ### Fixed -- Patched dependency version of `requests` to `2.32.3` to mitigate [CVE-2024-3651](https://nvd.nist.gov/vuln/detail/CVE-2024-3651) -- Pinned all dependencies to specific versions for reproducable builds and enable security scanning -- Allow to install latest version of `urllib3` as transitive dependency -## [4.0.4] - 2024-09-23 - -### Fixed - Patched dependency version of `requests` to `2.32.3` to mitigate [CVE-2024-3651](https://nvd.nist.gov/vuln/detail/CVE-2024-3651) - Pinned all dependencies to specific versions for reproducable builds and enable security scanning - 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 - Added support for 10 new AWS Managed Rules rule groups (AMR) - Added support for country and URI configurations in HTTP Flood Athena log parser - Added support for user-defined S3 prefix for application access log bucket -- Added support for CloudWatch log retention period configuration +- Added support for CloudWatch log retention period configuration - Added support for multiple solution deployments in the same account and region - Added support for exporting CloudFormation stack output values - 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 ### Added - Added support for configuring oversize handling for requests components -- Added support for configuring sensitivity level for SQL injection rule +- Added support for configuring sensitivity level for SQL injection rule -## [3.2] - 2021-09-22 +## [3.2.0] - 2021-09-22 ### Added @@ -106,7 +110,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Bug fixes -## [3.1] - 2020-10-22 +## [3.1.0] - 2020-10-22 ### Changed @@ -114,7 +118,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Added partition variable to all ARNs - Updated bug report -## [3.0] - 2020-07-08 +## [3.0.0] - 2020-07-08 ### Added diff --git a/NOTICE.txt b/NOTICE.txt index 8cfe337..725b834 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -10,45 +10,51 @@ specific language governing permissions and limitations under the License. ********************** THIRD PARTY COMPONENTS ********************** + This software includes third party software subject to the following copyrights: -freezegun under the Apache Software License -boto3 under the Apache Software License -botocore under the Apache Software License -Mock under the BDS License -moto under the Apache Software License -pytest under the MIT License -pytest-mock under the MIT License -pytest-cov under the MIT License -pytest-env under the MIT License -pyparsing under the MIT License -pytest-runner under the MIT License -uuid under the MIT License -backoff under the MIT License -requests under the Apache Software License -certifi under the Mozilla Public License -charset_normalizer under the Apache Software License -python-dateutil under the Apache Software License and BSD License -inda under the BSD License -urllib3 under the MIT License -jmespath under the MIT License -s3transfer under the Apache Software License -cryptography under the Apache Software License and BSD License -Werkzeug under the BSD-3-Clause -xmltodict under the MIT License -responses under the Apache-2.0 -Jinja2 under the BSD License -pycparser under the BSD License -pyyaml under the MIT License -attrs under the MIT License -pluggy under the MIT License -iniconfig under the MIT License -exceptiongroup under the MIT License -packaging under the Apache Software License and BSD License -tomli under the MIT License -coverage under the Apache Software License -cffi under the MIT License -six under the MIT License -types-PyYAML under the Apache Software License -MarkupSafe under the BSD-3-Clause -typing_extensions under the PSF License and BSD License \ No newline at end of file +aws-lambda-powertools under the MIT license. +backoff under the MIT license. +boto3 under the Apache-2.0 license. +botocore under the Apache-2.0 license. +certifi under the MPL-2.0 license. +cffi under the MIT license. +charset-normalizer under the MIT license. +colorama under the 0BSD license. +coverage under the Apache-2.0 license. +cryptography under the Apache-2.0 license. +idna under the 0BSD license. +iniconfig under the MIT license. +jinja2 under the 0BSD license. +jmespath under the MIT license. +markupsafe under the 0BSD license. +moto under the Apache-2.0 license. +packaging under the Apache-2.0 license. +pluggy under the MIT license. +pycparser under the 0BSD license. +pytest under the MIT license. +pytest-cov under the MIT license. +pytest-env under the MIT license. +pytest-mock under the MIT license. +pytest-runner under the MIT license. +python-dateutil under the Apache-2.0 license. +pyyaml under the MIT license. +requests under the Apache-2.0 license. +responses under the Apache-2.0 license. +s3transfer under the Apache-2.0 license. +six under the MIT license. +typing-extensions under the PSF-2.0 license. +urllib3 under the MIT license. +werkzeug under the 0BSD license. +xmltodict under the MIT license. +freezegun under the Apache-2.0 license. +pyparsing under the MIT license. + +******************** +OPEN SOURCE LICENSES +******************** + +0BSD - https://spdx.org/licenses/0BSD.html +Apache-2.0 - https://spdx.org/licenses/Apache-2.0.html +MPL-2.0 - https://spdx.org/licenses/MPL-2.0.html +PSF-2.0 - https://spdx.org/licenses/PSF-2.0.html \ No newline at end of file diff --git a/README.md b/README.md index ba92728..facf0d7 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ - [File Structure](#file-structure) - [License](#license) - +--- # Solution overview @@ -26,14 +26,11 @@ You can install this solution in your AWS accounts by launching the provided AWS 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). - +--- # Architecture diagram -

- -
-

+![Diagram](source/image/architecture_diagram.png) *Security Automations for AWS WAF architecture* @@ -49,18 +46,17 @@ The components of this solution can be grouped into the following areas of prote * **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. * **Bad Bot (I)** – This component automatically sets up a honeypot, which is a security mechanism intended to lure and deflect an attempted attack. - +--- + # Customizing the solution - ## Prerequisites for customization - [AWS Command Line Interface](https://aws.amazon.com/cli/) -- Python 3.10 - - +- Python 3.12 +- Poetry ## Build @@ -120,7 +116,6 @@ cd /deployment chmod +x ./build-s3-dist.sh && ./build-s3-dist.sh $TEMPLATE_OUTPUT_BUCKET $DIST_OUTPUT_BUCKET $SOLUTION_NAME $VERSION ``` - ## Upload deployment assets @@ -131,7 +126,6 @@ aws s3 cp ./deployment/regional-s3-assets s3://$DIST_OUTPUT_BUCKET-$AWS_REGION/$ **Note:** You must use a proper ACL and profile for the copy operation as applicable. Using randomized bucket names is recommended. - ## Deploy @@ -140,13 +134,13 @@ aws s3 cp ./deployment/regional-s3-assets s3://$DIST_OUTPUT_BUCKET-$AWS_REGION/$ **Note:** When deploying the template for your CloudFront endpoint, you can launch it only from the `us-east-1` Region. - +--- # File structure This project consists of microservices that facilitate the functional areas of the solution. These microservices are deployed to a serverless environment in AWS Lambda. -
+```
 |-deployment/ [folder containing templates and build scripts]
 |-source/
   |-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
   |-log_parser/             [microservice for processing access logs searching for suspicious behavior and add the corresponding source IP addresses to an AWS WAF block list]
   |-reputation_lists_parser/ [microservice for processing third-party IP reputation lists and add malicious IP addresses to an AWS WAF block list]
   |-timer/                   [creates a sleep function for cloudformation to pace the creation of ip_sets]
-
+``` - +--- # Collection of operational metrics 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). - + +--- # License diff --git a/SECURITY.md b/SECURITY.md index 15ab1a5..004e849 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -1,8 +1,9 @@ -Reporting Security Issues -------------------------------------------------------------------------------------------------------------------------------------------------- -We take all security reports seriously. When we receive such reports, we will investigate and -subsequently address any potential vulnerabilities as quickly as possible. If you discover a potential -security issue in this project, please notify AWS/Amazon Security via -our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/) or -directly via email to [AWS Security](mailto:aws-security@amazon.com). Please do not create a public GitHub issue in this -project. +## Reporting Security Issues + +We take all security reports seriously. When we receive such reports, +we will investigate and subsequently address any potential vulnerabilities as +quickly as possible. If you discover a potential security issue in this project, +please notify AWS/Amazon Security via our [vulnerability reporting page] +(http://aws.amazon.com/security/vulnerability-reporting/) or directly via email +to [AWS Security](mailto:aws-security@amazon.com). +Please do *not* create a public GitHub issue in this project. \ No newline at end of file diff --git a/deployment/aws-waf-security-automations-webacl.template b/deployment/aws-waf-security-automations-webacl.template index b501342..7c041af 100644 --- a/deployment/aws-waf-security-automations-webacl.template +++ b/deployment/aws-waf-security-automations-webacl.template @@ -430,7 +430,7 @@ Resources: Code: S3Bucket: !Join ['-', [!FindInMap ["SourceCode", "General", "SourceBucket"], !Ref 'AWS::Region']] S3Key: !Join ['/', [!FindInMap ["SourceCode", "General", "KeyPrefix"], 'timer.zip']] - Runtime: python3.10 + Runtime: python3.12 MemorySize: 128 Timeout: 300 Environment: diff --git a/deployment/aws-waf-security-automations.template b/deployment/aws-waf-security-automations.template index 63700bc..eb81637 100644 --- a/deployment/aws-waf-security-automations.template +++ b/deployment/aws-waf-security-automations.template @@ -1472,7 +1472,7 @@ Resources: LOG_LEVEL: !FindInMap ["Solution", "Data", "LogLevel"] SCOPE: !If [AlbEndpoint, 'REGIONAL', 'CLOUDFRONT'] USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra] - Runtime: python3.10 + Runtime: python3.12 MemorySize: 128 Timeout: 300 Metadata: @@ -1798,7 +1798,7 @@ Resources: METRICS_URL: !FindInMap [Solution, Data, MetricsURL] USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra] Version: "%VERSION%" - Runtime: python3.10 + Runtime: python3.12 MemorySize: 512 Timeout: 300 Metadata: @@ -1830,7 +1830,7 @@ Resources: KEEP_ORIGINAL_DATA: !Ref KeepDataInOriginalS3Location ENDPOINT: !Ref EndpointType USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra] - Runtime: python3.10 + Runtime: python3.12 MemorySize: 512 Timeout: 300 Metadata: @@ -1859,7 +1859,7 @@ Resources: Variables: LOG_LEVEL: !FindInMap ["Solution", "Data", "LogLevel"] USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra] - Runtime: python3.10 + Runtime: python3.12 MemorySize: 512 Timeout: 300 Metadata: @@ -1892,7 +1892,7 @@ Resources: IP_RETENTION_PERIOD_DENIED_MINUTE: !Ref IPRetentionPeriodDeniedParam REMOVE_EXPIRED_IP_LAMBDA_ROLE_NAME: !Ref LambdaRoleRemoveExpiredIP USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra] - Runtime: python3.10 + Runtime: python3.12 MemorySize: 128 Timeout: 300 Metadata: @@ -1925,7 +1925,7 @@ Resources: METRICS_URL: !FindInMap [Solution, Data, MetricsURL] USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra] Version: "%VERSION%" - Runtime: python3.10 + Runtime: python3.12 MemorySize: 512 Timeout: 300 Metadata: @@ -2107,7 +2107,7 @@ Resources: Code: S3Bucket: !Join ['-', [!FindInMap ["SourceCode", "General", "SourceBucket"], !Ref 'AWS::Region']] S3Key: !Join ['/', [!FindInMap ["SourceCode", "General", "KeyPrefix"], 'reputation_lists_parser.zip']] - Runtime: python3.10 + Runtime: python3.12 MemorySize: 512 Timeout: 300 Environment: @@ -2215,7 +2215,7 @@ Resources: STACK_NAME: !Ref 'AWS::StackName' USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra] Version: "%VERSION%" - Runtime: python3.10 + Runtime: python3.12 MemorySize: 128 Timeout: 300 Metadata: @@ -2409,7 +2409,7 @@ Resources: USER_AGENT_EXTRA: !FindInMap [Solution, UserAgent, UserAgentExtra] Version: "%VERSION%" UUID: !GetAtt CreateUniqueID.UUID - Runtime: python3.10 + Runtime: python3.12 MemorySize: 128 Timeout: 300 Metadata: diff --git a/source/access_handler/poetry.lock b/source/access_handler/poetry.lock index 69b7d7e..7c874fc 100644 --- a/source/access_handler/poetry.lock +++ b/source/access_handler/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "aws-lambda-powertools" @@ -38,17 +38,17 @@ files = [ [[package]] name = "boto3" -version = "1.35.47" +version = "1.35.57" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.35.47-py3-none-any.whl", hash = "sha256:0b307f685875e9c7857ce21c0d3050d8d4f3778455a6852d5f98ac75194b400e"}, - {file = "boto3-1.35.47.tar.gz", hash = "sha256:65b808e4cf1af8c2f405382d53656a0d92eee8f85c7388c43d64c7a5571b065f"}, + {file = "boto3-1.35.57-py3-none-any.whl", hash = "sha256:9edf49640c79a05b0a72f4c2d1e24dfc164344b680535a645f455ac624dc3680"}, + {file = "boto3-1.35.57.tar.gz", hash = "sha256:db58348849a5af061f0f5ec9c3b699da5221ca83354059fdccb798e3ddb6b62a"}, ] [package.dependencies] -botocore = ">=1.35.47,<1.36.0" +botocore = ">=1.35.57,<1.36.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -57,13 +57,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.35.47" +version = "1.35.57" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.35.47-py3-none-any.whl", hash = "sha256:05f4493119a96799ff84d43e78691efac3177e1aec8840cca99511de940e342a"}, - {file = "botocore-1.35.47.tar.gz", hash = "sha256:f8f703463d3cd8b6abe2bedc443a7ab29f0e2ff1588a2e83164b108748645547"}, + {file = "botocore-1.35.57-py3-none-any.whl", hash = "sha256:92ddd02469213766872cb2399269dd20948f90348b42bf08379881d5e946cc34"}, + {file = "botocore-1.35.57.tar.gz", hash = "sha256:d96306558085baf0bcb3b022d7a8c39c93494f031edb376694d2b2dcd0e81327"}, ] [package.dependencies] @@ -581,13 +581,13 @@ xray = ["aws-xray-sdk (>=0.93,!=0.96)", "setuptools"] [[package]] name = "packaging" -version = "24.1" +version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -877,13 +877,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "werkzeug" -version = "3.0.4" +version = "3.1.3" description = "The comprehensive WSGI web application library." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c"}, - {file = "werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306"}, + {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, + {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, ] [package.dependencies] @@ -906,4 +906,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "~3.12" -content-hash = "f88903fcb2502c765695bdead7391c077b33a1cbc5df6268cbf5bc6143177a03" +content-hash = "0bfb48b84bf70fe057f247b23e34b861c37e3996473c05d5fcca8db623569643" diff --git a/source/access_handler/pyproject.toml b/source/access_handler/pyproject.toml index 28d9ea4..6fbdfbd 100644 --- a/source/access_handler/pyproject.toml +++ b/source/access_handler/pyproject.toml @@ -12,7 +12,7 @@ aws-lambda-powertools = "~3.2.0" [tool.poetry.group.dev.dependencies] moto = "^4.1.4" pytest = "^7.2.2" -pytest-mock = "^3.10.0" +pytest-mock = "^3.12.0" pytest-runner = "^6.0.0" pytest-cov = "^4.0.0" pytest-env = "^0.8.1" diff --git a/source/custom_resource/poetry.lock b/source/custom_resource/poetry.lock index 69b7d7e..7c874fc 100644 --- a/source/custom_resource/poetry.lock +++ b/source/custom_resource/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "aws-lambda-powertools" @@ -38,17 +38,17 @@ files = [ [[package]] name = "boto3" -version = "1.35.47" +version = "1.35.57" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.35.47-py3-none-any.whl", hash = "sha256:0b307f685875e9c7857ce21c0d3050d8d4f3778455a6852d5f98ac75194b400e"}, - {file = "boto3-1.35.47.tar.gz", hash = "sha256:65b808e4cf1af8c2f405382d53656a0d92eee8f85c7388c43d64c7a5571b065f"}, + {file = "boto3-1.35.57-py3-none-any.whl", hash = "sha256:9edf49640c79a05b0a72f4c2d1e24dfc164344b680535a645f455ac624dc3680"}, + {file = "boto3-1.35.57.tar.gz", hash = "sha256:db58348849a5af061f0f5ec9c3b699da5221ca83354059fdccb798e3ddb6b62a"}, ] [package.dependencies] -botocore = ">=1.35.47,<1.36.0" +botocore = ">=1.35.57,<1.36.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -57,13 +57,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.35.47" +version = "1.35.57" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.35.47-py3-none-any.whl", hash = "sha256:05f4493119a96799ff84d43e78691efac3177e1aec8840cca99511de940e342a"}, - {file = "botocore-1.35.47.tar.gz", hash = "sha256:f8f703463d3cd8b6abe2bedc443a7ab29f0e2ff1588a2e83164b108748645547"}, + {file = "botocore-1.35.57-py3-none-any.whl", hash = "sha256:92ddd02469213766872cb2399269dd20948f90348b42bf08379881d5e946cc34"}, + {file = "botocore-1.35.57.tar.gz", hash = "sha256:d96306558085baf0bcb3b022d7a8c39c93494f031edb376694d2b2dcd0e81327"}, ] [package.dependencies] @@ -581,13 +581,13 @@ xray = ["aws-xray-sdk (>=0.93,!=0.96)", "setuptools"] [[package]] name = "packaging" -version = "24.1" +version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -877,13 +877,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "werkzeug" -version = "3.0.4" +version = "3.1.3" description = "The comprehensive WSGI web application library." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c"}, - {file = "werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306"}, + {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, + {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, ] [package.dependencies] @@ -906,4 +906,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "~3.12" -content-hash = "f88903fcb2502c765695bdead7391c077b33a1cbc5df6268cbf5bc6143177a03" +content-hash = "0bfb48b84bf70fe057f247b23e34b861c37e3996473c05d5fcca8db623569643" diff --git a/source/custom_resource/pyproject.toml b/source/custom_resource/pyproject.toml index 4ce841c..01d8f8f 100644 --- a/source/custom_resource/pyproject.toml +++ b/source/custom_resource/pyproject.toml @@ -12,7 +12,7 @@ aws-lambda-powertools = "~3.2.0" [tool.poetry.group.dev.dependencies] moto = "^4.1.4" pytest = "^7.2.2" -pytest-mock = "^3.10.0" +pytest-mock = "^3.12.0" pytest-runner = "^6.0.0" pytest-cov = "^4.0.0" pytest-env = "^0.8.1" diff --git a/source/custom_resource/resource_manager.py b/source/custom_resource/resource_manager.py index 8c14032..edb7425 100644 --- a/source/custom_resource/resource_manager.py +++ b/source/custom_resource/resource_manager.py @@ -622,7 +622,10 @@ def add_athena_partitions(self, event: dict) -> None: # Sanitize the extracted information sanitized_status = sanitize_string(status_code) - sanitized_payload = json.dumps({k: sanitize_string(v) for k, v in payload.items()}) + if payload and payload.items(): + sanitized_payload = json.dumps({k: sanitize_string(v) for k, v in payload.items()}) + else: + sanitized_payload = None # Log the sanitized information self.log.info( diff --git a/source/custom_resource/test/test_resource_manager.py b/source/custom_resource/test/test_resource_manager.py index b5b9e67..bfa0b5f 100644 --- a/source/custom_resource/test/test_resource_manager.py +++ b/source/custom_resource/test/test_resource_manager.py @@ -12,7 +12,10 @@ ###################################################################################################################### import logging +import json +import pytest from resource_manager import ResourceManager +from unittest.mock import patch, MagicMock log_level = 'DEBUG' logging.getLogger().setLevel(log_level) @@ -20,6 +23,7 @@ resource_manager = ResourceManager(log) + def test_get_params_waf_event(): event = { 'ResourceProperties': { @@ -275,4 +279,116 @@ def test_update_lambda_config(): lambda_log_partition_function_arn='' ) expected = {'LambdaFunctionConfigurations': [{'LambdaFunctionArn': 'NoMatch'}]} - assert toModify == expected \ No newline at end of file + assert toModify == expected + +@pytest.fixture +def resource_manager_magicmock(): + return ResourceManager(MagicMock()) + +@patch('resource_manager.create_client') +def test_add_athena_partitions(mock_create_client, resource_manager_magicmock): + """ + Test add_athena_partitions method with valid payload and items + """ + mock_lambda_client = MagicMock() + mock_create_client.return_value = mock_lambda_client + + # Create the response with proper JSON payload + mock_response = { + 'StatusCode': 200, + 'Payload': MagicMock() + } + # Set the read() return value as encoded JSON bytes + mock_response['Payload'].read.return_value = json.dumps({ + "status": "success", + "message": "Partitions added successfully" + }).encode('utf-8') + + mock_lambda_client.invoke.return_value = mock_response + + event = { + 'ResourceProperties': { + 'AddAthenaPartitionsLambda': 'arn:aws:lambda:region:account:function:test-function:1', + 'ResourceType': 'Custom::AddAthenaPartitions', + 'GlueAccessLogsDatabase': 'test-database', + 'AppAccessLogBucket': 'XXXXXXXXXXX', + 'GlueAppAccessLogsTable': 'test-app-table', + 'GlueWafAccessLogsTable': 'test-waf-table', + 'WafLogBucket': 'XXXXXXXXXXXXXXX', + 'AthenaWorkGroup': 'test-workgroup' + } + } + + resource_manager.add_athena_partitions(event) + + mock_create_client.assert_called_once_with('lambda') + mock_lambda_client.invoke.assert_called_once() + +@patch('resource_manager.create_client') +def test_add_athena_partitions_with_empty_payload(mock_create_client, resource_manager_magicmock): + """ + Test add_athena_partitions method with empty payload + """ + mock_lambda_client = MagicMock() + mock_create_client.return_value = mock_lambda_client + + # Create a mock response with minimal valid JSON payload + mock_response = { + 'StatusCode': 200, + 'Payload': MagicMock() + } + + # Configure the mock payload to return a null payload + mock_response['Payload'].read.return_value = b'{}' + + mock_lambda_client.invoke.return_value = mock_response + + event = { + 'ResourceProperties': { + 'AddAthenaPartitionsLambda': 'arn:aws:lambda:region:account:function:test-function:1', + 'ResourceType': 'Custom::AddAthenaPartitions', + 'GlueAccessLogsDatabase': 'test-database', + 'AppAccessLogBucket': 'XXXXXXXXXXX', + 'GlueAppAccessLogsTable': 'test-app-table', + 'GlueWafAccessLogsTable': 'test-waf-table', + 'WafLogBucket': 'XXXXXXXXXXXXXXX', + 'AthenaWorkGroup': 'test-workgroup' + } + } + + resource_manager.add_athena_partitions(event) + + mock_create_client.assert_called_once_with('lambda') + mock_lambda_client.invoke.assert_called_once() + + + +def test_add_athena_partitions_empty_input(): + """Test add_athena_partitions with empty input""" + with pytest.raises(KeyError): + resource_manager.add_athena_partitions({}) + + +def test_add_athena_partitions_invalid_json_response(): + """Test add_athena_partitions when Lambda returns invalid JSON""" + event = { + 'ResourceProperties': { + 'ResourceType': 'CREATE', + 'AddAthenaPartitionsLambda': 'arn:aws:lambda:us-west-2:123456789012:function:test-function', + 'GlueAccessLogsDatabase': 'test-database', + 'AppAccessLogBucket': 'XXXXXXXXXXX', + 'GlueAppAccessLogsTable': 'test-table', + 'GlueWafAccessLogsTable': 'test-waf-table', + 'WafLogBucket': 'XXXXXXXXXXXXXXX', + 'AthenaWorkGroup': 'test-workgroup' + } + } + with patch('resource_manager.create_client') as mock_create_client: + mock_lambda = MagicMock() + mock_create_client.return_value = mock_lambda + mock_lambda.invoke.return_value = { + 'StatusCode': 200, + 'Payload': MagicMock(read=lambda: 'Invalid JSON'.encode('utf-8')) + } + with pytest.raises(json.JSONDecodeError): + resource_manager.add_athena_partitions(event) \ No newline at end of file diff --git a/source/helper/poetry.lock b/source/helper/poetry.lock index 69b7d7e..7c874fc 100644 --- a/source/helper/poetry.lock +++ b/source/helper/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "aws-lambda-powertools" @@ -38,17 +38,17 @@ files = [ [[package]] name = "boto3" -version = "1.35.47" +version = "1.35.57" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.35.47-py3-none-any.whl", hash = "sha256:0b307f685875e9c7857ce21c0d3050d8d4f3778455a6852d5f98ac75194b400e"}, - {file = "boto3-1.35.47.tar.gz", hash = "sha256:65b808e4cf1af8c2f405382d53656a0d92eee8f85c7388c43d64c7a5571b065f"}, + {file = "boto3-1.35.57-py3-none-any.whl", hash = "sha256:9edf49640c79a05b0a72f4c2d1e24dfc164344b680535a645f455ac624dc3680"}, + {file = "boto3-1.35.57.tar.gz", hash = "sha256:db58348849a5af061f0f5ec9c3b699da5221ca83354059fdccb798e3ddb6b62a"}, ] [package.dependencies] -botocore = ">=1.35.47,<1.36.0" +botocore = ">=1.35.57,<1.36.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -57,13 +57,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.35.47" +version = "1.35.57" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.35.47-py3-none-any.whl", hash = "sha256:05f4493119a96799ff84d43e78691efac3177e1aec8840cca99511de940e342a"}, - {file = "botocore-1.35.47.tar.gz", hash = "sha256:f8f703463d3cd8b6abe2bedc443a7ab29f0e2ff1588a2e83164b108748645547"}, + {file = "botocore-1.35.57-py3-none-any.whl", hash = "sha256:92ddd02469213766872cb2399269dd20948f90348b42bf08379881d5e946cc34"}, + {file = "botocore-1.35.57.tar.gz", hash = "sha256:d96306558085baf0bcb3b022d7a8c39c93494f031edb376694d2b2dcd0e81327"}, ] [package.dependencies] @@ -581,13 +581,13 @@ xray = ["aws-xray-sdk (>=0.93,!=0.96)", "setuptools"] [[package]] name = "packaging" -version = "24.1" +version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -877,13 +877,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "werkzeug" -version = "3.0.4" +version = "3.1.3" description = "The comprehensive WSGI web application library." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c"}, - {file = "werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306"}, + {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, + {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, ] [package.dependencies] @@ -906,4 +906,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "~3.12" -content-hash = "f88903fcb2502c765695bdead7391c077b33a1cbc5df6268cbf5bc6143177a03" +content-hash = "0bfb48b84bf70fe057f247b23e34b861c37e3996473c05d5fcca8db623569643" diff --git a/source/helper/pyproject.toml b/source/helper/pyproject.toml index 86d3c07..c6b1b06 100644 --- a/source/helper/pyproject.toml +++ b/source/helper/pyproject.toml @@ -12,7 +12,7 @@ aws-lambda-powertools = "~3.2.0" [tool.poetry.group.dev.dependencies] moto = "^4.1.4" pytest = "^7.2.2" -pytest-mock = "^3.10.0" +pytest-mock = "^3.12.0" pytest-runner = "^6.0.0" pytest-cov = "^4.0.0" pytest-env = "^0.8.1" diff --git a/source/ip_retention_handler/poetry.lock b/source/ip_retention_handler/poetry.lock index 69b7d7e..7c874fc 100644 --- a/source/ip_retention_handler/poetry.lock +++ b/source/ip_retention_handler/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "aws-lambda-powertools" @@ -38,17 +38,17 @@ files = [ [[package]] name = "boto3" -version = "1.35.47" +version = "1.35.57" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.35.47-py3-none-any.whl", hash = "sha256:0b307f685875e9c7857ce21c0d3050d8d4f3778455a6852d5f98ac75194b400e"}, - {file = "boto3-1.35.47.tar.gz", hash = "sha256:65b808e4cf1af8c2f405382d53656a0d92eee8f85c7388c43d64c7a5571b065f"}, + {file = "boto3-1.35.57-py3-none-any.whl", hash = "sha256:9edf49640c79a05b0a72f4c2d1e24dfc164344b680535a645f455ac624dc3680"}, + {file = "boto3-1.35.57.tar.gz", hash = "sha256:db58348849a5af061f0f5ec9c3b699da5221ca83354059fdccb798e3ddb6b62a"}, ] [package.dependencies] -botocore = ">=1.35.47,<1.36.0" +botocore = ">=1.35.57,<1.36.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -57,13 +57,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.35.47" +version = "1.35.57" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.35.47-py3-none-any.whl", hash = "sha256:05f4493119a96799ff84d43e78691efac3177e1aec8840cca99511de940e342a"}, - {file = "botocore-1.35.47.tar.gz", hash = "sha256:f8f703463d3cd8b6abe2bedc443a7ab29f0e2ff1588a2e83164b108748645547"}, + {file = "botocore-1.35.57-py3-none-any.whl", hash = "sha256:92ddd02469213766872cb2399269dd20948f90348b42bf08379881d5e946cc34"}, + {file = "botocore-1.35.57.tar.gz", hash = "sha256:d96306558085baf0bcb3b022d7a8c39c93494f031edb376694d2b2dcd0e81327"}, ] [package.dependencies] @@ -581,13 +581,13 @@ xray = ["aws-xray-sdk (>=0.93,!=0.96)", "setuptools"] [[package]] name = "packaging" -version = "24.1" +version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -877,13 +877,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "werkzeug" -version = "3.0.4" +version = "3.1.3" description = "The comprehensive WSGI web application library." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c"}, - {file = "werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306"}, + {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, + {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, ] [package.dependencies] @@ -906,4 +906,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "~3.12" -content-hash = "f88903fcb2502c765695bdead7391c077b33a1cbc5df6268cbf5bc6143177a03" +content-hash = "0bfb48b84bf70fe057f247b23e34b861c37e3996473c05d5fcca8db623569643" diff --git a/source/ip_retention_handler/pyproject.toml b/source/ip_retention_handler/pyproject.toml index 63028e0..81c6eb9 100644 --- a/source/ip_retention_handler/pyproject.toml +++ b/source/ip_retention_handler/pyproject.toml @@ -12,7 +12,7 @@ aws-lambda-powertools = "~3.2.0" [tool.poetry.group.dev.dependencies] moto = "^4.1.4" pytest = "^7.2.2" -pytest-mock = "^3.10.0" +pytest-mock = "^3.12.0" pytest-runner = "^6.0.0" pytest-cov = "^4.0.0" pytest-env = "^0.8.1" diff --git a/source/log_parser/athena_log_parser.py b/source/log_parser/athena_log_parser.py index abc6489..b78b1c2 100644 --- a/source/log_parser/athena_log_parser.py +++ b/source/log_parser/athena_log_parser.py @@ -104,7 +104,7 @@ def read_athena_result_file(self, local_file_path): 'general': {}, 'uriList': {} } - utc_now_timestamp_str = datetime.datetime.now(datetime.timezone.utc).strftime("%Y-%m-%d %H:%M:%S %Z%z") + utc_now_timestamp_str = datetime.datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S %Z%z") with open(local_file_path, 'r') as csvfile: reader = csv.DictReader(csvfile) for row in reader: diff --git a/source/log_parser/poetry.lock b/source/log_parser/poetry.lock index 6f01dc6..ed9dab7 100644 --- a/source/log_parser/poetry.lock +++ b/source/log_parser/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "aws-lambda-powertools" @@ -38,17 +38,17 @@ files = [ [[package]] name = "boto3" -version = "1.35.47" +version = "1.35.57" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.35.47-py3-none-any.whl", hash = "sha256:0b307f685875e9c7857ce21c0d3050d8d4f3778455a6852d5f98ac75194b400e"}, - {file = "boto3-1.35.47.tar.gz", hash = "sha256:65b808e4cf1af8c2f405382d53656a0d92eee8f85c7388c43d64c7a5571b065f"}, + {file = "boto3-1.35.57-py3-none-any.whl", hash = "sha256:9edf49640c79a05b0a72f4c2d1e24dfc164344b680535a645f455ac624dc3680"}, + {file = "boto3-1.35.57.tar.gz", hash = "sha256:db58348849a5af061f0f5ec9c3b699da5221ca83354059fdccb798e3ddb6b62a"}, ] [package.dependencies] -botocore = ">=1.35.47,<1.36.0" +botocore = ">=1.35.57,<1.36.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -57,13 +57,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.35.47" +version = "1.35.57" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.35.47-py3-none-any.whl", hash = "sha256:05f4493119a96799ff84d43e78691efac3177e1aec8840cca99511de940e342a"}, - {file = "botocore-1.35.47.tar.gz", hash = "sha256:f8f703463d3cd8b6abe2bedc443a7ab29f0e2ff1588a2e83164b108748645547"}, + {file = "botocore-1.35.57-py3-none-any.whl", hash = "sha256:92ddd02469213766872cb2399269dd20948f90348b42bf08379881d5e946cc34"}, + {file = "botocore-1.35.57.tar.gz", hash = "sha256:d96306558085baf0bcb3b022d7a8c39c93494f031edb376694d2b2dcd0e81327"}, ] [package.dependencies] @@ -595,13 +595,13 @@ xray = ["aws-xray-sdk (>=0.93,!=0.96)", "setuptools"] [[package]] name = "packaging" -version = "24.1" +version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -905,13 +905,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "werkzeug" -version = "3.0.4" +version = "3.1.3" description = "The comprehensive WSGI web application library." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c"}, - {file = "werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306"}, + {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, + {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, ] [package.dependencies] @@ -934,4 +934,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "~3.12" -content-hash = "99b6dd16827dcbb5c409b4f3d433eb566bcdcedc104508cea7f9d9dafc75da73" +content-hash = "b448492796a0c5acf55b3379589c13914df3adab52a35c7a5d0b1b93dbff551a" diff --git a/source/log_parser/pyproject.toml b/source/log_parser/pyproject.toml index e1a79d1..bbfd9a4 100644 --- a/source/log_parser/pyproject.toml +++ b/source/log_parser/pyproject.toml @@ -13,7 +13,7 @@ aws-lambda-powertools = "~3.2.0" [tool.poetry.group.dev.dependencies] moto = "^4.1.4" pytest = "^7.2.2" -pytest-mock = "^3.10.0" +pytest-mock = "^3.12.0" pytest-runner = "^6.0.0" pytest-cov = "^4.0.0" pytest-env = "^0.8.1" diff --git a/source/reputation_lists_parser/poetry.lock b/source/reputation_lists_parser/poetry.lock index 69b7d7e..7c874fc 100644 --- a/source/reputation_lists_parser/poetry.lock +++ b/source/reputation_lists_parser/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "aws-lambda-powertools" @@ -38,17 +38,17 @@ files = [ [[package]] name = "boto3" -version = "1.35.47" +version = "1.35.57" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.35.47-py3-none-any.whl", hash = "sha256:0b307f685875e9c7857ce21c0d3050d8d4f3778455a6852d5f98ac75194b400e"}, - {file = "boto3-1.35.47.tar.gz", hash = "sha256:65b808e4cf1af8c2f405382d53656a0d92eee8f85c7388c43d64c7a5571b065f"}, + {file = "boto3-1.35.57-py3-none-any.whl", hash = "sha256:9edf49640c79a05b0a72f4c2d1e24dfc164344b680535a645f455ac624dc3680"}, + {file = "boto3-1.35.57.tar.gz", hash = "sha256:db58348849a5af061f0f5ec9c3b699da5221ca83354059fdccb798e3ddb6b62a"}, ] [package.dependencies] -botocore = ">=1.35.47,<1.36.0" +botocore = ">=1.35.57,<1.36.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -57,13 +57,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.35.47" +version = "1.35.57" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.35.47-py3-none-any.whl", hash = "sha256:05f4493119a96799ff84d43e78691efac3177e1aec8840cca99511de940e342a"}, - {file = "botocore-1.35.47.tar.gz", hash = "sha256:f8f703463d3cd8b6abe2bedc443a7ab29f0e2ff1588a2e83164b108748645547"}, + {file = "botocore-1.35.57-py3-none-any.whl", hash = "sha256:92ddd02469213766872cb2399269dd20948f90348b42bf08379881d5e946cc34"}, + {file = "botocore-1.35.57.tar.gz", hash = "sha256:d96306558085baf0bcb3b022d7a8c39c93494f031edb376694d2b2dcd0e81327"}, ] [package.dependencies] @@ -581,13 +581,13 @@ xray = ["aws-xray-sdk (>=0.93,!=0.96)", "setuptools"] [[package]] name = "packaging" -version = "24.1" +version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -877,13 +877,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "werkzeug" -version = "3.0.4" +version = "3.1.3" description = "The comprehensive WSGI web application library." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c"}, - {file = "werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306"}, + {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, + {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, ] [package.dependencies] @@ -906,4 +906,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "~3.12" -content-hash = "f88903fcb2502c765695bdead7391c077b33a1cbc5df6268cbf5bc6143177a03" +content-hash = "0bfb48b84bf70fe057f247b23e34b861c37e3996473c05d5fcca8db623569643" diff --git a/source/reputation_lists_parser/pyproject.toml b/source/reputation_lists_parser/pyproject.toml index 0db1cac..aa0c15b 100644 --- a/source/reputation_lists_parser/pyproject.toml +++ b/source/reputation_lists_parser/pyproject.toml @@ -12,7 +12,7 @@ aws-lambda-powertools = "~3.2.0" [tool.poetry.group.dev.dependencies] moto = "^4.1.4" pytest = "^7.2.2" -pytest-mock = "^3.10.0" +pytest-mock = "^3.12.0" pytest-runner = "^6.0.0" pytest-cov = "^4.0.0" pytest-env = "^0.8.1" diff --git a/source/timer/poetry.lock b/source/timer/poetry.lock index 69b7d7e..7c874fc 100644 --- a/source/timer/poetry.lock +++ b/source/timer/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.3 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.4 and should not be changed by hand. [[package]] name = "aws-lambda-powertools" @@ -38,17 +38,17 @@ files = [ [[package]] name = "boto3" -version = "1.35.47" +version = "1.35.57" description = "The AWS SDK for Python" optional = false python-versions = ">=3.8" files = [ - {file = "boto3-1.35.47-py3-none-any.whl", hash = "sha256:0b307f685875e9c7857ce21c0d3050d8d4f3778455a6852d5f98ac75194b400e"}, - {file = "boto3-1.35.47.tar.gz", hash = "sha256:65b808e4cf1af8c2f405382d53656a0d92eee8f85c7388c43d64c7a5571b065f"}, + {file = "boto3-1.35.57-py3-none-any.whl", hash = "sha256:9edf49640c79a05b0a72f4c2d1e24dfc164344b680535a645f455ac624dc3680"}, + {file = "boto3-1.35.57.tar.gz", hash = "sha256:db58348849a5af061f0f5ec9c3b699da5221ca83354059fdccb798e3ddb6b62a"}, ] [package.dependencies] -botocore = ">=1.35.47,<1.36.0" +botocore = ">=1.35.57,<1.36.0" jmespath = ">=0.7.1,<2.0.0" s3transfer = ">=0.10.0,<0.11.0" @@ -57,13 +57,13 @@ crt = ["botocore[crt] (>=1.21.0,<2.0a0)"] [[package]] name = "botocore" -version = "1.35.47" +version = "1.35.57" description = "Low-level, data-driven core of boto 3." optional = false python-versions = ">=3.8" files = [ - {file = "botocore-1.35.47-py3-none-any.whl", hash = "sha256:05f4493119a96799ff84d43e78691efac3177e1aec8840cca99511de940e342a"}, - {file = "botocore-1.35.47.tar.gz", hash = "sha256:f8f703463d3cd8b6abe2bedc443a7ab29f0e2ff1588a2e83164b108748645547"}, + {file = "botocore-1.35.57-py3-none-any.whl", hash = "sha256:92ddd02469213766872cb2399269dd20948f90348b42bf08379881d5e946cc34"}, + {file = "botocore-1.35.57.tar.gz", hash = "sha256:d96306558085baf0bcb3b022d7a8c39c93494f031edb376694d2b2dcd0e81327"}, ] [package.dependencies] @@ -581,13 +581,13 @@ xray = ["aws-xray-sdk (>=0.93,!=0.96)", "setuptools"] [[package]] name = "packaging" -version = "24.1" +version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "packaging-24.1-py3-none-any.whl", hash = "sha256:5b8f2217dbdbd2f7f384c41c628544e6d52f2d0f53c6d0c3ea61aa5d1d7ff124"}, - {file = "packaging-24.1.tar.gz", hash = "sha256:026ed72c8ed3fcce5bf8950572258698927fd1dbda10a5e981cdf0ac37f4f002"}, + {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, + {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, ] [[package]] @@ -877,13 +877,13 @@ zstd = ["zstandard (>=0.18.0)"] [[package]] name = "werkzeug" -version = "3.0.4" +version = "3.1.3" description = "The comprehensive WSGI web application library." optional = false -python-versions = ">=3.8" +python-versions = ">=3.9" files = [ - {file = "werkzeug-3.0.4-py3-none-any.whl", hash = "sha256:02c9eb92b7d6c06f31a782811505d2157837cea66aaede3e217c7c27c039476c"}, - {file = "werkzeug-3.0.4.tar.gz", hash = "sha256:34f2371506b250df4d4f84bfe7b0921e4762525762bbd936614909fe25cd7306"}, + {file = "werkzeug-3.1.3-py3-none-any.whl", hash = "sha256:54b78bf3716d19a65be4fceccc0d1d7b89e608834989dfae50ea87564639213e"}, + {file = "werkzeug-3.1.3.tar.gz", hash = "sha256:60723ce945c19328679790e3282cc758aa4a6040e4bb330f53d30fa546d44746"}, ] [package.dependencies] @@ -906,4 +906,4 @@ files = [ [metadata] lock-version = "2.0" python-versions = "~3.12" -content-hash = "f88903fcb2502c765695bdead7391c077b33a1cbc5df6268cbf5bc6143177a03" +content-hash = "0bfb48b84bf70fe057f247b23e34b861c37e3996473c05d5fcca8db623569643" diff --git a/source/timer/pyproject.toml b/source/timer/pyproject.toml index b79c02f..0d46962 100644 --- a/source/timer/pyproject.toml +++ b/source/timer/pyproject.toml @@ -12,7 +12,7 @@ aws-lambda-powertools = "~3.2.0" [tool.poetry.group.dev.dependencies] moto = "^4.1.4" pytest = "^7.2.2" -pytest-mock = "^3.10.0" +pytest-mock = "^3.12.0" pytest-runner = "^6.0.0" pytest-cov = "^4.0.0" pytest-env = "^0.8.1"