From fc49de47eb9e5e44935b6ea211985409dbb0bc75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pedro=20Mart=C3=ADn?= Date: Tue, 9 Apr 2024 16:07:40 +0200 Subject: [PATCH] fix(aws_lambda): Update obsolete lambda runtimes for v3 (#3736) --- docs/tutorials/configuration_file.md | 9 +++++++ prowler/config/config.yaml | 9 +++++++ tests/config/config_test.py | 9 +++++++ tests/config/fixtures/config.yaml | 9 +++++++ tests/config/fixtures/config_old.yaml | 9 +++++++ ..._function_using_supported_runtimes_test.py | 27 +++++++++++++++++++ 6 files changed, 72 insertions(+) diff --git a/docs/tutorials/configuration_file.md b/docs/tutorials/configuration_file.md index 7adaf823c3..0d3a35b69c 100644 --- a/docs/tutorials/configuration_file.md +++ b/docs/tutorials/configuration_file.md @@ -100,18 +100,27 @@ aws: # aws.awslambda_function_using_supported_runtimes obsolete_lambda_runtimes: [ + "java8", + "go1.x", + "provided", "python3.6", "python2.7", + "python3.7", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", "nodejs", "nodejs8.10", "nodejs10.x", + "nodejs12.x", + "nodejs14.x", + "dotnet5.0", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", + "dotnetcore3.1", "ruby2.5", + "ruby2.7", ] # AWS Organizations diff --git a/prowler/config/config.yaml b/prowler/config/config.yaml index 6878872a2c..aeb2d71974 100644 --- a/prowler/config/config.yaml +++ b/prowler/config/config.yaml @@ -52,18 +52,27 @@ aws: # aws.awslambda_function_using_supported_runtimes obsolete_lambda_runtimes: [ + "java8", + "go1.x", + "provided", "python3.6", "python2.7", + "python3.7", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", "nodejs", "nodejs8.10", "nodejs10.x", + "nodejs12.x", + "nodejs14.x", + "dotnet5.0", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", + "dotnetcore3.1", "ruby2.5", + "ruby2.7", ] # AWS Organizations diff --git a/tests/config/config_test.py b/tests/config/config_test.py index 90fa48578d..8e6f1a633c 100644 --- a/tests/config/config_test.py +++ b/tests/config/config_test.py @@ -34,18 +34,27 @@ config_aws = { "max_disconnect_timeout_in_seconds": 300, "max_session_duration_seconds": 36000, "obsolete_lambda_runtimes": [ + "java8", + "go1.x", + "provided", "python3.6", "python2.7", + "python3.7", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", "nodejs", "nodejs8.10", "nodejs10.x", + "nodejs12.x", + "nodejs14.x", + "dotnet5.0", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", + "dotnetcore3.1", "ruby2.5", + "ruby2.7", ], "organizations_enabled_regions": [], "organizations_trusted_delegated_administrators": [], diff --git a/tests/config/fixtures/config.yaml b/tests/config/fixtures/config.yaml index 0996ac0d1b..00ebeb24d9 100644 --- a/tests/config/fixtures/config.yaml +++ b/tests/config/fixtures/config.yaml @@ -30,18 +30,27 @@ aws: # aws.awslambda_function_using_supported_runtimes obsolete_lambda_runtimes: [ + "java8", + "go1.x", + "provided", "python3.6", "python2.7", + "python3.7", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", "nodejs", "nodejs8.10", "nodejs10.x", + "nodejs12.x", + "nodejs14.x", + "dotnet5.0", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", + "dotnetcore3.1", "ruby2.5", + "ruby2.7", ] # AWS Organizations diff --git a/tests/config/fixtures/config_old.yaml b/tests/config/fixtures/config_old.yaml index 8b1fbac833..c43a488add 100644 --- a/tests/config/fixtures/config_old.yaml +++ b/tests/config/fixtures/config_old.yaml @@ -28,18 +28,27 @@ max_session_duration_seconds: 36000 # 10 Hours # aws.awslambda_function_using_supported_runtimes obsolete_lambda_runtimes: [ + "java8", + "go1.x", + "provided", "python3.6", "python2.7", + "python3.7", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", "nodejs", "nodejs8.10", "nodejs10.x", + "nodejs12.x", + "nodejs14.x", + "dotnet5.0", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", + "dotnetcore3.1", "ruby2.5", + "ruby2.7", ] # AWS Organizations diff --git a/tests/providers/aws/services/awslambda/awslambda_function_using_supported_runtimes/awslambda_function_using_supported_runtimes_test.py b/tests/providers/aws/services/awslambda/awslambda_function_using_supported_runtimes/awslambda_function_using_supported_runtimes_test.py index 773d02898a..3fc99ed5bb 100644 --- a/tests/providers/aws/services/awslambda/awslambda_function_using_supported_runtimes/awslambda_function_using_supported_runtimes_test.py +++ b/tests/providers/aws/services/awslambda/awslambda_function_using_supported_runtimes/awslambda_function_using_supported_runtimes_test.py @@ -48,18 +48,27 @@ class Test_awslambda_function_using_supported_runtimes: # Mock config lambda_client.audit_config = { "obsolete_lambda_runtimes": [ + "java8", + "go1.x", + "provided", "python3.6", "python2.7", + "python3.7", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", "nodejs", "nodejs8.10", "nodejs10.x", + "nodejs12.x", + "nodejs14.x", + "dotnet5.0", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", + "dotnetcore3.1", "ruby2.5", + "ruby2.7", ] } @@ -107,18 +116,27 @@ class Test_awslambda_function_using_supported_runtimes: # Mock config lambda_client.audit_config = { "obsolete_lambda_runtimes": [ + "java8", + "go1.x", + "provided", "python3.6", "python2.7", + "python3.7", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", "nodejs", "nodejs8.10", "nodejs10.x", + "nodejs12.x", + "nodejs14.x", + "dotnet5.0", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", + "dotnetcore3.1", "ruby2.5", + "ruby2.7", ] } @@ -164,18 +182,27 @@ class Test_awslambda_function_using_supported_runtimes: # Mock config lambda_client.audit_config = { "obsolete_lambda_runtimes": [ + "java8", + "go1.x", + "provided", "python3.6", "python2.7", + "python3.7", "nodejs4.3", "nodejs4.3-edge", "nodejs6.10", "nodejs", "nodejs8.10", "nodejs10.x", + "nodejs12.x", + "nodejs14.x", + "dotnet5.0", "dotnetcore1.0", "dotnetcore2.0", "dotnetcore2.1", + "dotnetcore3.1", "ruby2.5", + "ruby2.7", ] }