Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(gcp): add CIS checks #2544

Merged
merged 22 commits into from
Jul 6, 2023
Merged

feat(gcp): add CIS checks #2544

merged 22 commits into from
Jul 6, 2023

Conversation

sergargar
Copy link
Member

@sergargar sergargar commented Jul 3, 2023

Description

Add 14 GCP checks to complete CIS.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@sergargar sergargar force-pushed the PRWLR-2331-complete-gcp-cis branch from d3cccd5 to 2b2ef33 Compare July 4, 2023 13:23
@sergargar sergargar marked this pull request as ready for review July 5, 2023 13:06
@sergargar sergargar requested a review from a team July 5, 2023 13:06
# Get Log Sink Buckets
log_buckets = []
for sink in logging_client.sinks:
if "storage.googleapis.com" in sink.destination:

Check failure

Code scanning / CodeQL

Incomplete URL substring sanitization

The string [storage.googleapis.com](1) may be at an arbitrary position in the sanitized URL.
@sergargar sergargar force-pushed the PRWLR-2331-complete-gcp-cis branch from 50b7ca5 to 2a311a3 Compare July 6, 2023 10:58
Copy link
Member

@toniblyx toniblyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remember to update the Description table on README.md

@sergargar sergargar requested a review from toniblyx July 6, 2023 12:58
@n4ch04 n4ch04 requested review from jfagoagas and n4ch04 July 6, 2023 14:33
README.md Outdated
@@ -40,7 +40,7 @@ It contains hundreds of controls covering CIS, NIST 800, NIST CSF, CISA, RBI, Fe
| Provider | Checks | Services | [Compliance Frameworks](https://docs.prowler.cloud/en/latest/tutorials/compliance/) | [Categories](https://docs.prowler.cloud/en/latest/tutorials/misc/#categories) |
|---|---|---|---|---|
| AWS | 283 | 55 -> `prowler aws --list-services` | 21 -> `prowler aws --list-compliance` | 5 -> `prowler aws --list-categories` |
| GCP | 59 | 10 -> `prowler gcp --list-services` | CIS soon | 0 -> `prowler gcp --list-categories`|
| GCP | 73 | 11 -> `prowler gcp --list-services` | 1 -> `prowler aws --list-compliance` | 0 -> `prowler gcp --list-categories`|
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| GCP | 73 | 11 -> `prowler gcp --list-services` | 1 -> `prowler aws --list-compliance` | 0 -> `prowler gcp --list-categories`|
| GCP | 73 | 11 -> `prowler gcp --list-services` | 1 -> `prowler gcp --list-compliance` | 0 -> `prowler gcp --list-categories`|

Comment on lines 38 to 45
with os.scandir(compliance_gcp_dir) as files:
files = [
file.name
for file in files
if file.is_file()
and file.name.endswith(".json")
and available_compliance_frameworks.append(file.name.removesuffix(".json"))
]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please reutilise the above code to iterate through the compliance directories?

Copy link
Contributor

@n4ch04 n4ch04 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@sergargar sergargar merged commit 676e60a into master Jul 6, 2023
@sergargar sergargar deleted the PRWLR-2331-complete-gcp-cis branch July 6, 2023 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants