[wiz] Add Filters to Retrieve all Types of Vulnerabilities - #14664
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
🚀 Benchmarks reportTo see the full report comment with |
| "first": state.batch_size, | ||
| "after": state.?end_cursor.value.orValue(null), | ||
| "filterBy": { | ||
| "status": ["RESOLVED", "OPEN", "REJECTED", "IN_PROGRESS"], |
There was a problem hiding this comment.
I'm wondering whether we want this to be configurable?
cc @maxcold
There was a problem hiding this comment.
We typically fetch all types of data that could potentially be useful, allowing users to apply Kibana filters later based on their needs. However, I understand this approach might lead to unnecessary index space consumption for users who are not interested in viewing resolved vulnerabilities.
There was a problem hiding this comment.
after talking with @nick-alayil we think the best way forward is to make it configurable with OPEN being the default to keep the existing behaviour. Thanks for flagging it @efd6 !
There was a problem hiding this comment.
@mohitjha-elastic Please add a manifest entry to allow this to be configurable.
@maxcold What kind of configuration would you prefer? The story around this kind of option is not a happy one; we either have a set of four booleans which do not show obvious grouping in the UI, 2^4 menu options, or multi-text (which allows typo-based misconfiguration) — or YAML. None of the available options are good.
There was a problem hiding this comment.
My $0.02. Can we've a simple toggle to control this configuration?
Default (toggle OFF): Active vulnerabilities only
- Sends only "OPEN" status vulnerabilities
- Covers majority of use cases since most teams primarily care about actionable items
- Simple, obvious, can't be misconfigured
Toggle ON: All vulnerability statuses
- Includes RESOLVED, OPEN, REJECTED, IN_PROGRESS
- For users who want comprehensive data for reporting/analytics
- Still just one boolean setting. Impossible to mess up
| state.?include_all_vulnerability.orValue(false) ? | ||
| ["RESOLVED", "OPEN", "REJECTED", "IN_PROGRESS"] | ||
| : | ||
| ["OPEN"] |
There was a problem hiding this comment.
btw I didn't find any docs in the Wiz partner portal that says that by default it queries only OPEN vulnerabilities. What concerns me is that we are changing the behaviour, as the query didn't have any status filter before, and we assumed that by default it filtered in only OPEN vulnerabilities. Do we know that for sure?
There was a problem hiding this comment.
I agree. This should not set the parameter in the case that the option is not selected.
I would suggest instead of using a boolean here, use
{{#if include_all_vulnerability}}
want_status:
- RESOLVED
- OPEN
- REJECTED
- IN_PROGRESS
{{/if}}
in the state definition. And then here
?"status": state.?want_status,
maxcold
left a comment
There was a problem hiding this comment.
the logic in general looks good, but I'm not very good with CEL to check the exact implementation
efd6
left a comment
There was a problem hiding this comment.
Nit only. Othewise LGTM (waiting for opinion).
| title: Include All Vulnerability Statuses | ||
| description: >- | ||
| Enable this toggle to fetch all types of vulnerabilities, including those with statuses RESOLVED, OPEN, REJECTED, and IN_PROGRESS. | ||
| By default, only active vulnerabilities with the OPEN status are retrieved. |
There was a problem hiding this comment.
I would leave this as "By default, the API's default filter is used." This protects us from future changes in API behaviour.
/cc @maxcold for opinion.
There was a problem hiding this comment.
I agree with the suggestion, as the documentation does not explicitly mention that only open vulnerabilities are fetched by default.
There was a problem hiding this comment.
yes, let's not make guesses and have it as By default, the API's default filter is used. , thanks for checking!
💚 Build Succeeded
History
|
|
efd6
left a comment
There was a problem hiding this comment.
Will wait for @maxcold or @nick-alayil to comment on the documentation before merge.
|
Package wiz - 3.7.0 containing this change is available at https://epr.elastic.co/package/wiz/3.7.0/ |
…4664) This change introduces filters to the vulnerability dataset, allowing retrieval of all types of vulnerabilities. It enhances the dataset's flexibility by ensuring comprehensive coverage across different vulnerability categories.





Proposed commit message
Checklist
changelog.ymlfile.How to test this PR locally
Related Issue