fix(dashboard): security posture showing incomplete data (#8270)

This commit is contained in:
Daniel Barranquero
2025-07-15 13:19:55 +02:00
committed by GitHub
parent 7da6d7b5dd
commit a012397e55
2 changed files with 8 additions and 1 deletions

View File

@@ -191,7 +191,13 @@ else:
data.rename(columns={"RESOURCE_ID": "RESOURCE_UID"}, inplace=True) data.rename(columns={"RESOURCE_ID": "RESOURCE_UID"}, inplace=True)
# Remove dupplicates on the finding_uid colummn but keep the last one taking into account the timestamp # Remove dupplicates on the finding_uid colummn but keep the last one taking into account the timestamp
data = data.sort_values("TIMESTAMP").drop_duplicates("FINDING_UID", keep="last") data["DATE"] = data["TIMESTAMP"].dt.date
data = (
data.sort_values("TIMESTAMP")
.groupby(["DATE", "FINDING_UID"], as_index=False)
.last()
)
data["TIMESTAMP"] = pd.to_datetime(data["TIMESTAMP"])
data["ASSESSMENT_TIME"] = data["TIMESTAMP"].dt.strftime("%Y-%m-%d") data["ASSESSMENT_TIME"] = data["TIMESTAMP"].dt.strftime("%Y-%m-%d")
data_valid = pd.DataFrame() data_valid = pd.DataFrame()

View File

@@ -17,6 +17,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
### Fixed ### Fixed
- Add GitHub provider to lateral panel in documentation and change -h environment variable output [(#8246)](https://github.com/prowler-cloud/prowler/pull/8246) - Add GitHub provider to lateral panel in documentation and change -h environment variable output [(#8246)](https://github.com/prowler-cloud/prowler/pull/8246)
- Show correct count of findings in Dashboard Security Posture page [(#8270)](https://github.com/prowler-cloud/prowler/pull/8270)
--- ---