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

chore(s3): create class and refactor #4457

Merged
merged 10 commits into from
Jul 23, 2024
Merged

Conversation

jfagoagas
Copy link
Member

Context

We are working to decouple all outputs and integrations and now is the turn for the S3 integration to send Prowler's output to a bucket.

Description

  • Create a new S3 class
  • Send all the generated outputs to S3

License

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

@jfagoagas jfagoagas self-assigned this Jul 16, 2024
@jfagoagas jfagoagas requested review from a team July 16, 2024 11:59
@github-actions github-actions bot added provider/aws Issues/PRs related with the AWS provider integration/s3 Issues/PRs related with the AWS S3 integration labels Jul 16, 2024
@jfagoagas jfagoagas added the no-merge Please, DO NOT MERGE this PR. label Jul 16, 2024
@jfagoagas jfagoagas requested review from a team as code owners July 22, 2024 11:12
@jfagoagas jfagoagas removed no-merge Please, DO NOT MERGE this PR. testing-pending labels Jul 22, 2024
Comment on lines 300 to 312
# TODO: fix the above
# CSV
# s3_client.upload_file(
# {args.output_directory} / {output_file + csv_file_suffix},
# output_bucket,
# object_name,
# )
# JSON
# s3_client.upload_file(
# {args.output_directory} / {output_file + csv_file_suffix},
# output_bucket,
# object_name,
# )
Copy link
Member Author

Choose a reason for hiding this comment

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

@sergargar could you please fix this. We should not use the S3 class anymore here since the QuickInventory has not an output created yet.

Copy link
Member

Choose a reason for hiding this comment

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

Done!

Copy link

codecov bot commented Jul 23, 2024

Codecov Report

Attention: Patch coverage is 47.50000% with 63 lines in your changes missing coverage. Please review.

Project coverage is 88.58%. Comparing base (aa44bde) to head (2b9051d).
Report is 11 commits behind head on master.

Files Patch % Lines
prowler/__main__.py 0.00% 58 Missing ⚠️
prowler/providers/aws/lib/s3/s3.py 92.45% 4 Missing ⚠️
...rowler/lib/outputs/compliance/compliance_output.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4457      +/-   ##
==========================================
- Coverage   88.69%   88.58%   -0.12%     
==========================================
  Files         893      893              
  Lines       27205    27231      +26     
==========================================
- Hits        24130    24123       -7     
- Misses       3075     3108      +33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sergargar sergargar self-requested a review July 23, 2024 13:12
Copy link
Member

@sergargar sergargar 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 fc449bf into master Jul 23, 2024
9 of 11 checks passed
@sergargar sergargar deleted the PRWLR-3947-s3-integration branch July 23, 2024 14:03
kagahd pushed a commit to kagahd/prowler that referenced this pull request Jul 25, 2024
Co-authored-by: pedrooot <pedromarting3@gmail.com>
Co-authored-by: Sergio <sergio@prowler.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration/s3 Issues/PRs related with the AWS S3 integration provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants