Skip to content

fix(security): pull trixie gzip and sqlite3 fixes into the base-slim image - #33291

Closed
karanh37 wants to merge 2 commits into
mainfrom
security/ingestion-slim-gzip-sqlite3
Closed

karanh37 wants to merge 2 commits into
mainfrom
security/ingestion-slim-gzip-sqlite3

Conversation

@karanh37

Copy link
Copy Markdown
Contributor

Advisory

Three high-severity Debian CVEs in the openmetadata-ingestion-base-slim image
(base python:3.12-slim-trixie, Debian 13 trixie). All three have a published
Debian fix — they are not part of the usual unfixable base-image noise.

Binary package Installed Fixed in CVE Title
gzip 1.13-1 1.13-1+deb13u1 CVE-2026-41992 Buffer Over-read
libsqlite3-0 3.46.1-7+deb13u1 3.46.1-7+deb13u2 CVE-2026-11822 Heap-based Buffer Overflow
libsqlite3-0 3.46.1-7+deb13u1 3.46.1-7+deb13u2 CVE-2026-11824 Heap-based Buffer Overflow

Raw scanner finding

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

high SNYK-DEBIAN13-GZIP-17681798    ['CVE-2026-41992']
  source=gzip     name=gzip                 1.13-1
  fixedIn=['1.13-1+deb13u1']  :: Buffer Over-read
  from=[docker-image|openmetadata-ingestion-base-slim@scan, [email protected]]

high SNYK-DEBIAN13-SQLITE3-17334397 ['CVE-2026-11822']
high SNYK-DEBIAN13-SQLITE3-17334400 ['CVE-2026-11824']
  source=sqlite3  name=sqlite3/libsqlite3-0  3.46.1-7+deb13u1
  fixedIn=['3.46.1-7+deb13u2'] :: Heap-based Buffer Overflow

Why these were being missed

The image already carries an apt-get install -y --only-upgrade allowlist whose
purpose is to pull security-updated builds over whatever the base image froze.
gzip and libsqlite3-0 were simply never added to it.

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. Taken verbatim from
    Snyk's name field (gzip, sqlite3/libsqlite3-0). 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 rather than a silent no-op. Note the source package is sqlite3 but the
    shared library binary is libsqlite3-0 — that is the one the image has.
  • Both packages and both exact fixed versions exist in the right suite.
    Downloaded and grepped
    deb.debian.org/debian/dists/trixie/main/binary-amd64/Packages.xz:
    gzip         1.13-1+deb13u1
    libsqlite3-0 3.46.1-7+deb13u2
    sqlite3      3.46.1-7+deb13u2
    
    These match Snyk's fixedIn exactly. Both are in trixie main, so no extra
    apt source is needed — a plain apt-get update reaches them, which the
    surrounding RUN already does.
  • The mechanism is the one the file already documents. Both Dockerfiles
    carry the comment --only-upgrade is a no-op for packages not present in the image, and both already upgrade libgnutls30, libcurl4, libcap2 and
    others this way.
  • Both variants were changed. The scan targets
    ingestion/operators/docker/Dockerfile.ci, but
    ingestion/operators/docker/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/operators/docker/Dockerfile — +4 lines (2 package names, 3 comment lines, net)
  • ingestion/operators/docker/Dockerfile.ci — +4 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, so I have not observed apt-get 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 3 high advisories"
    is inference from the fixed-version match, not an observed count drop.
  • No runtime check. Nothing in the image was executed against the upgraded
    libraries. In particular, libsqlite3-0 backs Python's sqlite3 module, which
    the ingestion framework does touch; I did not exercise it after the upgrade.
  • No image size / layer impact measured.
  • No exploitability assessment.
  • The sibling bookworm image (openmetadata-ingestion) has its own two fixable
    OS advisories (libexpat1, libssh2-1); those are a separate PR.

🤖 Generated with Claude Code

…image

Snyk reports three high-severity CVEs against the
openmetadata-ingestion-base-slim image that Debian has already fixed in
trixie main:

  gzip          1.13-1          -> 1.13-1+deb13u1
    CVE-2026-41992  Buffer Over-read
  libsqlite3-0  3.46.1-7+deb13u1 -> 3.46.1-7+deb13u2
    CVE-2026-11822  Heap-based Buffer Overflow
    CVE-2026-11824  Heap-based Buffer Overflow

Neither package is named in the image's existing --only-upgrade
allowlist, so the image keeps whatever version python:3.12-slim-trixie
froze. Adding them uses the same mechanism as the packages already
listed there.

Both fixed versions were confirmed present in
deb.debian.org/debian trixie/main/binary-amd64 before being added, and
the binary package names are taken from Snyk's own "name" field
(gzip, sqlite3/libsqlite3-0) 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:13
@karanh37
karanh37 requested a review from a team as a code owner September 15, 2026 13:13
@karanh37
karanh37 requested review from stout-yeoman and a lite review from Copilot September 15, 2026 13:13

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.

Copilot AI review requested due to automatic review settings September 15, 2026 13:13

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 with suggestions 0 resolved / 2 findings

Adds gzip and libsqlite3-0 to the CVE package upgrade allowlist to pull three high-severity Debian fixes (CVE-2026-41992, CVE-2026-11822, CVE-2026-11824) into the base-slim image, with changes applied consistently to both Dockerfile variants.

Consider adding a non-empty assertion for the cve_pkgs variable to fail the build if the regex stops matching, consistent with the fail-closed pattern already used for util-linux and openssl. Also extend the comment block to document the newly added package group and explain why it is treated as best-effort rather than asserted.

💡 Quality: cve_pkgs upgrade lacks the fail-closed assertion the file mandates

📄 ingestion/operators/docker/Dockerfile:244-245 📄 ingestion/operators/docker/Dockerfile.ci:252-253

gzip, sqlite3(libsqlite3-0), perl and libc6 are always present in python:3.12-slim-trixie, yet $cve_pkgs is passed to apt-get install --only-upgrade with no [ -n "$cve_pkgs" ] guard. If the source-name regex ever stops matching (a Debian source rename, a typo), the query returns empty and the build stays green while shipping the vulnerable packages — the exact silent no-op the adjacent comment warns against and asserts against for util-linux/openssl. Add a non-empty assertion for cve_pkgs to fail closed, consistent with the file's stated philosophy.

💡 Quality: Comment block is stale: does not document new cve_pkgs group

📄 ingestion/operators/docker/Dockerfile:216-230 📄 ingestion/operators/docker/Dockerfile.ci:224-238

The heavily-documented comment block explains util-linux, openssl, expat and linux handling but is silent about the newly added cve_pkgs set (perl, glibc, sqlite3, gzip, libssh2, libevent, pcre2). In a file this deliberately annotated, a reader cannot tell why these packages are upgraded or why they are treated as best-effort rather than asserted. Extend the comment to cover the new group.

🤖 Prompt for agents
Code Review: Adds `gzip` and `libsqlite3-0` to the CVE package upgrade allowlist to pull three high-severity Debian fixes (CVE-2026-41992, CVE-2026-11822, CVE-2026-11824) into the base-slim image, with changes applied consistently to both Dockerfile variants.
  
  Consider adding a non-empty assertion for the `cve_pkgs` variable to fail the build if the regex stops matching, consistent with the fail-closed pattern already used for util-linux and openssl. Also extend the comment block to document the newly added package group and explain why it is treated as best-effort rather than asserted.

1. 💡 Quality: cve_pkgs upgrade lacks the fail-closed assertion the file mandates
   Files: ingestion/operators/docker/Dockerfile:244-245, ingestion/operators/docker/Dockerfile.ci:252-253

   gzip, sqlite3(libsqlite3-0), perl and libc6 are always present in python:3.12-slim-trixie, yet $cve_pkgs is passed to `apt-get install --only-upgrade` with no `[ -n "$cve_pkgs" ]` guard. If the source-name regex ever stops matching (a Debian source rename, a typo), the query returns empty and the build stays green while shipping the vulnerable packages — the exact silent no-op the adjacent comment warns against and asserts against for util-linux/openssl. Add a non-empty assertion for cve_pkgs to fail closed, consistent with the file's stated philosophy.

2. 💡 Quality: Comment block is stale: does not document new cve_pkgs group
   Files: ingestion/operators/docker/Dockerfile:216-230, ingestion/operators/docker/Dockerfile.ci:224-238

   The heavily-documented comment block explains util-linux, openssl, expat and linux handling but is silent about the newly added cve_pkgs set (perl, glibc, sqlite3, gzip, libssh2, libevent, pcre2). In a file this deliberately annotated, a reader cannot tell why these packages are upgraded or why they are treated as best-effort rather than asserted. Extend the comment to cover the new group.

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

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