Skip to content

[sysdig] Add support for vulnerability datastream - #14103

Merged
brijesh-elastic merged 8 commits into
elastic:mainfrom
brijesh-elastic:sysdig-0.5.0
Sep 5, 2025
Merged

[sysdig] Add support for vulnerability datastream#14103
brijesh-elastic merged 8 commits into
elastic:mainfrom
brijesh-elastic:sysdig-0.5.0

Conversation

@brijesh-elastic

@brijesh-elastic brijesh-elastic commented Jun 2, 2025

Copy link
Copy Markdown
Contributor

Proposed commit message

sysdig: add support for vulnerability datastream.

This vulnerability logs provides an overview of scan results from your
runtime, pipeline, and container registries to provide highly accurate views
of vulnerability risk, access to public exploits, and risk management.

Sanitized test case inputs were obtained from live Sysdig Secure instance
using the Sysdig Next Gen API.

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

  • Clone integrations repo.
  • Install elastic package locally.
  • Start elastic stack using elastic-package.
  • Move to integrations/packages/sysdig directory.
  • Run the following command to run tests.

elastic-package test

Related issues

Screenshots

vulnerability dashboard
@brijesh-elastic brijesh-elastic self-assigned this Jun 2, 2025
@brijesh-elastic
brijesh-elastic requested a review from a team as a code owner June 2, 2025 08:06
@brijesh-elastic brijesh-elastic added enhancement New feature or request dashboard Relates to a Kibana dashboard bug, enhancement, or modification. Team:Security-Service Integrations Security Service Integrations team [elastic/security-service-integrations] Integration:sysdig Sysdig Team:SDE-Crest Crest developers on the Security Integrations team [elastic/sit-crest-contractors] labels Jun 2, 2025
@elasticmachine

Copy link
Copy Markdown

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

@chrisberkhout
chrisberkhout self-requested a review June 2, 2025 10:56

@chrisberkhout chrisberkhout left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Lots of good work. I think that some significant simplifications can be made before we merge it.

Comment thread packages/sysdig/_dev/build/docs/README.md Outdated
Comment thread packages/sysdig/_dev/build/docs/README.md Outdated
Comment thread packages/sysdig/img/sysdig-vulnerability-screenshot.png
Comment thread packages/sysdig/data_stream/vulnerability/manifest.yml
Comment thread packages/sysdig/data_stream/vulnerability/agent/stream/cel.yml.hbs Outdated
Comment thread packages/sysdig/data_stream/vulnerability/agent/stream/cel.yml.hbs Outdated
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

🚀 Benchmarks report

To see the full report comment with /test benchmark fullreport

@andrewkroh andrewkroh added the documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. label Jul 1, 2025

@chrisberkhout chrisberkhout left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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
Comment thread packages/sysdig/_dev/build/docs/README.md
Comment thread packages/sysdig/data_stream/vulnerability/agent/stream/cel.yml.hbs Outdated
Comment thread packages/sysdig/data_stream/vulnerability/agent/stream/cel.yml.hbs
Comment thread packages/sysdig/data_stream/vulnerability/agent/stream/cel.yml.hbs
request("GET",
state.url.trim_right("/") + "/secure/vulnerability/v1/" + state.stage + "-results?" + {
"limit": [string(state.batch_size)],
?"cursor": state.?next.page.optMap(v, [v]),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

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.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Okay.

Here's what I meant this part:

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.

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.

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.

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.

Comment thread packages/sysdig/data_stream/vulnerability/agent/stream/cel.yml.hbs
…o using links panel widgets and update panel title name
@elasticmachine

Copy link
Copy Markdown

💚 Build Succeeded

History

cc @brijesh-elastic

@chrisberkhout chrisberkhout left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for addressing all the points I raised.

@brijesh-elastic
brijesh-elastic merged commit f12a71e into elastic:main Sep 5, 2025
9 checks passed
@elastic-vault-github-plugin-prod

Copy link
Copy Markdown
Contributor

Package sysdig - 2.1.0 containing this change is available at https://epr.elastic.co/package/sysdig/2.1.0/

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

Labels

dashboard Relates to a Kibana dashboard bug, enhancement, or modification. documentation Improvements or additions to documentation. Applied to PRs that modify *.md files. enhancement New feature or request Integration:sysdig Sysdig 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]

4 participants