Skip to content

Default to vulnerableAsset.id when vulnerableAsset.provider_unique_id is missing for resource.id - #11630

Merged
maxcold merged 4 commits into
elastic:mainfrom
maxcold:csp-default-to-id-for-vulnerability-resource-id
Nov 5, 2024
Merged

Default to vulnerableAsset.id when vulnerableAsset.provider_unique_id is missing for resource.id#11630
maxcold merged 4 commits into
elastic:mainfrom
maxcold:csp-default-to-id-for-vulnerability-resource-id

Conversation

@maxcold

@maxcold maxcold commented Nov 4, 2024

Copy link
Copy Markdown
Contributor

Proposed commit message

resource.id is the field used for wiz vulnerability latest transform as a unique key, if it's missing, multiple findings might be merged into one. In many cases (in 10k out of 300k results with dev API key) provider id for a resource is missing, but wiz generated id seems to be always present. Defaulting to this id when provider id is missing

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

Author's Checklist

  • [ ]

How to test this PR locally

Test case added to the pipeline test

Related issues

Screenshots

@maxcold maxcold added enhancement New feature or request Team:Cloud Security Cloud Security team [elastic/cloud-security-posture] Integration:wiz Wiz Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] labels Nov 4, 2024
@maxcold
maxcold requested a review from a team as a code owner November 4, 2024 17:44
@elasticmachine

Copy link
Copy Markdown

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

tag: rename_vulnerableAsset_type
target_field: wiz.vulnerability.vulnerable_asset.type
ignore_missing: true
- remove:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

moving these processors to the end, to where they were before new processors were added for CDR. In my case the wiz.vulnerability.vulnerable_asset.id was removed before I could use it, but it makes sense in general as well

@maxcold
maxcold requested review from a team and CohenIdo November 4, 2024 17:57
@elastic-vault-github-plugin-prod

elastic-vault-github-plugin-prod Bot commented Nov 4, 2024

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

Comment thread packages/wiz/data_stream/vulnerability/elasticsearch/ingest_pipeline/default.yml Outdated
Comment thread packages/wiz/data_stream/vulnerability/elasticsearch/ingest_pipeline/default.yml Outdated
maxcold and others added 2 commits November 5, 2024 13:00
…peline/default.yml

Co-authored-by: Krishna Chaitanya Reddy Burri <krish.reddy91@gmail.com>
@maxcold
maxcold requested a review from kcreddy November 5, 2024 12:04
@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

@elastic-sonarqube

Copy link
Copy Markdown

Quality Gate failed Quality Gate failed

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

See analysis details on SonarQube

@maxcold
maxcold merged commit 3733b13 into elastic:main Nov 5, 2024
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package wiz - 2.2.0 containing this change is available at https://epr.elastic.co/search?package=wiz

harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 4, 2025
…_id` is missing for `resource.id` (elastic#11630)

* default to vulnerableAsset.id when vulnerableAsset.provider_unique_id is missing for resource.id

* add more fields to be removed preserve_duplicate_custom_fields flag disabled

* Update packages/wiz/data_stream/vulnerability/elasticsearch/ingest_pipeline/default.yml

Co-authored-by: Krishna Chaitanya Reddy Burri <krish.reddy91@gmail.com>

* delete remove event.original processor

---------

Co-authored-by: Krishna Chaitanya Reddy Burri <krish.reddy91@gmail.com>
harnish-crest-data pushed a commit to chavdaharnish/integrations that referenced this pull request Feb 5, 2025
…_id` is missing for `resource.id` (elastic#11630)

* default to vulnerableAsset.id when vulnerableAsset.provider_unique_id is missing for resource.id

* add more fields to be removed preserve_duplicate_custom_fields flag disabled

* Update packages/wiz/data_stream/vulnerability/elasticsearch/ingest_pipeline/default.yml

Co-authored-by: Krishna Chaitanya Reddy Burri <krish.reddy91@gmail.com>

* delete remove event.original processor

---------

Co-authored-by: Krishna Chaitanya Reddy Burri <krish.reddy91@gmail.com>
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:wiz Wiz Team:Cloud Security Cloud Security team [elastic/cloud-security-posture] Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations]

3 participants