From 0aa7b84be309926e843e9003ec5abff76ed508a6 Mon Sep 17 00:00:00 2001 From: Prowler Bot Date: Tue, 28 Apr 2026 17:26:34 +0200 Subject: [PATCH] fix(cli): generate compliance after scan (#10922) Co-authored-by: Pepe Fagoaga --- prowler/CHANGELOG.md | 8 ++++++++ prowler/__main__.py | 8 +++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/prowler/CHANGELOG.md b/prowler/CHANGELOG.md index d5dbeeaba3..ce5a0f0930 100644 --- a/prowler/CHANGELOG.md +++ b/prowler/CHANGELOG.md @@ -2,6 +2,14 @@ All notable changes to the **Prowler SDK** are documented in this file. +## [5.25.1] (Prowler v5.25.1) + +### 🐞 Fixed + +- `KeyError` when generating compliance outputs after the CLI scan [#10919](https://github.com/prowler-cloud/prowler/pull/10919) + +--- + ## [5.25.0] (Prowler v5.25.0) ### 🚀 Added diff --git a/prowler/__main__.py b/prowler/__main__.py index 925fa1008b..119c10dd0e 100644 --- a/prowler/__main__.py +++ b/prowler/__main__.py @@ -624,8 +624,14 @@ def prowler(): ) # Compliance Frameworks + # Source the framework listing from `bulk_compliance_frameworks.keys()` + # so it is by construction a subset of what the bulk loader can resolve. + # `get_available_compliance_frameworks(provider)` also discovers top-level + # multi-provider universal JSONs (e.g. `prowler/compliance/csa_ccm_4.0.json`) + # which `Compliance.get_bulk(provider)` does not load, and which the legacy + # output handlers below cannot consume — using it as the source produced input_compliance_frameworks = set(output_options.output_modes).intersection( - get_available_compliance_frameworks(provider) + bulk_compliance_frameworks.keys() ) if provider == "aws": for compliance_name in input_compliance_frameworks: