Skip to content

Conversation

@jvalente-salemstate
Copy link
Contributor

@jvalente-salemstate jvalente-salemstate commented May 3, 2025

Proposed commit message

This PR copies the value, when present, from m365_defender.event.device.id to cloud.instance.id. The value will not be copied if the device ID is null or cloud.instance.id is already set.

Setting this field addresses one of the solutions in elastic/kibana#218756

The M365 Defender response action is available on alerts with the following fields:

  microsoft_defender_endpoint: [
    'm365_defender.alerts.entities.deviceId',
    'm365_defender.alerts.devices.mdatpDeviceId',
    'm365_defender.incident.alert.evidence.mde_device_id',
    'cloud.instance.id',
  ],

Presently, any alerts generated from the m365_defender.event dataset will not have a response action available. Once cloud.instance.id is set, it is possible to isolate/release a host via the connector.

The alternative/supplemental solution, adding m365_defender.event.device.id to the constant, microsoft_defender_endpoint would require an update to Kibana, making this a more immediate fix.

Checklist

  • I have reviewed tips for building integrations and this pull request is aligned with them.
  • I have verified that all data streams collect metrics or logs.
  • I have added an entry to my package's changelog.yml file.
  • I have verified that Kibana version constraints are current according to guidelines.
  • I have verified that any added dashboard complies with Kibana's Dashboard good practices

Related issues

@jvalente-salemstate jvalente-salemstate requested a review from a team as a code owner May 3, 2025 00:42
@efd6
Copy link
Contributor

efd6 commented May 5, 2025

/test

@efd6
Copy link
Contributor

efd6 commented May 5, 2025

You'll need to regenerate the pipeline test expectations. For example

test case failed: Expected results are different from actual ones: --- want
+++ got
@@ -4,7 +4,7 @@
             "@timestamp": "2022-11-08T08:41:56.595Z",
             "cloud": {
                 "instance": {
-                    "id'": "08f8d2adebd88b1b7e509fcca55a665831912345"
+                    "id": "08f8d2adebd88b1b7e509fcca55a665831912345"
                 }
             },
             "ecs": {

@andrewkroh andrewkroh added Integration:m365_defender Microsoft Defender XDR Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels May 5, 2025
@elasticmachine
Copy link

Pinging @elastic/security-service-integrations (Team:Security-Service Integrations)

jvalente-salemstate and others added 2 commits May 5, 2025 12:37
A prior commit had set the field `cloud.instance.id'`. This
removes the inadvertant single quote from the field name.
@efd6
Copy link
Contributor

efd6 commented May 18, 2025

/test

@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link

💚 Build Succeeded

History

@elastic-sonarqube
Copy link

@efd6 efd6 merged commit eac1431 into elastic:main May 19, 2025
7 checks passed
@elastic-vault-github-plugin-prod

Package m365_defender - 3.4.0 containing this change is available at https://epr.elastic.co/package/m365_defender/3.4.0/

@jvalente-salemstate jvalente-salemstate deleted the m365_defender-response_action-fix branch May 20, 2025 01:39
anupratharamachandran pushed a commit to anupratharamachandran/integrations that referenced this pull request Jun 2, 2025
…astic#13769)

This PR copies the value, when present, from m365_defender.event.device.id
to cloud.instance.id. The value will not be copied if the device ID is null
or cloud.instance.id is already set.

Setting this field addresses one of the solutions in elastic/kibana#218756

The M365 Defender response action is available on alerts with the
following fields:

  microsoft_defender_endpoint: [
    'm365_defender.alerts.entities.deviceId',
    'm365_defender.alerts.devices.mdatpDeviceId',
    'm365_defender.incident.alert.evidence.mde_device_id',
    'cloud.instance.id',
  ],

Currently, any alert generated from the m365_defender.event dataset will not
have a response action available. Once cloud.instance.id is set, it is
possible to isolate/release a host via the connector.

The alternative/supplemental solution, adding m365_defender.event.device.id
to the constant, microsoft_defender_endpoint would require an update to
Kibana, making the approach here a more immediate fix.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Integration:m365_defender Microsoft Defender XDR Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants