diff --git a/prowler/CHANGELOG.md b/prowler/CHANGELOG.md index 2e148442fd..51c47e3dd5 100644 --- a/prowler/CHANGELOG.md +++ b/prowler/CHANGELOG.md @@ -70,6 +70,7 @@ All notable changes to the **Prowler SDK** are documented in this file. - Rename `get_oci_assessment_summary` to `get_oraclecloud_assessment_summary` in HTML output [(#9200)](https://github.com/prowler-cloud/prowler/pull/9200) - Fix Validation and other errors in Azure provider [(#8915)](https://github.com/prowler-cloud/prowler/pull/8915) - Update documentation URLs from docs.prowler.cloud to docs.prowler.com [(#9240)](https://github.com/prowler-cloud/prowler/pull/9240) +- Fix file name parsing for checks on Windows [(#9268)](https://github.com/prowler-cloud/prowler/pull/9268) --- diff --git a/prowler/lib/check/models.py b/prowler/lib/check/models.py index 37150f38db..a50cfb244b 100644 --- a/prowler/lib/check/models.py +++ b/prowler/lib/check/models.py @@ -457,7 +457,8 @@ class Check(ABC, CheckMetadata): # Verify names consistency check_id = self.CheckID class_name = self.__class__.__name__ - file_name = file_path.split(sep="/")[-1] + # os.path.basename handles Windows and POSIX paths reliably + file_name = os.path.basename(file_path) errors = [] if check_id != class_name: