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(export): add API export system #6878

Merged
merged 42 commits into from
Feb 26, 2025

Conversation

AdriiiPRodri
Copy link
Contributor

@AdriiiPRodri AdriiiPRodri commented Feb 10, 2025

Description

In this PR we have refactored the code in charge of performing the scans from the API side, now all the report files will always be generated, they will be compressed and can be uploaded to S3 or just keep them locally. This happens in a separate task.

We have added an endpoint to get the files from local and from the S3 bucket.

Checklist

API

  • Verify if API specs need to be regenerated.
  • Check if version updates are required (e.g., specs, Poetry, etc.).
  • Ensure new entries are added to CHANGELOG.md, if applicable.

License

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

@github-actions github-actions bot added output/csv Issues/PRs related with the CSV output format output/ocsf Issues/PRs related with the OCSF output format component/api labels Feb 10, 2025
@AdriiiPRodri AdriiiPRodri force-pushed the PRWLR-5956-Export-Artifacts-only branch from 3ba6457 to e8476ef Compare February 10, 2025 16:08
@AdriiiPRodri AdriiiPRodri force-pushed the PRWLR-5956-Export-Artifacts-only branch from e8476ef to d5e2d75 Compare February 10, 2025 16:26
Copy link

codecov bot commented Feb 10, 2025

Codecov Report

Attention: Patch coverage is 81.72589% with 72 lines in your changes missing coverage. Please review.

Project coverage is 89.30%. Comparing base (dbffed8) to head (b803f4e).
Report is 10 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #6878      +/-   ##
==========================================
- Coverage   92.68%   89.30%   -3.39%     
==========================================
  Files          76     1278    +1202     
  Lines        6698    41887   +35189     
==========================================
+ Hits         6208    37406   +31198     
- Misses        490     4481    +3991     
Flag Coverage Δ
api 92.00% <76.87%> (-0.68%) ⬇️
prowler 88.76% <98.85%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Components Coverage Δ
prowler 88.76% <98.85%> (∅)
api 92.00% <76.87%> (-0.68%) ⬇️

@AdriiiPRodri AdriiiPRodri force-pushed the PRWLR-5956-Export-Artifacts-only branch from 60a1767 to 747b97f Compare February 12, 2025 09:47
@github-actions github-actions bot added the output/html Issues/PRs related with the HTML output format label Feb 12, 2025
@AdriiiPRodri AdriiiPRodri force-pushed the PRWLR-5956-Export-Artifacts-only branch from 5743b35 to cbf8cf7 Compare February 12, 2025 16:53
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Feb 13, 2025
@AdriiiPRodri AdriiiPRodri force-pushed the PRWLR-5956-Export-Artifacts-only branch 4 times, most recently from cdb9d8b to 84e66ce Compare February 25, 2025 18:10
@AdriiiPRodri AdriiiPRodri force-pushed the PRWLR-5956-Export-Artifacts-only branch from 84e66ce to cf761ab Compare February 25, 2025 18:31
@AdriiiPRodri AdriiiPRodri force-pushed the PRWLR-5956-Export-Artifacts-only branch from b6f124a to f5f62f8 Compare February 26, 2025 08:12
@github-actions github-actions bot added the provider/azure Issues/PRs related with the Azure provider label Feb 26, 2025
jfagoagas
jfagoagas previously approved these changes Feb 26, 2025
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.

Finally this get to an end, super happy about this new functionality, it required a great effort but it is done 👏 awesome work 🚀

vicferpoy
vicferpoy previously approved these changes Feb 26, 2025
@AdriiiPRodri AdriiiPRodri dismissed stale reviews from vicferpoy and jfagoagas via b803f4e February 26, 2025 11:39
@jfagoagas jfagoagas self-requested a review February 26, 2025 14:48
@AdriiiPRodri AdriiiPRodri merged commit 669ec74 into master Feb 26, 2025
13 of 15 checks passed
@AdriiiPRodri AdriiiPRodri deleted the PRWLR-5956-Export-Artifacts-only branch February 26, 2025 14:49
cesararroba pushed a commit that referenced this pull request Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compliance Issues/PRs related with the Compliance Frameworks component/api integration/s3 Issues/PRs related with the AWS S3 integration integration/security-hub Issues/PRs related with the AWS Security Hub integration output/asff Issues/PRs related with the ASFF output format output/csv Issues/PRs related with the CSV output format output/html Issues/PRs related with the HTML output format output/ocsf Issues/PRs related with the OCSF output format provider/aws Issues/PRs related with the AWS provider provider/azure Issues/PRs related with the Azure provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants