[sysdig] Add support for vulnerability datastream - #14103
Conversation
|
Pinging @elastic/security-service-integrations (Team:Security-Service Integrations) |
chrisberkhout
left a comment
There was a problem hiding this comment.
Lots of good work. I think that some significant simplifications can be made before we merge it.
🚀 Benchmarks reportTo see the full report comment with |
chrisberkhout
left a comment
There was a problem hiding this comment.
Here's a summary (see other comments for details)...
Some outstanding questions:
- Paginate/query for continuous operation and no repeats?
- One stage only?
Some things to do:
- User documentation regarding endpoint responses (scan result) vs ingested events (scan results per package-vulnerability pair).
- Code comment re relationships between entities and intended split/resolve logic.
Something to maybe do:
- Possible CEL simplification
| request("GET", | ||
| state.url.trim_right("/") + "/secure/vulnerability/v1/" + state.stage + "-results?" + { | ||
| "limit": [string(state.batch_size)], | ||
| ?"cursor": state.?next.page.optMap(v, [v]), |
There was a problem hiding this comment.
Regarding pagination, is it not possible to request scan results that are after scan results we have seen so far?
I wonder if the next.page cursor is long-lived, or if there are other filtering parameters. It would be good to avoid fetching everything each day, and also to avoid waiting a day to fetch new things.
I saw in the issue discussion:
Workloads that are no longer running will be removed from the logs, as mentioned in the runtime documentation.
But in the documentation it sounds like the old runtime workloads will be removed from a UI view, not that earlier scan results from such workloads will immediately become unavailable from the UI.
- Runtime workloads will offer a live, auto-refreshing state. This means:
- Workloads that are no longer running will be removed from the runtime view
There was a problem hiding this comment.
I agree.
We don't have a filter to collect only the latest scan results, so we have no choice but to gather all the results at every interval.
We can offer a filter option to users where they can apply filtering on supported fields (for example, kubernetes.cluster.name="production" and kubernetes.pod.container.name="docker.internal.sysdig.tools"). This will reduce the amount of data fetched and can be useful for users who need data based on specific criteria.
There was a problem hiding this comment.
Okay.
Here's what I meant this part:
I wonder if the
next.pagecursor is long-lived, or if there are other filtering parameters. It would be good to avoid fetching everything each day, and also to avoid waiting a day to fetch new things.
In the system test I see cursor values like abcdefgabcdefg01234567899876543210==, which looks like a fake version of a base64-encoded value.
Often APIs have cursors like dGltZXN0YW1wPjE3NDQ3NzI0NjExOTUxNDk4MDA=, which can be base64-decoded to timestamp>1744772461195149800. A cursor like that is something we can reuse many times to keep checking for data after that point. We could even construct a cursor value like that ourselves using the timestamp of the last data we saw.
I haven't seen a real cursor value from the live API, so I'm not sure if this is one of the cases where it has a clearly identifiable expression or ID that could be used in that way.
There was a problem hiding this comment.
Often APIs have cursors like dGltZXN0YW1wPjE3NDQ3NzI0NjExOTUxNDk4MDA=, which can be base64-decoded to timestamp>1744772461195149800. A cursor like that is something we can reuse many times to keep checking for data after that point. We could even construct a cursor value like that ourselves using the timestamp of the last data we saw.
Okay, I got it. The real cursor from the live API doesn't include the case you mentioned. I'm only receiving strings such as NDAw, MzEw, MTQw, etc.
…o using links panel widgets and update panel title name
💚 Build Succeeded
History
|
|
chrisberkhout
left a comment
There was a problem hiding this comment.
Thanks for addressing all the points I raised.
|
Package sysdig - 2.1.0 containing this change is available at https://epr.elastic.co/package/sysdig/2.1.0/ |




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