Skip to content

Conversation

brijesh-elastic
Copy link
Collaborator

Proposed commit message

microsoft_defender_cloud: Add assessment data stream to support
Cloud Detection and Response (CDR) workflow

The new data stream, 'assessment,' retrieves all available assessments for the provided scope.
For each assessment, if sub-assessments are available, we will make another call to collect
them. We will then aggregate the results from both calls and publish them.

ECS mapping and transforms have also been added to facilitate with the
Cloud Native Vulnerability Management (CNVM)[1] and Cloud Security Posture Management (CSPM)[2] workflow.

[1] https://www.elastic.co/guide/en/security/current/vuln-management-overview.html
[2] https://www.elastic.co/docs/solutions/security/cloud/cloud-security-posture-management

Note

To Reviewers:

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

How to test this PR locally

  • Clone integrations repo.
  • Install elastic package locally.
  • Start elastic stack using elastic-package.
  • Move to integrations/packages/microsoft_defender_cloud directory.
  • Run the following command to run tests.

elastic-package test

Related issues

@brijesh-elastic brijesh-elastic self-assigned this Sep 11, 2025
@brijesh-elastic brijesh-elastic requested a review from a team as a code owner September 11, 2025 13:24
@brijesh-elastic brijesh-elastic added documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. breaking change Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Integration:microsoft_defender_cloud Microsoft Defender for Cloud Team:Sit-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] Category: CDR labels Sep 11, 2025
@elasticmachine
Copy link

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

@elastic-vault-github-plugin-prod

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@kcreddy kcreddy requested a review from a team September 11, 2025 14:14
@@ -0,0 +1,197 @@
config_version: 2
interval: {{interval}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Currently, we ask users to provide an interval for data fetching.

@maxcold, should we hardcode it to 24h? Because it's a full sync approach and we've set the retention period to 24h in the transform.

Copy link
Contributor

Choose a reason for hiding this comment

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

The easiest would be to set to 24h. Smaller periods (eg. 12h) would work with the downside that deleted resources will still show up for 24h anyway. Larger period won't really work. So if we can't implement simple validation on the input, I'd say hardcoding to 24h makes sense

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Smaller periods (eg. 12h) would work with the downside that deleted resources will still show up for 24h anyway

Right.

Hardcoding it to 24 hours makes sense, instead of keeping it user-configurable.

retention_policy:
time:
field: '@timestamp'
max_age: 24h
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The interval for fetching data and the retention period in the transform are both set to 24 hours.

Since we have limited data in the instance, it still takes 5-6 minutes to fetch all of it.

@maxcold, Do you think there's a chance that sometimes the destination indices might not have any data, or might have missing or incomplete data? Should we include a grace period in the transform to accommodate this?

Copy link
Contributor

Choose a reason for hiding this comment

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

what exactly do you mean by grace period on the transform? Can you give an example?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Example:
On the first day, data collection starts (let's say at 12:00) and completes after 10 minutes, with the transformed data populated accordingly. Now, on the second day, data collection will start at 12:10. At that time, in the destination indices, due to the retention period surpassing 24 hours in the transform, we might have missing data for those few minutes. To cover that gap, we can extend the retention period from 24 hours to 25 hours (so, grace period of 1hr).

Copy link
Contributor

Choose a reason for hiding this comment

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

got it, we can change to 26h, I just realised that what we have for our native integration, probably due to the same reason

Copy link
Contributor

@maxcold maxcold left a comment

Choose a reason for hiding this comment

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

tested in the qa cluster, findings are being displayed correctly

Copy link
Contributor

@efd6 efd6 left a comment

Choose a reason for hiding this comment

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

LGTM pending resolution of @kcreddy's concerns.

Copy link
Contributor

@kcreddy kcreddy left a comment

Choose a reason for hiding this comment

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

LGTM. Will approve after the discussion: #15290 (comment)

Copy link

Quality Gate failed Quality Gate failed

Failed conditions
62.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

@elasticmachine
Copy link

💚 Build Succeeded

History

cc @brijesh-elastic

@brijesh-elastic brijesh-elastic merged commit 542266b into elastic:main Sep 22, 2025
8 of 9 checks passed
@elastic-vault-github-plugin-prod

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Category: CDR documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. Integration:microsoft_defender_cloud Microsoft Defender for Cloud Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:Sit-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors]

Projects

None yet

5 participants