Skip to content

Revert "fix(ingestion): patch PySpark-bundled CVE jars - #31074

Merged
harshsoni2024 merged 2 commits into
mainfrom
revert_patch_pyaspark_jars
Aug 6, 2026
Merged

harshsoni2024 merged 2 commits into
mainfrom
revert_patch_pyaspark_jars

Conversation

@harshsoni2024

@harshsoni2024 harshsoni2024 commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

  • reverting the pyspark jar patch operation since it's failing due to sha mismatch & maven jar fetch errors.
  • commit - 279c8e9

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

High-level design:

N/A — small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

…lim image; dedupe jar surgery across Dockerfiles (#30751)"

This reverts commit 279c8e9.
Copilot AI review requested due to automatic review settings August 6, 2026 05:24
@harshsoni2024
harshsoni2024 requested a review from a team as a code owner August 6, 2026 05:24
@github-actions

github-actions Bot commented Aug 6, 2026

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.

@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Aug 6, 2026
@harshsoni2024 harshsoni2024 added the skip-pr-checks Bypass PR metadata validation check label Aug 6, 2026

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.

Pull request overview

This PR reverts the previously added PySpark jar patching step in ingestion Docker images because the patch process was failing due to SHA mismatches during image builds.

Changes:

  • Removes the patch_pyspark_jars.sh hardening script from the repo.
  • Removes the Docker build steps that copied and executed the hardening script in ingestion/operator images.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
ingestion/scripts/patch_pyspark_jars.sh Deletes the PySpark/spaCy hardening script that fetched SHA-pinned replacement jars and removed a spaCy scanner fixture.
ingestion/operators/docker/Dockerfile.ci Removes the COPY+RUN step that executed the hardening script during operator CI image build.
ingestion/operators/docker/Dockerfile Removes the COPY+RUN step that executed the hardening script during operator image build.
ingestion/Dockerfile.ci Removes the COPY+RUN step that executed the hardening script during ingestion CI image build.
ingestion/Dockerfile Removes the COPY+RUN step that executed the hardening script during ingestion image build.

Comment thread ingestion/Dockerfile Resolved
Comment thread ingestion/Dockerfile.ci Resolved
Comment thread ingestion/operators/docker/Dockerfile Resolved
@harshsoni2024

harshsoni2024 commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Code Review ⚠️ Changes requested 0 resolved / 1 findings
Reverts the PySpark jar patch operation to resolve SHA mismatches, but this reintroduces CVE-vulnerable PySpark jars into the ingestion images.

⚠️ Security: Revert reintroduces CVE-vulnerable PySpark jars into images
Reply with Gitar … to ask about this finding.

This revert removes the patch step that stripped/replaced CVE-vulnerable jars bundled inside PySpark (and the spaCy scanner fixture) across all four ingestion Dockerfiles. While reverting is justified to unblock builds failing on a sha mismatch, it re-exposes the known CVEs in the shipped ingestion images. Track a follow-up to re-apply a corrected patch (with updated jar checksums) so the vulnerability window is closed rather than left open indefinitely.

🤖 Prompt for agents

Code Review: Reverts the PySpark jar patch operation to resolve SHA mismatches, but this reintroduces CVE-vulnerable PySpark jars into the ingestion images.

1. ⚠️ Security: Revert reintroduces CVE-vulnerable PySpark jars into images

   This revert removes the patch step that stripped/replaced CVE-vulnerable jars bundled inside PySpark (and the spaCy scanner fixture) across all four ingestion Dockerfiles. While reverting is justified to unblock builds failing on a sha mismatch, it re-exposes the known CVEs in the shipped ingestion images. Track a follow-up to re-apply a corrected patch (with updated jar checksums) so the vulnerability window is closed rather than left open indefinitely.

Options
Display: compact → Showing less information.

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

Compact

gitar display:verbose         

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

@gitar-bot ,this is intentional since jar patch operation causing docker workflows to fail due to sha mismatch & maven fetch jar errors. CVEs issue will be handled later differently

@github-actions

github-actions Bot commented Aug 6, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit fa1b4021cd8aa40b69b57d67309d12d77e23f75e in Playwright run 31088259037, attempt 1.

✅ 107 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) 48m 20s

⏱️ Max setup 3m 5s · max shard execution 10m 27s · max shard-job elapsed before upload 18m 30s · reporting 4s

🌐 208.04 requests/attempt · 1.76 app boots/UI scenario · 0.00% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 208.04 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 1.76 per UI scenario (208 boots / 118 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 25 0 0 0 0 0
✅ Shard ingestion-02 36 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

Copilot AI review requested due to automatic review settings August 6, 2026 09: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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

@sonarqubecloud

sonarqubecloud Bot commented Aug 6, 2026

Copy link
Copy Markdown

@harshsoni2024
harshsoni2024 added this pull request to the merge queue Aug 6, 2026
Merged via the queue into main with commit b09040d Aug 6, 2026
109 of 112 checks passed
@harshsoni2024
harshsoni2024 deleted the revert_patch_pyaspark_jars branch August 6, 2026 13:29
@gitar-bot

gitar-bot Bot commented Aug 6, 2026

Copy link
Copy Markdown
Code Review ⚠️ Changes requested 0 resolved / 1 findings

Reverts the PySpark jar patch operation to resolve SHA mismatches, but this reintroduces CVE-vulnerable PySpark jars into the ingestion images.

⚠️ Security: Revert reintroduces CVE-vulnerable PySpark jars into images

Reply with Gitar … to ask about this finding.

This revert removes the patch step that stripped/replaced CVE-vulnerable jars bundled inside PySpark (and the spaCy scanner fixture) across all four ingestion Dockerfiles. While reverting is justified to unblock builds failing on a sha mismatch, it re-exposes the known CVEs in the shipped ingestion images. Track a follow-up to re-apply a corrected patch (with updated jar checksums) so the vulnerability window is closed rather than left open indefinitely.

🤖 Prompt for agents
Code Review: Reverts the PySpark jar patch operation to resolve SHA mismatches, but this reintroduces CVE-vulnerable PySpark jars into the ingestion images.

1. ⚠️ Security: Revert reintroduces CVE-vulnerable PySpark jars into images

   This revert removes the patch step that stripped/replaced CVE-vulnerable jars bundled inside PySpark (and the spaCy scanner fixture) across all four ingestion Dockerfiles. While reverting is justified to unblock builds failing on a sha mismatch, it re-exposes the known CVEs in the shipped ingestion images. Track a follow-up to re-apply a corrected patch (with updated jar checksums) so the vulnerability window is closed rather than left open indefinitely.

Options

Display: verbose → Showing more information.

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

Verbose
gitar display:compact         

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

MannXo pushed a commit to MannXo/OpenMetadata that referenced this pull request Aug 12, 2026
…es (open-metadata#31338)

* fix(security): clear the remaining fixable CVEs in the ingestion images

The 10 Aug scan of the release image reports 43 findings, only 5 of which have a
fix available; the other 38 are Debian packages with no upstream fix in bookworm.
This clears all 5.

black -- CVE-2026-31900 (Critical), CVE-2026-32274 (High), CVE-2024-21503 (Medium)

black is not installed in any release image; it is a dev extra only. The sole
occurrence on disk is spacy/tests/package/requirements.txt, a test fixture inside
the spaCy wheel that pins black==22.3.0 and that scanners parse as a dependency
manifest. Strip it after the final pip install in every image that ships spaCy.

This strip previously shipped inside patch_pyspark_jars.sh and was reverted along
with it in open-metadata#31074, because the jar-fetching half failed on sha mismatches. Nothing
in this script fetches anything. It also cannot fail a build: every path exits 0,
including python missing and an unexpected traceback, since the fixture is inert
data and not worth blocking a release over. Walking sys.path rather than resolving
spaCy once via find_spec is deliberate -- a user-site install shadows a
system-site one, and find_spec would strip only the shadowing copy while the
scanner kept reading the other, passing the build with the finding intact.

apache-airflow 3.2.2 -> 3.3.0 -- CVE-2026-48891 (Medium)

/ui/dependencies leaked Dag IDs the caller cannot read through the dep.source and
dep.target fields, a residual gap in the CVE-2026-28563 fix. The pin, both base
image tags, the vendored constraints file and the integration-test image move
together.

The constraints file is not a straight re-download. It carries two hand-patches
marked "keep on regeneration" -- impyla and thrift at 0.24.0 for CVE-2026-66053 /
CVE-2026-41608 / CVE-2026-48586 -- and upstream constraints-3.3.0 still ships
impyla==0.22.0 and thrift==0.16.0. Both are re-applied, so the file diverges from
upstream in exactly those two blocks and nothing else. A plain regeneration would
have traded one airflow CVE for three thrift ones.

setuptools 80.10.2 -> 84 -- CVE-2026-59890 (Medium)

The setuptools<81 pin guards two separate things. cx_Oracle's setup.py imports
pkg_resources, which 81.0.0 removed, and it has no cp312 wheel, so a source build
is mandatory; that half of the pin stays. The other half, sqlalchemy-redshift
0.8.14, no longer applies: 1.0.0 moved to importlib.metadata and setup.py has
pinned ~=1.0.0 since open-metadata#27776.

The 0.8.14 entries removed here are a regression rather than a decision. open-metadata#27776
deleted them from all three install sites; open-metadata#26896, branched before it and merged
after, then rewrote the same line to drop sqlalchemy-databricks and carried the
stale redshift entry back in. Being a single-line replacement, it merged without
conflict.

cx_Oracle and mysqlclient need pkg_resources only at build time -- once built,
both import cleanly against 84 -- so the lift becomes a final layer after the last
source build instead of replacing the pin.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(security): address review on the ingestion CVE cleanup

Move the setuptools>=83 lift after `airflow db migrate` in both airflow images:
the lift removes pkg_resources and migrate runs Airflow's import chain. Migrate
is the last line in both files, so this costs nothing.

Fall back to python3 in strip_spacy_test_fixture.sh when no `python` shim exists;
without it the strip silently skips and the black findings survive a green build.
`python` stays first -- pip installs into whichever interpreter it resolves to.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>
harshsoni2024 added a commit that referenced this pull request Aug 12, 2026
…es (#31338)

* fix(security): clear the remaining fixable CVEs in the ingestion images

The 10 Aug scan of the release image reports 43 findings, only 5 of which have a
fix available; the other 38 are Debian packages with no upstream fix in bookworm.
This clears all 5.

black -- CVE-2026-31900 (Critical), CVE-2026-32274 (High), CVE-2024-21503 (Medium)

black is not installed in any release image; it is a dev extra only. The sole
occurrence on disk is spacy/tests/package/requirements.txt, a test fixture inside
the spaCy wheel that pins black==22.3.0 and that scanners parse as a dependency
manifest. Strip it after the final pip install in every image that ships spaCy.

This strip previously shipped inside patch_pyspark_jars.sh and was reverted along
with it in #31074, because the jar-fetching half failed on sha mismatches. Nothing
in this script fetches anything. It also cannot fail a build: every path exits 0,
including python missing and an unexpected traceback, since the fixture is inert
data and not worth blocking a release over. Walking sys.path rather than resolving
spaCy once via find_spec is deliberate -- a user-site install shadows a
system-site one, and find_spec would strip only the shadowing copy while the
scanner kept reading the other, passing the build with the finding intact.

apache-airflow 3.2.2 -> 3.3.0 -- CVE-2026-48891 (Medium)

/ui/dependencies leaked Dag IDs the caller cannot read through the dep.source and
dep.target fields, a residual gap in the CVE-2026-28563 fix. The pin, both base
image tags, the vendored constraints file and the integration-test image move
together.

The constraints file is not a straight re-download. It carries two hand-patches
marked "keep on regeneration" -- impyla and thrift at 0.24.0 for CVE-2026-66053 /
CVE-2026-41608 / CVE-2026-48586 -- and upstream constraints-3.3.0 still ships
impyla==0.22.0 and thrift==0.16.0. Both are re-applied, so the file diverges from
upstream in exactly those two blocks and nothing else. A plain regeneration would
have traded one airflow CVE for three thrift ones.

setuptools 80.10.2 -> 84 -- CVE-2026-59890 (Medium)

The setuptools<81 pin guards two separate things. cx_Oracle's setup.py imports
pkg_resources, which 81.0.0 removed, and it has no cp312 wheel, so a source build
is mandatory; that half of the pin stays. The other half, sqlalchemy-redshift
0.8.14, no longer applies: 1.0.0 moved to importlib.metadata and setup.py has
pinned ~=1.0.0 since #27776.

The 0.8.14 entries removed here are a regression rather than a decision. #27776
deleted them from all three install sites; #26896, branched before it and merged
after, then rewrote the same line to drop sqlalchemy-databricks and carried the
stale redshift entry back in. Being a single-line replacement, it merged without
conflict.

cx_Oracle and mysqlclient need pkg_resources only at build time -- once built,
both import cleanly against 84 -- so the lift becomes a final layer after the last
source build instead of replacing the pin.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(security): address review on the ingestion CVE cleanup

Move the setuptools>=83 lift after `airflow db migrate` in both airflow images:
the lift removes pkg_resources and migrate runs Airflow's import chain. Migrate
is the last line in both files, so this costs nothing.

Fall back to python3 in strip_spacy_test_fixture.sh when no `python` shim exists;
without it the strip silently skips and the black findings survive a green build.
`python` stays first -- pip installs into whichever interpreter it resolves to.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>
k-anshul pushed a commit to k-anshul/OpenMetadata that referenced this pull request Aug 12, 2026
…lim image; dedupe jar surgery across Dockerfiles (open-metadata#30751)" (open-metadata#31074)

This reverts commit 279c8e9.
k-anshul pushed a commit to k-anshul/OpenMetadata that referenced this pull request Aug 12, 2026
…es (open-metadata#31338)

* fix(security): clear the remaining fixable CVEs in the ingestion images

The 10 Aug scan of the release image reports 43 findings, only 5 of which have a
fix available; the other 38 are Debian packages with no upstream fix in bookworm.
This clears all 5.

black -- CVE-2026-31900 (Critical), CVE-2026-32274 (High), CVE-2024-21503 (Medium)

black is not installed in any release image; it is a dev extra only. The sole
occurrence on disk is spacy/tests/package/requirements.txt, a test fixture inside
the spaCy wheel that pins black==22.3.0 and that scanners parse as a dependency
manifest. Strip it after the final pip install in every image that ships spaCy.

This strip previously shipped inside patch_pyspark_jars.sh and was reverted along
with it in open-metadata#31074, because the jar-fetching half failed on sha mismatches. Nothing
in this script fetches anything. It also cannot fail a build: every path exits 0,
including python missing and an unexpected traceback, since the fixture is inert
data and not worth blocking a release over. Walking sys.path rather than resolving
spaCy once via find_spec is deliberate -- a user-site install shadows a
system-site one, and find_spec would strip only the shadowing copy while the
scanner kept reading the other, passing the build with the finding intact.

apache-airflow 3.2.2 -> 3.3.0 -- CVE-2026-48891 (Medium)

/ui/dependencies leaked Dag IDs the caller cannot read through the dep.source and
dep.target fields, a residual gap in the CVE-2026-28563 fix. The pin, both base
image tags, the vendored constraints file and the integration-test image move
together.

The constraints file is not a straight re-download. It carries two hand-patches
marked "keep on regeneration" -- impyla and thrift at 0.24.0 for CVE-2026-66053 /
CVE-2026-41608 / CVE-2026-48586 -- and upstream constraints-3.3.0 still ships
impyla==0.22.0 and thrift==0.16.0. Both are re-applied, so the file diverges from
upstream in exactly those two blocks and nothing else. A plain regeneration would
have traded one airflow CVE for three thrift ones.

setuptools 80.10.2 -> 84 -- CVE-2026-59890 (Medium)

The setuptools<81 pin guards two separate things. cx_Oracle's setup.py imports
pkg_resources, which 81.0.0 removed, and it has no cp312 wheel, so a source build
is mandatory; that half of the pin stays. The other half, sqlalchemy-redshift
0.8.14, no longer applies: 1.0.0 moved to importlib.metadata and setup.py has
pinned ~=1.0.0 since open-metadata#27776.

The 0.8.14 entries removed here are a regression rather than a decision. open-metadata#27776
deleted them from all three install sites; open-metadata#26896, branched before it and merged
after, then rewrote the same line to drop sqlalchemy-databricks and carried the
stale redshift entry back in. Being a single-line replacement, it merged without
conflict.

cx_Oracle and mysqlclient need pkg_resources only at build time -- once built,
both import cleanly against 84 -- so the lift becomes a final layer after the last
source build instead of replacing the pin.

Co-Authored-By: Claude Opus 5 <[email protected]>

* fix(security): address review on the ingestion CVE cleanup

Move the setuptools>=83 lift after `airflow db migrate` in both airflow images:
the lift removes pkg_resources and migrate runs Airflow's import chain. Migrate
is the last line in both files, so this costs nothing.

Fall back to python3 in strip_spacy_test_fixture.sh when no `python` shim exists;
without it the strip silently skips and the black findings survive a green build.
`python` stays first -- pip installs into whichever interpreter it resolves to.

Co-Authored-By: Claude Opus 5 <[email protected]>

---------

Co-authored-by: Claude Opus 5 <[email protected]>

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

Ingestion safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants