Skip to content

fix(security): pull bookworm-security expat and libssh2 into the ingestion image - #33290

Closed
karanh37 wants to merge 2 commits into
mainfrom
security/ingestion-image-expat-libssh2
Closed

karanh37 wants to merge 2 commits into
mainfrom
security/ingestion-image-expat-libssh2

Conversation

@karanh37

@karanh37 karanh37 commented Sep 15, 2026 •

Copy link
Copy Markdown
Contributor

Advisory

Five high-severity Debian CVEs in the openmetadata-ingestion image
(base apache/airflow:3.3.1-python3.12, Debian 12 bookworm). All five have a
published Debian fix — they are not part of the usual unfixable base-image
noise.

Binary package Installed Fixed in CVE Title
libexpat1 2.5.0-1+deb12u2 2.5.0-1+deb12u3 CVE-2026-76957 Use After Free
libssh2-1 1.10.0-3+b1 1.10.0-3+deb12u1 CVE-2026-7598 Numeric Errors
libssh2-1 1.10.0-3+b1 1.10.0-3+deb12u1 CVE-2026-58050 Integer Overflow or Wraparound
libssh2-1 1.10.0-3+b1 1.10.0-3+deb12u1 CVE-2026-66032 Double Free
libssh2-1 1.10.0-3+b1 1.10.0-3+deb12u1 CVE-2026-66034 Out-of-bounds Read

Raw scanner finding

From ingestion-docker-scan.json (docker-image|openmetadata-ingestion,
target ingestion/Dockerfile.ci):

high SNYK-DEBIAN12-EXPAT-19012847   ['CVE-2026-76957']
  source=expat    name=expat/libexpat1     2.5.0-1+deb12u2  fixedIn=['2.5.0-1+deb12u3']
  from=[docker-image|openmetadata-ingestion@scan, git@1:2.39.5-0+deb12u3,
        expat/[email protected]+deb12u2]

high SNYK-DEBIAN12-LIBSSH2-16380066 ['CVE-2026-7598']   fixedIn=['1.10.0-3+deb12u1']
high SNYK-DEBIAN12-LIBSSH2-17662011 ['CVE-2026-58050']  fixedIn=['1.10.0-3+deb12u1']
high SNYK-DEBIAN12-LIBSSH2-18300246 ['CVE-2026-66032']  fixedIn=['1.10.0-3+deb12u1']
high SNYK-DEBIAN12-LIBSSH2-18300249 ['CVE-2026-66034']  fixedIn=['1.10.0-3+deb12u1']
  source=libssh2  name=libssh2/libssh2-1   1.10.0-3+b1
  from=[docker-image|openmetadata-ingestion@scan, [email protected]+deb12u15,
        curl/[email protected]+deb12u15, libssh2/[email protected]+b1]

Why these were being missed

Neither package is installed by name. libexpat1 arrives transitively via
git, libssh2-1 via libcurl4. The image already carries an
apt-get install -y --only-upgrade allowlist whose whole purpose is to pull
bookworm-security builds of exactly this kind of transitive package — these two
simply were never added to it, so the image keeps whatever version the base
image froze.

This has been reported and handed off across multiple daily scan runs without
being actioned, which is the reason for opening it as a PR rather than another
hand-off note.

What I verified

  • The binary package names are correct, not inferred. libexpat1 and
    libssh2-1 are taken verbatim from Snyk's name field
    (expat/libexpat1, libssh2/libssh2-1). This matters: --only-upgrade with
    a package name that exists in no configured source fails the build with
    Unable to locate package, so a guessed name would be a build break, not a
    silent no-op.
  • Both packages and both exact fixed versions exist in the right suite.
    Downloaded and grepped
    security.debian.org/debian-security/dists/bookworm-security/updates/main/binary-amd64/Packages.xz:
    libexpat1 2.5.0-1+deb12u3
    libssh2-1 1.10.0-3+deb12u1
    
    These match Snyk's fixedIn exactly. bookworm-security is already the source
    the surrounding allowlist entries resolve against.
  • The mechanism is the one the file already documents. ingestion/Dockerfile
    and ingestion/Dockerfile.ci both carry the comment
    --only-upgrade is a no-op for packages not present in the base image, and
    both already upgrade libcurl4, libgnutls30, libcap2 and others this way.
  • Both variants were changed. The scan targets ingestion/Dockerfile.ci,
    but ingestion/Dockerfile is what ships; they carry identical allowlists and
    fixing only one would leave the released image vulnerable while turning the
    scan green.

Manifests touched

  • ingestion/Dockerfile — +5 lines (2 package names, 4 comment lines)
  • ingestion/Dockerfile.ci — +5 lines

No lockfile is involved.

What I did NOT test

  • Neither image was built. This is the important caveat. I did not run
    docker build on either Dockerfile, so I have not observed apt-get actually
    resolving these two names in the image's own apt configuration. The archive
    check above proves the packages and versions are published; it does not prove
    this image's sources.list reaches them. CI building this branch is the real
    verification.
  • No rescan. I did not rebuild and re-run Snyk, so "clears 5 high advisories"
    is inference from the fixed-version match, not an observed count drop.
  • No image size / layer impact measured.
  • No runtime check. Nothing in the ingestion image was executed against the
    upgraded libraries; in particular no TLS or SSH-transport path was exercised.
  • No exploitability assessment — libssh2 is reached through libcurl4, and I
    did not determine whether any ingestion code path uses curl's SCP/SFTP
    transports at all.
  • The sibling trixie image (openmetadata-ingestion-base-slim) has its own two
    fixable OS advisories (gzip, libsqlite3-0); those are a separate PR.

🤖 Generated with Claude Code

RetriggerConfidence Score: 5/5

The PR appears safe to merge and consistently applies the intended Bookworm security upgrades to both relevant ingestion images.

Summary

This PR extends the existing Debian security-upgrade allowlist in both Bookworm-based ingestion image definitions.

  • Upgrades the transitively installed libexpat1 package to pick up the published CVE fix.
  • Upgrades libssh2-1 to address four published CVEs.
  • Keeps the release and CI ingestion Dockerfiles synchronized.

Reviews (1) · Last reviewed commit: "Merge branch 'main' into security/ingest..."

…stion image

Snyk reports five high-severity CVEs against the openmetadata-ingestion
image that Debian has already fixed in bookworm-security:

  libexpat1  2.5.0-1+deb12u2 -> 2.5.0-1+deb12u3
    CVE-2026-76957  Use After Free
  libssh2-1  1.10.0-3+b1     -> 1.10.0-3+deb12u1
    CVE-2026-7598   Numeric Errors
    CVE-2026-58050  Integer Overflow or Wraparound
    CVE-2026-66032  Double Free
    CVE-2026-66034  Out-of-bounds Read

Neither package is installed directly: libexpat1 arrives via git and
libssh2-1 via libcurl4, so neither is named in the existing
--only-upgrade allowlist and the image keeps whatever the base froze.
Adding them to that allowlist is the same mechanism the surrounding
packages already use.

Both fixed versions were confirmed present in
security.debian.org/debian-security bookworm-security/updates/main
before being added, and the binary package names are taken from Snyk's
own "name" field rather than inferred from the source package.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Sep 15, 2026
@karanh37
karanh37 marked this pull request as ready for review September 15, 2026 13:14
@karanh37
karanh37 requested a review from a team as a code owner September 15, 2026 13:14
@karanh37
karanh37 requested review from TeddyCr and a lite review from Copilot September 15, 2026 13:14

Copilot AI 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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Sep 15, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Adds libexpat1 and libssh2-1 to the bookworm-security upgrade allowlist in both ingestion Dockerfiles to resolve five high-severity CVEs (CVE-2026-76957, CVE-2026-7598, CVE-2026-58050, CVE-2026-66032, CVE-2026-66034). Package names and fixed versions verified against Debian security archives. No issues found.

Review coverage

Rules No rules evaluated

Functional validation Not enabled · Set up

Auto-approval Not enabled · Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@sonarqubecloud

Copy link
Copy Markdown

@karanh37

Copy link
Copy Markdown
Contributor Author

Reopening from the 2026-09-17 security triage run.

This was closed on 2026-09-15 by the pr-metadata-check gate ("No GitHub issue is linked"), not on technical merit — gitar-bot had already reviewed and approved it.

Re-verified against origin/main @ 42d1535 today:

  • The five advisories are still present in the current scan (run 35167433334): [email protected]+deb12u2 Use After Free (fix 2.5.0-1+deb12u3) and four [email protected]+b1 highs (fix 1.10.0-3+deb12u1).
  • ingestion/Dockerfile's --only-upgrade allowlist still does not name libexpat1 or libssh2-1, so nothing on main covers them.
  • fix(minor): upgrade packages #33288 (merged 2026-09-15) added a dpkg-query-driven cve_pkgs allowlist, but only to ingestion/operators/docker/Dockerfile* — the trixie base-slim image. This bookworm-based image is untouched by it.
  • The branch still applies cleanly to main (git diff origin/main... = 2 files, +10 −0, no conflict).

Sibling PR #33291 is not being reopened: #33288 supersedes it, and the gzip/sqlite3 advisories it targeted are gone from today's base-slim scan.

Still needs a linked issue in the Shipping project to clear pr-metadata-check.

The image was not built and not rescanned as part of this reopen — the verification above is manifest and archive inspection only, same as the original PR body states.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit e0464ace29c07c18a73a66f66c93401776009f92 in Playwright run 35186720870, attempt 1.

✅ 109 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 49m 28s

⏱️ Max setup 4m 50s · max shard execution 11m 11s · max shard-job elapsed before upload 17m 55s · reporting 4s

🌐 237.70 requests/attempt · 1.77 app boots/UI scenario · 0.00% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 237.7 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 1.77 per UI scenario (213 boots / 120 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 46 0 0 0 0 0
✅ Shard ingestion-01 26 0 0 0 0 0
✅ Shard ingestion-02 37 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@karanh37 karanh37 closed this Sep 17, 2026

This branch was previously deployed

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

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants