-
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
feat(ec2): include resource metadata in Check_Report #6440
feat(ec2): include resource metadata in Check_Report #6440
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #6440 +/- ##
==========================================
- Coverage 93.78% 90.06% -3.73%
==========================================
Files 65 1182 +1117
Lines 6211 36081 +29870
==========================================
+ Hits 5825 32495 +26670
- Misses 386 3586 +3200
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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.
That's great @MrCloudSec 👏
Please review my comments when you get a chance and leave all the outputs commented until we have all checks changed. Thanks!
Context
This PR refactors the
Check_Report
andCheck_Report_AWS
classes to dynamically handleresource_metadata
. For now, the changes are applied only to the EC2 service, allowing EC2-specific details to be included in thedata
field of the OCSF output. This improves the context of findings for EC2 resources while maintaining flexibility for future expansion to other services.Description
resource_metadata
toCheck_Report
: Dynamically extracts attributes from the EC2 metadata object and serializes them into a dictionary.Check_Report_AWS
: Automatically populatesresource_id
,resource_arn
, and region for EC2 findings usingresource_metadata
.resource_metadata
in thedata
field undermetadata
, providing enriched context for EC2 findings.Check_Report_AWS
instances now requireresource_metadata
as part of their initialization to ensure consistent data handling.Checklist
License
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.