Skip to content

fix(security): switch ingestion-base images to python:3.10-slim-bookworm#28606

Open
akashverma0786 wants to merge 2 commits into
mainfrom
slim-bookworm-compatibility-check
Open

fix(security): switch ingestion-base images to python:3.10-slim-bookworm#28606
akashverma0786 wants to merge 2 commits into
mainfrom
slim-bookworm-compatibility-check

Conversation

@akashverma0786
Copy link
Copy Markdown
Collaborator

Summary

  • Switch ingestion/operators/docker/Dockerfile and Dockerfile.ci from python:3.10-bookworm to python:3.10-slim-bookworm to reduce baseline CVE surface in the ingestion-base images
  • Add the three apt packages slim drops that the build actually needs: pkg-config (for mysqlclient's source build), libgomp1 (runtime for numpy/scipy/sklearn wheels), procps (provides ps for py-spy / debugging)
  • Add a small bootstrap RUN installing curl ca-certificates gnupg before the Microsoft apt-key + repo lines, since slim doesn't preinstall those

Test plan

  • docker build -f ingestion/operators/docker/Dockerfile --build-arg RI_VERSION=1.9.17.6 . succeeds locally (arm64, ~10 min, 4.46 GB image)
  • Smoke test inside container: metadata --version, python -c "import mysql, psycopg2, cx_Oracle, numpy, sqlalchemy, pyhive", libgomp.so.1 loadable, ps/pkg-config present — all pass
  • CI builds docker-openmetadata-ingestion-base{,-slim}.yml and py-operator-build-test.yml on linux/amd64
  • Trivy scan (trivy-scan-ingestion-base-slim-image.yml) shows reduced CVE count vs. previous full-bookworm baseline

🤖 Generated with Claude Code

Swap operators Dockerfile + Dockerfile.ci from python:3.10-bookworm to the
slim variant to reduce baseline CVE surface. Adds a small bootstrap layer
(curl ca-certificates gnupg) and three apt packages (pkg-config, libgomp1,
procps) needed by mysqlclient, numpy/scipy runtime, and ps/py-spy
respectively.

Verified locally: full [all] extras build green, image 4.46 GB, smoke tests
pass (metadata CLI, mysqlclient, psycopg2, cx_Oracle, numpy, libgomp,
pkg-config, ps).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@akashverma0786 akashverma0786 requested a review from a team as a code owner June 2, 2026 04:43
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 2, 2026

🟡 Playwright Results — all passed (16 flaky)

✅ 4256 passed · ❌ 0 failed · 🟡 16 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 299 0 0 4
🟡 Shard 2 802 0 5 9
🟡 Shard 3 805 0 2 8
🟡 Shard 4 843 0 3 12
🟡 Shard 5 717 0 3 47
🟡 Shard 6 790 0 3 8
🟡 16 flaky test(s) (passed on retry)
  • Features/DataQuality/BundleSuiteBulkOperations.spec.ts › Add test case to existing Bundle Suite (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › Admin: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseImportExportE2eFlow.spec.ts › EditAll User: Complete export-import-validate flow (shard 2, 1 retry)
  • Features/DataQuality/TestCaseResultPermissions.spec.ts › User with only VIEW cannot PATCH results (shard 2, 1 retry)
  • Features/Glossary/GlossaryWorkflow.spec.ts › should start term as Draft when glossary has reviewers (shard 2, 1 retry)
  • Features/KnowledgeCenterTextEditor.spec.ts › Rich Text Editor - Text Formatting (shard 3, 1 retry)
  • Features/RTL.spec.ts › Verify Following widget functionality (shard 3, 1 retry)
  • Flow/PersonaFlow.spec.ts › Set default persona for team should work properly (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Entity Reference List (shard 4, 1 retry)
  • Pages/CustomProperties.spec.ts › Duration (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Announcement create, edit & delete (shard 5, 1 retry)
  • Pages/Entity.spec.ts › User as Owner with unsorted list (shard 5, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)
  • Pages/ServiceEntity.spec.ts › Tier Add, Update and Remove (shard 6, 1 retry)

📦 Download artifacts

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

@gitar-bot
Copy link
Copy Markdown

gitar-bot Bot commented Jun 2, 2026

Code Review ✅ Approved

Migration to python:3.10-slim-bookworm reduces the ingestion-base image attack surface while restoring necessary system dependencies for build and runtime compatibility. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Jun 2, 2026

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant