Skip to content

[XM Cyber] Migrate VRM data streams to the vrmReport API and add vulnerability_instance data stream - #21162

Open
muskan-agarwal26 wants to merge 5 commits into
elastic:mainfrom
muskan-agarwal26:xm_cyber-0.5.0
Open

[XM Cyber] Migrate VRM data streams to the vrmReport API and add vulnerability_instance data stream#21162
muskan-agarwal26 wants to merge 5 commits into
elastic:mainfrom
muskan-agarwal26:xm_cyber-0.5.0

Conversation

@muskan-agarwal26

@muskan-agarwal26 muskan-agarwal26 commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Type of change

  • Enhancement

Proposed commit message

  • CEL inputs for vulnerability, device, product now call
    /api/v2/vrm/public/vrmReport/{vulnerabilities,devices,products} and paginate with the
    top-level nextPageLink instead of meta.next. nextPageLink is an absolute URL whose
    scheme/host can differ from the configured base URL (both http:// and https:// have been
    observed), so the input parses it and reuses only its path and query on top of the configured URL.
  • product: productOperatingSystems was renamed by the API to productOperatingSystem;
    field, pipeline output and Product dashboard updated accordingly.
  • device: the API no longer returns isChokePoint or the per-device apps[] array (that data
    moved to vulnerabilityInstances). Removed xm_cyber.device.is_choke_point, all
    xm_cyber.device.apps.* fields and their pipeline processors. Device dashboard KPI now uses
    choke_point_level.
  • vulnerability: the API no longer returns status, exploitKitExist, isExploitedInTheWild
    or techniqueId (the feed only contains open CVEs). Removed those fields and the dashboard
    panels that depended on them (Status filter/pie, exploited KPI now based on in_cisa_kev).
    Added the nine new advisory URL fields (nvd_url, cve_org_url, msrc_url, red_hat_url,
    amazon_linux_url, debian_url, ubuntu_url, suse_url, oracle_url). Missing CVSS scores
    now arrive as 0 with an empty vector instead of null; the pipeline drops the score when the
    vector is empty so vulnerability.score.base is not set to 0. latest_vulnerability
    transform fields synced and fleet_transform_version bumped to 0.2.0.
  • New vulnerability_instance data stream: one event per device from
    /api/v2/vrm/public/vrmReport/vulnerabilityInstances, with product_versions[] (vendor,
    name, version, file paths, active CVEs with safe version, closed CVE ids). Maps host.id,
    device.id, vulnerability.enumeration. Includes ILM policy, pipeline/system tests and a new
    [Logs XM Cyber] Vulnerability Instances dashboard; existing dashboards link to it.
  • Docker mock updated to the new paths and envelope, with two-page pagination for each VRM stream.
  • README, sample events, pipeline test fixtures and dashboard screenshots regenerated.

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

elastic-package test

Related issues

Screenshots

xm_cyber-vulnerability_instance

1. Added vulnerability instance datastream development.
2. Updated all datastream dashboard to include link of new datastream dashboard.
@github-actions

Copy link
Copy Markdown
Contributor

Elastic Docs Style Checker (Vale)

Summary: 2 warnings, 1 suggestion found

⚠️ Warnings (2): Fix when the suggestion improves clarity or correctness.
File Line Rule Message
packages/xm_cyber/data_stream/vulnerability_instance/fields/fields.yml 19 Elastic.QuotesPunctuation Place punctuation inside closing quotation marks.
packages/xm_cyber/data_stream/vulnerability_instance/manifest.yml 34 Elastic.Latinisms Latin terms and abbreviations are a common source of confusion. Use 'for example' instead of 'e.g'.
💡 Suggestions (1): Optional style improvements. Apply when helpful.
File Line Rule Message
packages/xm_cyber/data_stream/vulnerability_instance/fields/fields.yml 19 Elastic.WordChoice Consider using 'can, might' instead of 'May', unless the term is in the UI.

The Vale linter checks documentation changes against the Elastic Docs style guide. To use Vale locally or report issues, refer to Elastic style guide for Vale.

@muskan-agarwal26
muskan-agarwal26 marked this pull request as ready for review September 10, 2026 06:11
@muskan-agarwal26
muskan-agarwal26 requested review from a team as code owners September 10, 2026 06:11
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@muskan-agarwal26 muskan-agarwal26 self-assigned this Sep 10, 2026
@muskan-agarwal26 muskan-agarwal26 added enhancement New feature or request Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Team:SDE-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] labels Sep 10, 2026
@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

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

- set:
tag: set_ecs_version_8c2c9474
field: ecs.version
value: 9.5.0

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Severity: 🟠 High confidence: high path: packages/xm_cyber/data_stream/vulnerability_instance/elasticsearch/ingest_pipeline/default.yml:7

vulnerability_instance pipeline sets ecs.version 9.5.0 but build.yml pins git@​v9.4.0 (siblings use 9.4.0) — change it to 9.4.0 so the reported ECS version matches the version the mappings are built against.

Details

The new vulnerability_instance pipeline hardcodes ecs.version: 9.5.0, but the package's _dev/build/build.yml pins the ECS reference at git@​v9.4.0, and the three sibling pipelines changed in this same PR (device, product, vulnerability) all set ecs.version: 9.4.0. The ecs.version value written into every document must match the ECS version the field mappings were actually generated from (the build.yml pin); a mismatch mislabels the documents and is the exact pipeline/build.yml inconsistency flagged as HIGH by the review rubric. vulnerability_instance is not an entity data stream (its pipeline sets event.kind: event, not asset, and no entity.attributes.*/entity.lifecycle.*/entity.relationships.* fields are declared), so it does not require the 9.5.0 pin — it should align with the rest of the package at 9.4.0. (Bumping build.yml to 9.5.0 instead would break the other three pipelines that stay at 9.4.0, so aligning this one down is the correct minimal fix.)

Recommendation:

Set the new pipeline's ECS version to match build.yml (git@​v9.4.0) and its sibling pipelines:

- set:
    tag: set_ecs_version_8c2c9474
    field: ecs.version
    value: 9.4.0
Suggested change
value: 9.5.0
value: 9.4.0

🤖 AI-Generated Review | Vera Review Bot - v0.3.0 | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

✅ All changelog entries have the correct PR link.

dependencies:
ecs:
reference: 'git@v9.4.0'
reference: 'git@v9.5.0'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Severity: 🟠 High confidence: high path: packages/xm_cyber/_dev/build/build.yml:3

The build.yml ECS pin bump to git@​v9.5.0 now mismatches the risk_score pipeline, which still sets ecs.version 9.4.0 — bump risk_score's set_ecs_version processor (and its regenerated sample_event) to 9.5.0 so the reported version matches the mappings built into the package.

Details

This delta bumps the package ECS pin to git@​v9.5.0 and raises ecs.version to 9.5.0 in every data stream pipeline except risk_score. data_stream/risk_score/elasticsearch/ingest_pipeline/default.yml still sets field: ecs.version / value: 9.4.0, and data_stream/risk_score/sample_event.json still reports "version": "9.4.0". Because build.yml is the single pin that determines which ECS field definitions are imported for the whole package, risk_score documents will now advertise ecs.version 9.4.0 while actually being mapped against ECS 9.5.0 — an internal inconsistency the reviewer skill flags as HIGH (pipeline ecs.version out of sync with the build.yml pin). The prior review finding (2d86bd985d377cbd) recommended aligning on 9.4.0; that recommendation is superseded here because the package contains an entity data stream (entity_inventory sets event.kind: asset), which requires the git@​v9.5.0 pin, so 9.5.0 is the correct target and risk_score is the one stream left behind. The risk_score pipeline is not itself a changed file, so this is reported on the build.yml line that introduces the mismatch.

Recommendation:

Bring the risk_score pipeline in line with the new git@​v9.5.0 pin (matching the other six pipelines), then regenerate its sample_event via system tests:

- set:
    field: ecs.version
    tag: set_ecs_version_8c2c9474
    value: 9.5.0

🤖 AI-Generated Review | Vera Review Bot - v0.3.0 | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

@vera-review-bot

Copy link
Copy Markdown

Review summary

Issues found across the latest commits ed634b3 — 1 high
  • 🟠 The build.yml ECS pin bump to git@​v9.5.0 now mismatches the risk_score pipeline, which still sets ecs.version 9.4.0 — bump risk_score's set_ecs_version processor (and its regenerated sample_event) to 9.5.0 so the reported version matches the mappings built into the package. (link) (Unresolved)
Issues found across earlier commits 725bf43 — 1 high
  • 🟠 vulnerability_instance pipeline sets ecs.version 9.5.0 but build.yml pins git@​v9.4.0 (siblings use 9.4.0) — change it to 9.4.0 so the reported ECS version matches the version the mappings are built against. (link) (Unresolved)

A new commit triggers another review — at most once every 15 minutes. I skip the PR while it's approved or has merge conflicts.

🤖 AI-Generated Review | Vera Review Bot - v0.3.0 | 📚 Knowledge base: integration-skills

⚠️ Automated review — verify suggestions before applying.

@infra-vault-gh-plugin-prod

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @muskan-agarwal26

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

Labels

enhancement New feature or request Integration:xm_cyber XM Cyber Team:SDE-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] 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.

[xm_cyber] Migrate VRM data streams to new v2 vrmReport API

1 participant