-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(compliance): execute all compliance by default #3003
Conversation
b7fd698
to
cdf98ee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's great !! Please check the comments, thanks!
prowler/lib/outputs/compliance.py
Outdated
compliance_name = "" | ||
if compliance.Version: | ||
compliance_name = ( | ||
compliance.Framework.lower() | ||
+ "_" | ||
+ compliance.Version.lower() | ||
+ "_" | ||
+ compliance.Provider.lower() | ||
) | ||
else: | ||
compliance_name = ( | ||
compliance.Framework.lower() + "_" + compliance.Provider.lower() | ||
) | ||
if compliance_name.replace("-", "_") in input_compliance_frameworks: | ||
check_compliances.append(compliance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this to a separate function to handle compliance framework names?
prowler/lib/outputs/compliance.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move each compliance output generator to a separate function? It'll help us to split code, do better tests and improve readability. Thanks!
For the following functions:
fill_compliance
display_compliance_table
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same here, create a function to generate the file descriptor for each compliance mode not to have the same over and over.
…r-cloud/prowler into execute-all-compliance-by-default
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Co-authored-by: Pepe Fagoaga <[email protected]>
Description
Without

--compliance
, prowler will execute all compliance frameworks by default.All compliance reports will be in output/compliance directory.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.