Skip to content

Commit f831171

Browse files
authored
feat(compliance): add C5 for GCP provider (#9097)
1 parent 2740d73 commit f831171

File tree

7 files changed

+9538
-2
lines changed

7 files changed

+9538
-2
lines changed

api/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ All notable changes to the **Prowler API** are documented in this file.
1010
- Support for configuring multiple LLM providers [(#8772)](https://github.com/prowler-cloud/prowler/pull/8772)
1111
- Support C5 compliance framework for Azure provider [(#9081)](https://github.com/prowler-cloud/prowler/pull/9081)
1212
- Support for Oracle Cloud Infrastructure (OCI) provider [(#8927)](https://github.com/prowler-cloud/prowler/pull/8927)
13+
- Support C5 compliance framework for the GCP provider [(#9097)](https://github.com/prowler-cloud/prowler/pull/9097)
1314

1415
## [1.14.1] (Prowler 5.13.1)
1516

api/src/backend/tasks/jobs/export.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
)
2323
from prowler.lib.outputs.compliance.c5.c5_aws import AWSC5
2424
from prowler.lib.outputs.compliance.c5.c5_azure import AzureC5
25+
from prowler.lib.outputs.compliance.c5.c5_gcp import GCPC5
2526
from prowler.lib.outputs.compliance.ccc.ccc_aws import CCC_AWS
2627
from prowler.lib.outputs.compliance.ccc.ccc_azure import CCC_Azure
2728
from prowler.lib.outputs.compliance.ccc.ccc_gcp import CCC_GCP
@@ -98,6 +99,7 @@
9899
(lambda name: name.startswith("iso27001_"), GCPISO27001),
99100
(lambda name: name == "prowler_threatscore_gcp", ProwlerThreatScoreGCP),
100101
(lambda name: name == "ccc_gcp", CCC_GCP),
102+
(lambda name: name == "c5_gcp", GCPC5),
101103
],
102104
"kubernetes": [
103105
(lambda name: name.startswith("cis_"), KubernetesCIS),

prowler/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ All notable changes to the **Prowler SDK** are documented in this file.
99
- Add OCI mapping to scan and check classes [(#8927)](https://github.com/prowler-cloud/prowler/pull/8927)
1010
- `codepipeline_project_repo_private` check for AWS provider [(#5915)](https://github.com/prowler-cloud/prowler/pull/5915)
1111
- `cloudstorage_bucket_versioning_enabled` check for GCP provider [(#9014)](https://github.com/prowler-cloud/prowler/pull/9014)
12-
- `cloudstorage_bucket_soft_delete_enabled` check for GCP provider [(#9028)](https://github.com/prowler-cloud/prowler/pull/9028)
12+
- C5 compliance framework for Azure provider [(#9081)](https://github.com/prowler-cloud/prowler/pull/9081)
13+
- C5 compliance framework for the GCP provider [(#9097)](https://github.com/prowler-cloud/prowler/pull/9097)
1314

1415
### Changed
1516
- Update AWS Direct Connect service metadata to new format [(#8855)](https://github.com/prowler-cloud/prowler/pull/8855)
1617
- Update AWS DRS service metadata to new format [(#8870)](https://github.com/prowler-cloud/prowler/pull/8870)
17-
- C5 compliance framework for Azure provider [(#9081)](https://github.com/prowler-cloud/prowler/pull/9081)
1818
- Update AWS DynamoDB service metadata to new format [(#8871)](https://github.com/prowler-cloud/prowler/pull/8871)
1919
- Update AWS CloudWatch service metadata to new format [(#8848)](https://github.com/prowler-cloud/prowler/pull/8848)
2020
- Update AWS EMR service metadata to new format [(#9002)](https://github.com/prowler-cloud/prowler/pull/9002)

prowler/__main__.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
)
5252
from prowler.lib.outputs.compliance.c5.c5_aws import AWSC5
5353
from prowler.lib.outputs.compliance.c5.c5_azure import AzureC5
54+
from prowler.lib.outputs.compliance.c5.c5_gcp import GCPC5
5455
from prowler.lib.outputs.compliance.ccc.ccc_aws import CCC_AWS
5556
from prowler.lib.outputs.compliance.ccc.ccc_azure import CCC_Azure
5657
from prowler.lib.outputs.compliance.ccc.ccc_gcp import CCC_GCP
@@ -786,6 +787,18 @@ def streaming_callback(findings_batch):
786787
)
787788
generated_outputs["compliance"].append(ccc_gcp)
788789
ccc_gcp.batch_write_data_to_file()
790+
elif compliance_name == "c5_gcp":
791+
filename = (
792+
f"{output_options.output_directory}/compliance/"
793+
f"{output_options.output_filename}_{compliance_name}.csv"
794+
)
795+
c5_gcp = GCPC5(
796+
findings=finding_outputs,
797+
compliance=bulk_compliance_frameworks[compliance_name],
798+
file_path=filename,
799+
)
800+
generated_outputs["compliance"].append(c5_gcp)
801+
c5_gcp.batch_write_data_to_file()
789802
else:
790803
filename = (
791804
f"{output_options.output_directory}/compliance/"

0 commit comments

Comments
 (0)