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(json-ocsf): Add new fields for py-ocsf 0.1.0 #3853

Merged
merged 5 commits into from
Apr 25, 2024
Merged

Conversation

pedrooot
Copy link
Member

@pedrooot pedrooot commented Apr 24, 2024

Description

New py-ocsf-models version is released and new fields must be added:

  • cloud.account.labels
  • risk_details

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 April 24, 2024 16:17
Copy link
Contributor

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

Copy link

codecov bot commented Apr 24, 2024

Codecov Report

Attention: Patch coverage is 70.00000% with 3 lines in your changes are missing coverage. Please review.

Project coverage is 85.55%. Comparing base (acac3fc) to head (4f7b372).
Report is 1 commits behind head on master.

Files Patch % Lines
prowler/providers/gcp/gcp_provider.py 0.00% 2 Missing ⚠️
prowler/lib/outputs/outputs.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3853      +/-   ##
==========================================
+ Coverage   85.52%   85.55%   +0.03%     
==========================================
  Files         741      741              
  Lines       22886    22886              
==========================================
+ Hits        19573    19580       +7     
+ Misses       3313     3306       -7     

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

@@ -40,7 +40,7 @@ class FindingOutput(BaseModel):
# Optional since depends on permissions
account_organization_name: Optional[str]
# Optional since depends on permissions
account_tags: Optional[str]
account_tags: Optional[list[str]]
Copy link
Member

Choose a reason for hiding this comment

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

I'm not sure about this change since in the CSV this is being shown as a comma separated string like "key1:value1,key2:value2". Could you please review that for the CSV? Also check the tests there.

Copy link
Member

Choose a reason for hiding this comment

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

To clarify, this change is fine but we need to verify that we are not breaking anything.

Copy link
Member Author

Choose a reason for hiding this comment

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

I totally agree with you, the best approach is to get a list of tags for json and tags separated by "," for csv outputs

Copy link
Contributor

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

@pedrooot pedrooot requested a review from jfagoagas April 25, 2024 07:18
@github-actions github-actions bot added the provider/aws Issues/PRs related with the AWS provider label Apr 25, 2024
Copy link
Contributor

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

@github-actions github-actions bot added the provider/gcp Issues/PRs related with the Google Cloud Platform provider label Apr 25, 2024
Copy link
Contributor

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

jfagoagas
jfagoagas previously approved these changes Apr 25, 2024
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.

Great improvement @pedrooot 👏 🚀

Copy link
Contributor

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

@jfagoagas jfagoagas self-requested a review April 25, 2024 10:41
@pedrooot pedrooot merged commit ee46bf3 into master Apr 25, 2024
11 of 12 checks passed
@pedrooot pedrooot deleted the update-ocsf branch April 25, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation provider/aws Issues/PRs related with the AWS provider provider/gcp Issues/PRs related with the Google Cloud Platform provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants