fix: split file_name not working on Windows (#9268)

This commit is contained in:
Daniel Barranquero
2025-11-18 14:45:31 +01:00
committed by GitHub
parent 45792686aa
commit b5df26452a
2 changed files with 3 additions and 1 deletions
+1
View File
@@ -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)
---
+2 -1
View File
@@ -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: