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(compliance): execute all compliance by default #3003

Merged
merged 9 commits into from Dec 13, 2023

Conversation

sergargar
Copy link
Member

Description

Without --compliance, prowler will execute all compliance frameworks by default.
All compliance reports will be in output/compliance directory.
image

License

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

@sergargar sergargar requested a review from a team as a code owner November 6, 2023 15:24
@sergargar sergargar force-pushed the execute-all-compliance-by-default branch from b7fd698 to cdf98ee Compare November 6, 2023 16:48
Copy link
Member

@jfagoagas jfagoagas left a 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!

Comment on lines 63 to 77
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)
Copy link
Member

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?

Copy link
Member

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

Copy link
Member

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.

Copy link
Member

@jfagoagas jfagoagas left a comment

Choose a reason for hiding this comment

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

👍

@jfagoagas jfagoagas merged commit 93a2431 into prowler-4.0-dev Dec 13, 2023
3 of 6 checks passed
@jfagoagas jfagoagas deleted the execute-all-compliance-by-default branch December 13, 2023 16:31
sergargar added a commit that referenced this pull request Jan 16, 2024
Co-authored-by: Pepe Fagoaga <pepe@verica.io>
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.

None yet

2 participants