File tree Expand file tree Collapse file tree 8 files changed +7478
-0
lines changed
lib/outputs/compliance/csa Expand file tree Collapse file tree 8 files changed +7478
-0
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,7 @@ All notable changes to the **Prowler API** are documented in this file.
1717- Support CSA CCM 4.0 for the GCP provider [ (#10042 )] ( https://github.com/prowler-cloud/prowler/pull/10042 )
1818- Support CSA CCM 4.0 for the Azure provider [ (#10039 )] ( https://github.com/prowler-cloud/prowler/pull/10039 )
1919- Support CSA CCM 4.0 for the Oracle Cloud provider [ (#10057 )] ( https://github.com/prowler-cloud/prowler/pull/10057 )
20+ - Support CSA CCM 4.0 for the Alibaba Cloud provider [ (#10061 )] ( https://github.com/prowler-cloud/prowler/pull/10061 )
2021
2122### 🔐 Security
2223
Original file line number Diff line number Diff line change 3535from prowler .lib .outputs .compliance .cis .cis_kubernetes import KubernetesCIS
3636from prowler .lib .outputs .compliance .cis .cis_m365 import M365CIS
3737from prowler .lib .outputs .compliance .cis .cis_oraclecloud import OracleCloudCIS
38+ from prowler .lib .outputs .compliance .csa .csa_alibabacloud import AlibabaCloudCSA
3839from prowler .lib .outputs .compliance .csa .csa_aws import AWSCSA
3940from prowler .lib .outputs .compliance .csa .csa_azure import AzureCSA
4041from prowler .lib .outputs .compliance .csa .csa_gcp import GCPCSA
142143 ],
143144 "alibabacloud" : [
144145 (lambda name : name .startswith ("cis_" ), AlibabaCloudCIS ),
146+ (lambda name : name .startswith ("csa_" ), AlibabaCloudCSA ),
145147 (
146148 lambda name : name == "prowler_threatscore_alibabacloud" ,
147149 ProwlerThreatScoreAlibaba ,
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 @@ -16,6 +16,7 @@ All notable changes to the **Prowler SDK** are documented in this file.
1616- CSA CCM 4.0 for the Oracle Cloud provider [ (#10057 )] ( https://github.com/prowler-cloud/prowler/pull/10057 )
1717- OCI regions updater script and CI workflow [ (#10020 )] ( https://github.com/prowler-cloud/prowler/pull/10020 )
1818- ` image ` provider for container image scanning with Trivy integration [ (#9984 )] ( https://github.com/prowler-cloud/prowler/pull/9984 )
19+ - CSA CCM 4.0 for the Alibaba Cloud provider [ (#10061 )] ( https://github.com/prowler-cloud/prowler/pull/10061 )
1920
2021### 🔄 Changed
2122
Original file line number Diff line number Diff line change 6666from prowler .lib .outputs .compliance .cis .cis_m365 import M365CIS
6767from prowler .lib .outputs .compliance .cis .cis_oraclecloud import OracleCloudCIS
6868from prowler .lib .outputs .compliance .compliance import display_compliance_table
69+ from prowler .lib .outputs .compliance .csa .csa_alibabacloud import AlibabaCloudCSA
6970from prowler .lib .outputs .compliance .csa .csa_aws import AWSCSA
7071from prowler .lib .outputs .compliance .csa .csa_azure import AzureCSA
7172from prowler .lib .outputs .compliance .csa .csa_gcp import GCPCSA
@@ -1113,6 +1114,18 @@ def streaming_callback(findings_batch):
11131114 )
11141115 generated_outputs ["compliance" ].append (cis )
11151116 cis .batch_write_data_to_file ()
1117+ elif compliance_name == "csa_ccm_4.0_alibabacloud" :
1118+ filename = (
1119+ f"{ output_options .output_directory } /compliance/"
1120+ f"{ output_options .output_filename } _{ compliance_name } .csv"
1121+ )
1122+ csa_ccm_4_0_alibabacloud = AlibabaCloudCSA (
1123+ findings = finding_outputs ,
1124+ compliance = bulk_compliance_frameworks [compliance_name ],
1125+ file_path = filename ,
1126+ )
1127+ generated_outputs ["compliance" ].append (csa_ccm_4_0_alibabacloud )
1128+ csa_ccm_4_0_alibabacloud .batch_write_data_to_file ()
11161129 elif compliance_name == "prowler_threatscore_alibabacloud" :
11171130 filename = (
11181131 f"{ output_options .output_directory } /compliance/"
You can’t perform that action at this time.
0 commit comments