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

fix(scan): add compliance info inside finding #5649

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

pedrooot
Copy link
Member

@pedrooot pedrooot commented Nov 6, 2024

Description

This pull request includes several changes to improve the provider model names, update the scan method, and enhance the handling of compliance frameworks and checks metadata. The most important changes include fixing typos in model names, updating the scan method to use None as the default value for custom_checks_metadata, and incorporating bulk compliance frameworks and checks metadata.

Provider Model Names Fixes:

  • docs/developer-guide/provider.md: Corrected typos in provider model names from ProvierSessionModel, ProvierIdentityModel, and ProvierOutputOptionsModel to ProviderSessionModel, ProviderIdentityModel, and ProviderOutputOptionsModel respectively. [1] [2]

Scan Method Updates:

  • prowler/lib/scan/scan.py: Changed the default value of custom_checks_metadata from an empty dictionary to None in the scan method.

Compliance Frameworks and Checks Metadata:

  • prowler/lib/scan/scan.py: Added logic to load bulk compliance frameworks and get bulk checks metadata for the provider, then update the checks metadata with the compliance framework specification.
  • prowler/lib/scan/scan.py: Updated the scan method to use the ProviderOutputOptions instance for generating findings output.

Checklist

License

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

@pedrooot pedrooot requested review from a team as code owners November 6, 2024 15:47
Copy link
Contributor

github-actions bot commented Nov 6, 2024

You can check the documentation for this PR here -> Prowler Documentation

@@ -239,6 +239,20 @@ def scan(
Exception: If any other error occurs during the execution of a check.
"""
try:
# Load bulk compliance frameworks
Copy link
Member

Choose a reason for hiding this comment

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

Instead of doing this two times: one here and another one during the __init__ maybe you can store it in the class. What do you think?

@jfagoagas jfagoagas marked this pull request as draft November 19, 2024 09:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants