Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

qualys_vmdr: Fix package_nested field in asset data stream. #12969

Merged
merged 1 commit into from
Mar 6, 2025

Conversation

kcreddy
Copy link
Contributor

@kcreddy kcreddy commented Mar 5, 2025

Proposed commit message

`package_nested` field is defined nested, but its structure 
makes it behave like an object.

Fix the structure of `package_nested` field to facilitate 
independent queries inside this nested field.

Note

Changed from:

{
  "fixed_version": [
    "1.31-1ubuntu0.1",
    "3.5-5ubuntu2.2"
  ],
  "name": [
    "libmodule-scandeps-perl",
    "needrestart"
  ],
  "version": [
    "1.31-1",
    "3.5-5ubuntu2.1"
  ]
}

Changed to:

[
  {
    "fixed_version": [
      "1.31-1ubuntu0.1"
    ],
    "name": [
      "libmodule-scandeps-perl"
    ],
    "version": [
      "1.31-1"
    ]
  },
  {
    "fixed_version": [
      "3.5-5ubuntu2.2"
    ],
    "name": [
      "needrestart"
    ],
    "version": [
      "3.5-5ubuntu2.1"
    ]
  }
]

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

  1. Pipeline tests pass and updates the structure of package_nested field.
    --- Test results for package: qualys_vmdr - START ---
    ╭─────────────┬──────────────────────┬───────────┬──────────────────────────────────────────────────────────┬────────┬──────────────╮
    │ PACKAGE     │ DATA STREAM          │ TEST TYPE │ TEST NAME                                                │ RESULT │ TIME ELAPSED │
    ├─────────────┼──────────────────────┼───────────┼──────────────────────────────────────────────────────────┼────────┼──────────────┤
    │ qualys_vmdr │ asset_host_detection │ pipeline  │ (ingest pipeline warnings test-asset-host-detection.log) │ PASS   │ 418.355666ms │
    │ qualys_vmdr │ asset_host_detection │ pipeline  │ test-asset-host-detection.log                            │ PASS   │  189.83525ms │
    │ qualys_vmdr │ knowledge_base       │ pipeline  │ (ingest pipeline warnings test-knowledge-base.log)       │ PASS   │ 446.878458ms │
    │ qualys_vmdr │ knowledge_base       │ pipeline  │ test-knowledge-base.log                                  │ PASS   │  91.217833ms │
    │ qualys_vmdr │ user_activity        │ pipeline  │ (ingest pipeline warnings test-no-preserve-custom.log)   │ PASS   │ 393.542042ms │
    │ qualys_vmdr │ user_activity        │ pipeline  │ (ingest pipeline warnings test-yes-preserve-custom.log)  │ PASS   │ 401.810667ms │
    │ qualys_vmdr │ user_activity        │ pipeline  │ test-no-preserve-custom.log                              │ PASS   │  53.487792ms │
    │ qualys_vmdr │ user_activity        │ pipeline  │ test-yes-preserve-custom.log                             │ PASS   │  97.150375ms │
    ╰─────────────┴──────────────────────┴───────────┴──────────────────────────────────────────────────────────┴────────┴──────────────╯
    --- Test results for package: qualys_vmdr - END   ---
    Done
    
  2. Verified that field structure update doesn't cause mapping conflict.

@kcreddy kcreddy self-assigned this Mar 5, 2025
@kcreddy kcreddy added bugfix Pull request that fixes a bug issue Integration:qualys_vmdr Qualys VMDR Team:Security-Service Integrations Security Service Integrations Team [elastic/security-service-integrations] labels Mar 5, 2025
@kcreddy kcreddy marked this pull request as ready for review March 5, 2025 13:18
@kcreddy kcreddy requested a review from a team as a code owner March 5, 2025 13:18
@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

@elasticmachine
Copy link

💚 Build Succeeded

cc @kcreddy

@kcreddy kcreddy merged commit 6f40d62 into elastic:main Mar 6, 2025
7 checks passed
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:qualys_vmdr Qualys VMDR 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.

3 participants