fix(apigateway): retrieve correct logingLevel status (#9304)

Co-authored-by: HugoPBrito <hugopbrit@gmail.com>
This commit is contained in:
bota4go
2025-12-12 23:44:37 +11:00
committed by GitHub
parent b5151a8ee5
commit 3b56166c34
2 changed files with 10 additions and 1 deletions

View File

@@ -2,6 +2,12 @@
All notable changes to the **Prowler SDK** are documented in this file.
## [5.15.1] (Prowler UNRELEASED)
### Fixed
- Fix false negative in AWS `apigateway_restapi_logging_enabled` check by refining stage logging evaluation to ensure logging level is not set to "OFF" [(#9304)](https://github.com/prowler-cloud/prowler/pull/9304)
---
## [5.15.0] (Prowler v5.15.0)
### Added

View File

@@ -123,7 +123,10 @@ class APIGateway(AWSService):
waf = stage["webAclArn"]
if "methodSettings" in stage:
for settings in stage["methodSettings"].values():
if settings.get("loggingLevel"):
if (
settings.get("loggingLevel")
and settings.get("loggingLevel", "") != "OFF"
):
logging = True
if settings.get("cachingEnabled"):
cache_enabled = True