-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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(json-ocsf): add check_id field in json-ocsf output #3740
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3740 +/- ##
=======================================
Coverage 85.77% 85.78%
=======================================
Files 722 722
Lines 22434 22433 -1
=======================================
+ Hits 19243 19244 +1
+ Misses 3191 3189 -2 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the tests for the fill_json_ocsf
to reflect the change.
@@ -107,6 +107,7 @@ def fill_json_ocsf(finding_output: FindingOutput) -> DetectionFinding: | |||
), | |||
type_uid=DetectionFindingTypeID.Create, | |||
type_name=DetectionFindingTypeID.Create.name, | |||
unmapped_data={"check_id": finding_output.check_id}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unmapped_data={"check_id": finding_output.check_id}, | |
unmapped={"check_id": finding_output.check_id}, |
Review the format here https://schema.ocsf.io/1.1.0/classes/detection_finding?extensions=
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey! @jfagoagas just fixed py-ocsf-models in this pr: prowler-cloud/py-ocsf-models#32 once it is updated I will apply the change.
Thanks for the catch!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
Context
This pr adds new field check_id inside unmapped_data for json-ocsf output.
Description
Please include a summary of the change and which issue is fixed. List any dependencies that are required for this change.
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.