fix(compliance): resolve provider from scan in attributes endp (#11546)

This commit is contained in:
Pedro Martín
2026-06-11 18:00:36 +02:00
committed by GitHub
parent bba594a1db
commit 20eca78767
6 changed files with 258 additions and 3 deletions
+8
View File
@@ -2,6 +2,14 @@
All notable changes to the **Prowler UI** are documented in this file.
## [1.30.1] (Prowler UNRELEASED)
### 🐞 Fixed
- Compliance attributes requests now pass the selected scan, so multi-provider universal frameworks (e.g. CSA CCM) load the check IDs of the scan's provider and Azure/GCP requirement details show their findings instead of appearing empty [(#11546)](https://github.com/prowler-cloud/prowler/pull/11546)
---
## [1.30.0] (Prowler v5.30.0)
### 🚀 Added
+10 -1
View File
@@ -73,12 +73,21 @@ export const getComplianceOverviewMetadataInfo = async ({
}
};
export const getComplianceAttributes = async (complianceId: string) => {
export const getComplianceAttributes = async (
complianceId: string,
scanId?: string,
) => {
const headers = await getAuthHeaders({ contentType: false });
try {
const url = new URL(`${apiBaseUrl}/compliance-overviews/attributes`);
url.searchParams.append("filter[compliance_id]", complianceId);
// Pass the scan so multi-provider universal frameworks (e.g. CSA CCM)
// resolve the check IDs for the scan's provider instead of defaulting to
// the first provider that declares the framework.
if (scanId) {
url.searchParams.append("filter[scan_id]", scanId);
}
const response = await fetch(url.toString(), {
headers,
@@ -87,7 +87,7 @@ export default async function ComplianceDetail({
"filter[scan_id]": selectedScanId ?? undefined,
},
}),
getComplianceAttributes(complianceId),
getComplianceAttributes(complianceId, selectedScanId ?? undefined),
selectedScanId
? getScan(selectedScanId, { include: "provider" })
: Promise.resolve(null),