Skip to content

[cloud_security_posture] Remove dynamic: false from misconfiguration transform#17637

Merged
maxcold merged 2 commits intoelastic:mainfrom
maxcold:csp-transform-remove-dynamic-false
Mar 3, 2026
Merged

[cloud_security_posture] Remove dynamic: false from misconfiguration transform#17637
maxcold merged 2 commits intoelastic:mainfrom
maxcold:csp-transform-remove-dynamic-false

Conversation

@maxcold
Copy link
Copy Markdown
Contributor

@maxcold maxcold commented Mar 3, 2026

PR #17552 removed explicit ECS field definitions from CDR integration transform destinations, relying on the ecs@mappings component template. This broke ECS field searchability and Group-by in the Kibana CSP Findings data grid because the CSP misconfiguration transform had dynamic: false, which completely prevents ecs@mappings dynamic templates from evaluating.

This PR removes dynamic: false and the redundant strings_as_keyword dynamic template, keeping only the index sort settings and date_detection: false.

The dynamic: false setting is also not inline with other CDR related transforms, cloud_security_posture integration is the only integration with this setting

Fixes:

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 conditions are aligned across all changed packages.

Author's Checklist

  • Changes are limited to a single package

How to test this PR locally

  1. Install the integration in local Kibana
  2. Verify destination index template has ecs@mappings and no dynamic: false:
    curl -s "http://localhost:9200/_index_template/security_solution-cloud_security_posture.misconfiguration_latest*" -u elastic:changeme | jq '.index_templates[].index_template'
  3. Wait for transform to run, then check destination index mapping has ECS fields:
    curl -s "http://localhost:9200/security_solution-cloud_security_posture.misconfiguration_latest-*/_mapping" -u elastic:changeme | jq '.[] .mappings.properties.cloud'
  4. In Findings page: verify Group by Cloud Account ID works
  5. Verify search bar autocompletes ECS field names (cloud.account.id, event.category, etc.)

Related issues

Fixes the regression introduced in #17552

@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@elasticmachine
Copy link
Copy Markdown

💚 Build Succeeded

@maxcold maxcold added Integration:cloud_security_posture Security Posture Management bugfix Pull request that fixes a bug issue labels Mar 3, 2026
@maxcold maxcold marked this pull request as ready for review March 3, 2026 14:22
@maxcold maxcold requested a review from a team as a code owner March 3, 2026 14:22
@alexreal1314
Copy link
Copy Markdown
Contributor

@maxcold is there any risk introduced by this change? AFAIK it makes it kinda schema-less and we might have conflicts where the same field has two different types and can be ingested to the same index.

@maxcold
Copy link
Copy Markdown
Contributor Author

maxcold commented Mar 3, 2026

@alexreal1314 tbh I could think of a case when it will be a problem. Now we have ecs@mappings template a part of our destination index template. So ECS fields should have dynamic mappings that follow ECS. Then we have data ingested to our native integration only via cloudbeat, so I'm not sure if I understand the concern of different data types ingested into the same index. Do you have an example in mind?

@maxcold
Copy link
Copy Markdown
Contributor Author

maxcold commented Mar 3, 2026

@alexreal1314 I think your concerns are close to what was brought up in this comment #17552 (review) . But I'm not sure if keeping explicit transform mapping is worth it.

@maxcold maxcold merged commit d9c5373 into elastic:main Mar 3, 2026
11 checks passed
@maxcold maxcold deleted the csp-transform-remove-dynamic-false branch March 3, 2026 16:21
@elastic-vault-github-plugin-prod
Copy link
Copy Markdown

Package cloud_security_posture - 3.3.0-preview08 containing this change is available at https://epr.elastic.co/package/cloud_security_posture/3.3.0-preview08/

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

Labels

bugfix Pull request that fixes a bug issue Integration:cloud_security_posture Security Posture Management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants