-
Notifications
You must be signed in to change notification settings - Fork 523
[m365_defender] Enhance ECS Mappings and Refactor the Dashboards #16676
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
base: main
Are you sure you want to change the base?
[m365_defender] Enhance ECS Mappings and Refactor the Dashboards #16676
Conversation
🚀 Benchmarks reportTo see the full report comment with |
💚 Build Succeeded
History
|
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
| append: | ||
| field: host.ip | ||
| tag: append_ip_interfaces_to_host_ip | ||
| value: '{{{_ingest._value}}}' | ||
| allow_duplicates: false |
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.
Can we use convert processor with on_failure instead of an append?
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.
The field used to populate host.ip has already been converted to the IP type earlier; therefore, the append processor is used here.
| source: | | ||
| def processExecutable = new HashSet(); | ||
| for (evidence in ctx.json.evidence) { | ||
| if (evidence?.image_file?.path != null && evidence?.image_file?.name != null) { |
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.
| if (evidence?.image_file?.path != null && evidence?.image_file?.name != null) { | |
| if (evidence?.image_file?.path != null && evidence.image_file.name != null) { |
| if (!(ctx.process instanceof HashMap)) { | ||
| ctx.process = new HashMap(); | ||
| } |
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.
| if (!(ctx.process instanceof HashMap)) { | |
| ctx.process = new HashMap(); | |
| } | |
| ctx.process = ctx.process ?: [:]; |
| ctx.process = new HashMap(); | ||
| } | ||
| def execList = new ArrayList(processExecutable); | ||
| Collections.sort(execList); |
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.
If this sorting was done, the it could remove the relationship with custom array fields, making it difficult to analyse. Is it required?
| ignore_missing: true | ||
| - script: | ||
| description: Set process.executable from evidence image_file path and name. | ||
| tag: script_set_process_executable_from_image_file |
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.
There's existing script processors for process and parent process: https://github.com/elastic/integrations/blob/main/packages/m365_defender/data_stream/alert/elasticsearch/ingest_pipeline/default.yml#L2449
Can you utilise them instead of a new one?
| - m365_defender.incident.alert.service_source | ||
| - m365_defender.incident.web_url | ||
| - m365_defender.incident.assigned_to | ||
| - m365_defender.incident.alert.threat_family_name |
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.
Same for the alert data stream as well.
| - set: | ||
| field: '@timestamp' | ||
| tag: set_timestamp_from_last_seen_timestamp | ||
| copy_from: m365_defender.vulnerability.last_seen_timestamp | ||
| ignore_empty_value: true |
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.
This is full ingest, so no need to set timestamp to document time.
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.
Update Severity Over Time to reflect severity labels (medium, low, high) instead of numbers.
Proposed commit message
Checklist
changelog.ymlfile.How to test this PR locally
Related Issues
Screenshots