[Contextual Security] update latest vulnerability transform to create an alias for latest index #241700
+145
−9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR should handle this issue and related to data-stream changes in this PR.
Migrates the vulnerabilities transform destination from a direct index pattern to a versioned index with an alias, enabling future zero-downtime migrations and preventing breaking changes.
logs-cloud_security_posture.vulnerabilities_latest-default(backward-compatible alias)security_solution-cloud_security_posture.vulnerability_latest-v1(versioned physical index)security_solution-cloud_security_posture.vulnerability_latest-*(template pattern)Transform Updates
Updated destination index to versioned pattern:
security_solution-cloud_security_posture.vulnerability_latest-v1Added previous version to DEPRECATED_VULN_TRANSFORM_VERSIONS
Benefits
✅ Backward Compatibility: Existing queries using logs-cloud_security_posture.vulnerabilities_latest-default continue to work
✅ Future-Proof: Can create v2, v3, etc. and update alias without breaking queries
✅ Zero Downtime: Index version changes won't disrupt running systems
✅ Consistent Pattern: Aligns with how misconfigurations index is handled
Checklist
Check the PR satisfies following conditions.
Reviewers should verify this PR satisfies this list as well.
release_note:breakinglabel should be applied in these situations.release_note:*label is applied per the guidelinesbackport:*labels.Identify risks
Before upgrading the integration
since this PR introduces a breaking change in the
vulnerability.published_datemapping few actions need to be taken to ensure smooth upgrade.if data preservation is important in latest index follow this procedure to preserve data and maintain mapping compatibility:
Why This Approach?
Alternative: Fresh Start (Data Loss)
If data preservation is not required:
new index will be recreated with new mappings.
Screen recording
Screen.Recording.2025-11-04.at.9.32.53.mov