File tree Expand file tree Collapse file tree 8 files changed +7721
-0
lines changed
lib/outputs/compliance/csa Expand file tree Collapse file tree 8 files changed +7721
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ All notable changes to the **Prowler API** are documented in this file.
99- Attack Paths: Queries definition now has short description and attribution [ (#9983 )] ( https://github.com/prowler-cloud/prowler/pull/9983 )
1010- Attack Paths: Internet node is created while scan [ (#9992 )] ( https://github.com/prowler-cloud/prowler/pull/9992 )
1111- Support CSA CCM for the AWS provider [ (#10018 )] ( https://github.com/prowler-cloud/prowler/pull/10018 )
12+ - Support CSA CCM for the Azure provider [ (#10039 )] ( https://github.com/prowler-cloud/prowler/pull/10039 )
1213
1314---
1415
Original file line number Diff line number Diff line change 3636from prowler .lib .outputs .compliance .cis .cis_m365 import M365CIS
3737from prowler .lib .outputs .compliance .cis .cis_oraclecloud import OracleCloudCIS
3838from prowler .lib .outputs .compliance .csa .csa_aws import AWSCSA
39+ from prowler .lib .outputs .compliance .csa .csa_azure import AzureCSA
3940from prowler .lib .outputs .compliance .ens .ens_aws import AWSENS
4041from prowler .lib .outputs .compliance .ens .ens_azure import AzureENS
4142from prowler .lib .outputs .compliance .ens .ens_gcp import GCPENS
101102 (lambda name : name == "ccc_azure" , CCC_Azure ),
102103 (lambda name : name == "prowler_threatscore_azure" , ProwlerThreatScoreAzure ),
103104 (lambda name : name == "c5_azure" , AzureC5 ),
105+ (lambda name : name .startswith ("csa_" ), AzureCSA ),
104106 ],
105107 "gcp" : [
106108 (lambda name : name .startswith ("cis_" ), GCPCIS ),
Original file line number Diff line number Diff line change 1+ import warnings
2+
3+ from dashboard .common_methods import get_section_containers_kisa_ismsp
4+
5+ warnings .filterwarnings ("ignore" )
6+
7+
8+ def get_table (data ):
9+ data ["REQUIREMENTS_ID" ] = (
10+ data ["REQUIREMENTS_ID" ] + " - " + data ["REQUIREMENTS_DESCRIPTION" ]
11+ )
12+
13+ data ["REQUIREMENTS_ID" ] = data ["REQUIREMENTS_ID" ].apply (
14+ lambda x : x [:150 ] + "..." if len (str (x )) > 150 else x
15+ )
16+
17+ aux = data [
18+ [
19+ "REQUIREMENTS_ID" ,
20+ "REQUIREMENTS_ATTRIBUTES_SECTION" ,
21+ "CHECKID" ,
22+ "STATUS" ,
23+ "REGION" ,
24+ "ACCOUNTID" ,
25+ "RESOURCEID" ,
26+ ]
27+ ].copy ()
28+
29+ return get_section_containers_kisa_ismsp (
30+ aux , "REQUIREMENTS_ATTRIBUTES_SECTION" , "REQUIREMENTS_ID"
31+ )
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
1010- ` defender_safelinks_policy_enabled ` check for M365 provider [ (#9832 )] ( https://github.com/prowler-cloud/prowler/pull/9832 )
1111- AI Skills: Added a skill for creating new Attack Paths queries in openCypher, compatible with Neo4j and Neptune [ (#9975 )] ( https://github.com/prowler-cloud/prowler/pull/9975 )
1212- CSA CCM 4.0 for the AWS provider [ (#10018 )] ( https://github.com/prowler-cloud/prowler/pull/10018 )
13+ - CSA CCM for the Azure provider [ (#10039 )] ( https://github.com/prowler-cloud/prowler/pull/10039 )
1314
1415### 🔄 Changed
1516
Original file line number Diff line number Diff line change 6666from prowler .lib .outputs .compliance .cis .cis_oraclecloud import OracleCloudCIS
6767from prowler .lib .outputs .compliance .compliance import display_compliance_table
6868from prowler .lib .outputs .compliance .csa .csa_aws import AWSCSA
69+ from prowler .lib .outputs .compliance .csa .csa_azure import AzureCSA
6970from prowler .lib .outputs .compliance .ens .ens_aws import AWSENS
7071from prowler .lib .outputs .compliance .ens .ens_azure import AzureENS
7172from prowler .lib .outputs .compliance .ens .ens_gcp import GCPENS
@@ -742,6 +743,18 @@ def streaming_callback(findings_batch):
742743 )
743744 generated_outputs ["compliance" ].append (c5_azure )
744745 c5_azure .batch_write_data_to_file ()
746+ elif compliance_name == "csa_ccm_4.0_azure" :
747+ filename = (
748+ f"{ output_options .output_directory } /compliance/"
749+ f"{ output_options .output_filename } _{ compliance_name } .csv"
750+ )
751+ csa_ccm_4_0_azure = AzureCSA (
752+ findings = finding_outputs ,
753+ compliance = bulk_compliance_frameworks [compliance_name ],
754+ file_path = filename ,
755+ )
756+ generated_outputs ["compliance" ].append (csa_ccm_4_0_azure )
757+ csa_ccm_4_0_azure .batch_write_data_to_file ()
745758 else :
746759 filename = (
747760 f"{ output_options .output_directory } /compliance/"
You can’t perform that action at this time.
0 commit comments