Skip to content

[ML] Scan shipped third-party libraries with Snyk in CI - #3246

Draft
valeriy42 wants to merge 1 commit into
elastic:mainfrom
valeriy42:feature/snyk-sbom-scan
Draft

valeriy42 wants to merge 1 commit into
elastic:mainfrom
valeriy42:feature/snyk-sbom-scan

Conversation

@valeriy42

@valeriy42 valeriy42 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • The Snyk integration on this repo only scans the build-image Dockerfiles, so its ~900 findings are about the build images, while Boost, libtorch and the other libraries that actually ship are built from source and not seen at all.
  • Adds dev-tools/generate_sbom.py, which turns 3rd_party/licenses/*INFO.csv into a CycloneDX SBOM, and a soft-fail Buildkite step (snyk_sbom_scan) that runs snyk sbom test on it against the org.
  • Only components Snyk can match are emitted: Boost and libxml2 as pkg:generic, PyTorch as pkg:pypi/torch. The rest (abseil, Eigen, MKL, gcc runtime, zlib and others) are printed as not scanned, so a clean result is not read as having checked them.
  • The step needs SNYK_TOKEN from Vault at secret/ci/elastic-ml-cpp/snyk/api_token, which does not exist yet. Without it the step fails (soft) with a clear message. Draft until the secret is in place.
  • Unit tests for the generator are in dev-tools/unittest/test_generate_sbom.py; the full dev-tools suite passes locally. The Buildkite step itself has not run.

The Snyk integration only scans the build-image Dockerfiles. Generate a
CycloneDX SBOM from 3rd_party/licenses/*INFO.csv and test it with
snyk sbom test in a soft-fail Buildkite step.
@valeriy42
valeriy42 marked this pull request as ready for review October 16, 2026 11:30
@elasticsearchmachine

Copy link
Copy Markdown

Pinging @elastic/ml-core (Team:ML)

@valeriy42
valeriy42 requested a review from edsavage October 16, 2026 11:31

@edsavage edsavage 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.

LGTM

Thanks Valeriy

@valeriy42 valeriy42 added v9.7.0 and removed v9.6.0 labels Oct 28, 2026
@valeriy42
valeriy42 marked this pull request as draft November 12, 2026 08:01

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants