mirror of
https://github.com/prowler-cloud/prowler.git
synced 2026-07-04 19:21:51 +00:00
fix(compliance): resolve provider from scan in attributes endp (#11546)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user