Repository navigation
Revert "fix(ingestion): patch PySpark-bundled CVE jars - #31074
Conversation
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
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 |
There was a problem hiding this comment.
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.shhardening 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. |
@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 |
✅ Playwright Results — workflow succeededValidated commit ✅ 107 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking 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:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
|
Code Review
|
| Verbose |
|
Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source
…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]>
…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]>
…lim image; dedupe jar surgery across Dockerfiles (open-metadata#30751)" (open-metadata#31074) This reverts commit 279c8e9.
…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]>



Describe your changes:
Type of change:
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:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.