Skip to content

fix(ingestion): patch PySpark-bundled CVE jars in ingestion-slim image; dedupe jar surgery across Dockerfiles - #30751

Merged
harshsoni2024 merged 6 commits into
mainfrom
fix/patch_pyspark_jars_ingestion_slim
Aug 3, 2026
Merged

fix(ingestion): patch PySpark-bundled CVE jars in ingestion-slim image; dedupe jar surgery across Dockerfiles#30751
harshsoni2024 merged 6 commits into
mainfrom
fix/patch_pyspark_jars_ingestion_slim

Conversation

@harshsoni2024

@harshsoni2024 harshsoni2024 commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Describe your changes

AWS Inspector flagged CRITICAL CVEs on the ingestion-slim image.

Every flagged Java finding traced to PySpark's bundled jars under
.../site-packages/pyspark/jars/ — not to pom.xml (the slim image compiles no
Java; the jars come from the deltalake/pyspark pip dependency).

What changed

  • New shared script ingestion/scripts/patch_pyspark_jars.sh — the jar
    surgery, extracted so the airflow and slim images can no longer drift. It is
    SHA256-pinned and self-guarding (no-op when PySpark isn't installed).
  • Wired into all four ingestion Dockerfiles — the two airflow Dockerfiles
    drop their ~30-line inline block for a 4-line call to the shared script; the
    two slim Dockerfiles gain the patch for the first time.
  • Slim images also strip spacy/tests/package/requirements.txt — a spacy CI
    test fixture that pins an old black, which scanners misreport as an installed
    package (CVE-2026-31900). The file is test-only, never imported at runtime.

CVEs resolved

CVE Component Fix
CVE-2023-44981 zookeeper 3.6.3 → 3.7.2
CVE-2019-10202 jackson-mapper/core-asl 1.9.13 removed (no upstream fix)
CVE-2026-42581 netty-codec-http 4.1.96 → 4.1.135.Final
CVE-2026-42584 netty-codec-http 4.1.96 → 4.1.135.Final
CVE-2026-31900 black (phantom) spacy test fixture removed

netty stays on the 4.1.x line (both CVEs fixed in 4.1.133.Final) to keep
binary compatibility with PySpark's ~18 sibling netty 4.1.96 jars — a 4.2.x jump
would risk a LinkageError.

Documented residuals (no drop-in fix for this runtime)

  • CVE-2022-46337 (derby 10.14.2.0) — the only fixed release (10.17.1.0) needs
    Java 21; the image ships Java 17. No Java-17 backport exists upstream. The
    vulnerable path is Derby's LDAP authenticator, which OM's embedded metastore
    never uses.
  • CVE-2026-2332 (jetty 9.4.x) — shaded (relocated) inside PySpark's
    hadoop-client-runtime / spark-core uber-jars as ~2,600 loose class files,
    not a swappable standalone jar. "Fixed in 12.1.7" is a 3-major rewrite
    (Jakarta EE) that Hadoop/Spark 3.5 can't run on. Clears on a future PySpark bump.
  • CVE-2026-13221 / 57433 / 12087 (perl) — Debian OS CVEs with no upstream fix
    yet; already covered by the --only-upgrade block (no-op until Debian ships it).

Type of change

  • Bug fix (non-breaking change which fixes an issue)

How was this tested

Built the slim CI image locally (ingestion/operators/docker/Dockerfile.ci) and
verified in-image:

  • pyspark/jars/ now has zookeeper-3.7.2.jar, netty-codec-http-4.1.135.Final.jar,
    and no jackson-*-asl jars; derby-10.14.2.0.jar intentionally retained.
  • spacy/tests/**/requirements.txt is gone.
  • python -c "import pyspark; from pyspark.sql import SparkSession" succeeds —
    confirming the netty swap doesn't break Spark.

Note: findings clear only once a fresh ingestion-slim image is built from this
branch and re-scanned (the Inspector report was against a previously-published
image).

Checklist

  • I have performed a self-review of my code
  • My changes generate no new warnings
  • I have added tests / screenshots (N/A — Dockerfile/CVE change)

🤖 Generated with Claude Code

Greptile Summary

The PR centralizes PySpark dependency remediation in a shared image-build script.

  • Replaces duplicated ZooKeeper patch steps in the Airflow ingestion images.
  • Applies ZooKeeper, Netty, Jackson, and spaCy scanner remediation to both slim ingestion images.
  • Distinguishes absent PySpark installations from broken installations and verifies downloaded jars with pinned SHA-256 hashes.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
ingestion/scripts/patch_pyspark_jars.sh Adds the shared, checksum-verified PySpark jar replacement and spaCy fixture cleanup logic.
ingestion/Dockerfile Replaces the duplicated inline ZooKeeper patch with the shared remediation script.
ingestion/Dockerfile.ci Replaces the CI image’s duplicated inline patch with the shared remediation script.
ingestion/operators/docker/Dockerfile Adds the shared remediation step to the production slim ingestion image.
ingestion/operators/docker/Dockerfile.ci Adds the shared remediation step to the CI slim ingestion image.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  D1[Airflow Dockerfile] --> S[patch_pyspark_jars.sh]
  D2[Airflow CI Dockerfile] --> S
  D3[Slim Dockerfile] --> S
  D4[Slim CI Dockerfile] --> S
  S --> P{PySpark installed?}
  P -->|No| K[Skip jar patch]
  P -->|Broken| F[Fail image build]
  P -->|Yes| J[Remove vulnerable bundled jars]
  J --> V[Download SHA-256-pinned replacements]
  S --> X[Remove spaCy scanner fixture]
Loading

Reviews (6): Last reviewed commit: "fix: spacy cleanup" | Re-trigger Greptile

…park jar surgery

The ingestion-slim image (ingestion/operators/docker/Dockerfile*) shipped
vulnerable jars bundled by PySpark 3.5.6 that the earlier CVE fix (#30516)
never patched — that fix only touched the airflow image (ingestion/Dockerfile*),
so the PySpark jar surgery never reached the slim image. AWS Inspector kept
flagging zookeeper, jackson-asl, netty, and a phantom black finding on it.

Extract the jar patch into a single SHA256-pinned script and run it in all four
ingestion Dockerfiles so the two images can no longer drift:

  - zookeeper 3.6.3 -> 3.7.2          CVE-2023-44981 (SASL quorum auth bypass)
  - jackson-mapper/core-asl 1.9.13    CVE-2019-10202 (removed; no upstream fix)
  - netty-codec-http 4.1.96 -> 4.1.135  CVE-2026-42581 / CVE-2026-42584
    (both fixed in 4.1.133.Final; staying on the 4.1.x line keeps binary
    compatibility with PySpark's sibling netty 4.1.96 jars — verified pyspark
    and SparkSession still import)

Also strip spacy's bundled tests/package/requirements.txt from the slim images:
it pins an old black that scanners misreport as an installed package
(CVE-2026-31900). The file is test-only and never imported at runtime.

Left as documented residuals (no drop-in fix for this runtime):
  - derby 10.14.2.0 (CVE-2022-46337): only fix needs Java 21, image is Java 17;
    vulnerable LDAP path unused
  - jetty 9.4.x (CVE-2026-2332): shaded inside hadoop-client-runtime / spark-core
    uber-jars, not a swappable standalone jar; clears on a future pyspark bump

Verified against a local build of the slim CI image: patched jars present,
jackson-asl and the black fixture gone, pyspark imports cleanly.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@harshsoni2024
harshsoni2024 requested a review from a team as a code owner July 31, 2026 09:13
Copilot AI review requested due to automatic review settings July 31, 2026 09:13
@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.

@harshsoni2024 harshsoni2024 added the skip-pr-checks Bypass PR metadata validation check label Jul 31, 2026
@github-actions github-actions Bot added Ingestion safe to test Add this label to run secure Github workflows on PRs labels Jul 31, 2026
Comment thread ingestion/scripts/patch_pyspark_jars.sh
Comment thread ingestion/scripts/patch_pyspark_jars.sh

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 closes a security gap where PySpark-bundled vulnerable JARs were previously patched only in the Airflow ingestion images, leaving the ingestion-slim images still carrying the flagged CVEs. It extracts the JAR “surgery” into a shared script and wires it into both image families to prevent future drift.

Changes:

  • Adds a shared, SHA256-pinned script to patch/remove vulnerable PySpark-bundled JARs (ZooKeeper, Jackson ASL, Netty codec-http).
  • Replaces the previously inlined Airflow-image patch block with a call to the shared script.
  • Applies the patch for the first time to ingestion-slim images and removes a spacy test-fixture requirements.txt that triggers a phantom scanner finding.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
ingestion/scripts/patch_pyspark_jars.sh New shared script to patch/remove vulnerable PySpark-bundled JARs with SHA256 verification.
ingestion/Dockerfile Replaces inline jar patch logic with a call to the shared patch script.
ingestion/Dockerfile.ci Replaces inline jar patch logic with a call to the shared patch script.
ingestion/operators/docker/Dockerfile Adds shared patch script invocation + removes spacy test fixture requirements file in slim image.
ingestion/operators/docker/Dockerfile.ci Adds shared patch script invocation + removes spacy test fixture requirements file in slim CI image.

Comment thread ingestion/scripts/patch_pyspark_jars.sh
ayush-shah
ayush-shah previously approved these changes Jul 31, 2026
Copilot AI review requested due to automatic review settings July 31, 2026 10:57

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.

Suppressed comments (1)

ingestion/scripts/patch_pyspark_jars.sh:20

  • The header comment’s Netty version string doesn’t match the actual jar being fetched (netty-codec-http-4.1.135.Final.jar). This can mislead future updates/audits; align the comment with the real artifact/version suffix (Final).
#   netty-codec-http 4.1.96 -> 4.1.135  CVE-2026-42581 / CVE-2026-42584 (HTTP request smuggling);
#                                    both fixed in 4.1.133.Final, so staying on the 4.1.x line keeps
#                                    binary compatibility with PySpark's sibling netty 4.1.96 jars.

@ayush-shah

Copy link
Copy Markdown
Member

@harshsoni2024 I reviewed the current head (933a30e) end to end. Centralizing the JAR remediation is a good direction, the downloads are SHA-256 pinned, and the script itself passed Linux/Java runtime smoke tests for Hive, Netty HTTP codecs, and the conflicting Content-Length / Transfer-Encoding rejection.

I think the following need to be addressed before merge:

  1. [P1] The final Collate ingestion-slim release image reintroduces the vulnerable JARs after this patch runs. The upstream base-slim image is built with INGESTION_DEPENDENCY=slim, which does not install PySpark, so patch_pyspark_jars.sh exits successfully without doing anything. The Collate release then derives from that image and installs .[all]; Collate's all extra adds pyspark[connect]~=3.5 after the patch script has run and been removed. The resulting AWS-scanned image therefore still contains PySpark's bundled ZooKeeper 3.6.3, Jackson ASL 1.9.13, Netty 4.1.96, etc. Please run/preserve the remediation after the final PySpark installation in the actual release chain, then verify the final image inventory.

  2. [P1] The named OSS openmetadata/ingestion-slim image still keeps the spaCy test-requirements fixture. That image is published from ingestion/Dockerfile, but the fixture cleanup was added only to the operator Dockerfiles. If the intended behavior is that slim images strip this scanner-only fixture, the cleanup also needs to happen in the Dockerfile that publishes openmetadata/ingestion-slim (or the PR description should narrow the claim).

  3. [P2] The PySpark detection fails open on every import error. python ... 2>/dev/null || true treats a broken installed PySpark exactly like PySpark being absent, allowing an image with unpatched JARs to ship successfully. Please distinguish “module genuinely absent” from “module installed but cannot be imported”; the latter should fail the build.

Please also add an exact release-chain regression check that builds the final slim target and asserts: old vulnerable JARs are absent, replacement JAR hashes match, the scanner-only fixture is absent, and an unexpected PySpark import failure fails the build. The current operator build job exercises the default all target, not the base-slim → downstream Collate installation order that exposes the main issue.

Separately, repository guidance asks bug-fix PRs to include a linked issue and a regression test; this PR currently has neither (the metadata check was bypassed with skip-pr-checks).

Recommendation: request changes, primarily because the final shipped release image can still contain the vulnerabilities this PR intends to remediate.

@github-actions

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 933a30e0e3693e3d00d3b86aab2722186ec771b5 in Playwright run 30625330834, attempt 1.

✅ 107 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 3 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 39s

⏱️ Max setup 2m 57s · max shard execution 11m 48s · max shard-job elapsed before upload 17m 55s · reporting 3s

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

Optimization targets still in progress:

  • Browser traffic was 208.1 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 1.76 per UI scenario (209 boots / 119 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 46 0 0 3 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

…cleanup into jar patch

Address review feedback on the PySpark CVE-jar remediation:

- Detection no longer fails open. Previously `python -c 'import pyspark' 2>/dev/null
  || true` treated a broken-but-installed pyspark the same as an absent one, letting
  an image with unpatched jars ship silently. The script now distinguishes three
  cases via exit code: genuinely absent (skip), installed-but-unimportable (fail the
  build), importable (patch).

- Fold the spaCy test-fixture cleanup (spacy/tests/**/requirements.txt, the phantom
  black CVE-2026-31900) into patch_pyspark_jars.sh so it runs wherever the patch runs,
  and drop the separate per-Dockerfile `find ... -delete` RUN lines that could drift.

Self-guarding and idempotent: no-op when pyspark is absent (INGESTION_DEPENDENCY=slim
builds), active when present (default `all`).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 31, 2026 12:35
Comment thread ingestion/scripts/patch_pyspark_jars.sh
Comment thread ingestion/scripts/patch_pyspark_jars.sh Outdated
Copilot AI review requested due to automatic review settings July 31, 2026 13:03

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 1 comment.

Suppressed comments (1)

ingestion/scripts/patch_pyspark_jars.sh:20

  • The header comment says netty-codec-http is patched to "4.1.135", but the script actually installs netty-codec-http-4.1.135.Final.jar. Aligning the comment to the exact artifact version avoids confusion when auditing scanner results.
#   netty-codec-http 4.1.96 -> 4.1.135  CVE-2026-42581 / CVE-2026-42584 (HTTP request smuggling);
#                                    both fixed in 4.1.133.Final, so staying on the 4.1.x line keeps
#                                    binary compatibility with PySpark's sibling netty 4.1.96 jars.

Comment thread ingestion/scripts/patch_pyspark_jars.sh Outdated
Copilot AI review requested due to automatic review settings July 31, 2026 13:11

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.

@ayush-shah

Copy link
Copy Markdown
Member

@harshsoni2024 I completed a follow-up review of the current head (2758bd0) together with companion Collate PR #5424.

The earlier functional blockers are substantially improved: installed-but-broken PySpark now fails closed, the shared script is invoked from all four OpenMetadata Dockerfiles, the replacement hashes match, and the Collate extension now invokes the remediation after its final .[all] install. I also validated the current logic with PySpark 3.5.9: the old JARs were absent, the replacements had the expected hashes, a Hive create/insert/select round trip passed, the mixed-version Netty HTTP codecs linked, and the conflicting Content-Length / Transfer-Encoding request was rejected.

The remaining changes I believe are needed before merge are:

  1. [P1] Commit and run the promised regression verifier. The response above says “Release-chain regression check — added” and names verify_pyspark_jar_patch.sh, but neither PR tree contains that file or equivalent CI wiring. Please commit a repeatable image-contract test covering: absent PySpark skips; broken PySpark and a missing JAR directory fail; old JARs are absent; replacement hashes match; the spaCy fixture is absent; and checksum failure fails the build. This is also required by the repository rule that bug fixes include a test that fails without the fix.

  2. [P2] Make the spaCy cleanup deterministic instead of silently best-effort. strip_spacy_scanner_fixture() suppresses both the spaCy import error and find -delete errors with || true. I reproduced an installed-but-import-broken spaCy package: the script exited 0 and left spacy/tests/package/requirements.txt in place, so the scanner finding can survive while the build succeeds. Please locate the package without importing it (for example with find_spec()), delete the fixture, and fail if a post-delete assertion still finds it. If best-effort behavior is intentional, the PR should not claim this CVE is unconditionally resolved.

  3. Complete the process requirements. There is still no linked issue, and skip-pr-checks remains applied. Please attach the issue, remove the bypass, and include the committed regression test before merge.

The JAR replacement itself looks sound based on the targeted runtime validation; my request-changes recommendation remains because the security invariants are still manual and the spaCy path can fail open.

Copilot AI review requested due to automatic review settings July 31, 2026 14:03
@harshsoni2024

Copy link
Copy Markdown
Contributor Author

@harshsoni2024 I completed a follow-up review of the current head (2758bd0) together with companion Collate PR #5424.

The earlier functional blockers are substantially improved: installed-but-broken PySpark now fails closed, the shared script is invoked from all four OpenMetadata Dockerfiles, the replacement hashes match, and the Collate extension now invokes the remediation after its final .[all] install. I also validated the current logic with PySpark 3.5.9: the old JARs were absent, the replacements had the expected hashes, a Hive create/insert/select round trip passed, the mixed-version Netty HTTP codecs linked, and the conflicting Content-Length / Transfer-Encoding request was rejected.

The remaining changes I believe are needed before merge are:

  1. [P1] Commit and run the promised regression verifier. The response above says “Release-chain regression check — added” and names verify_pyspark_jar_patch.sh, but neither PR tree contains that file or equivalent CI wiring. Please commit a repeatable image-contract test covering: absent PySpark skips; broken PySpark and a missing JAR directory fail; old JARs are absent; replacement hashes match; the spaCy fixture is absent; and checksum failure fails the build. This is also required by the repository rule that bug fixes include a test that fails without the fix.
  2. [P2] Make the spaCy cleanup deterministic instead of silently best-effort. strip_spacy_scanner_fixture() suppresses both the spaCy import error and find -delete errors with || true. I reproduced an installed-but-import-broken spaCy package: the script exited 0 and left spacy/tests/package/requirements.txt in place, so the scanner finding can survive while the build succeeds. Please locate the package without importing it (for example with find_spec()), delete the fixture, and fail if a post-delete assertion still finds it. If best-effort behavior is intentional, the PR should not claim this CVE is unconditionally resolved.
  3. Complete the process requirements. There is still no linked issue, and skip-pr-checks remains applied. Please attach the issue, remove the bypass, and include the committed regression test before merge.

The JAR replacement itself looks sound based on the targeted runtime validation; my request-changes recommendation remains because the security invariants are still manual and the spaCy path can fail open.

To briefly address above comments.
P1) verify_pyspark_jar_patch.sh was created only for the testing purpose. I'll update the PR description if there's mention of it
P2) for the spacy cleanup, identified & added fix for it.
P3) since this is more of the vul. level fix, I've not create separate bug/ticket for it. adding skip-pr-checks label should not be concerning

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.

Suppressed comments (1)

ingestion/scripts/patch_pyspark_jars.sh:20

  • The header comment says netty-codec-http is patched to 4.1.135, but the script actually fetches netty-codec-http-4.1.135.Final.jar. Aligning the documented version with the actual jar name avoids confusion when scanning image contents.
#   netty-codec-http 4.1.96 -> 4.1.135  CVE-2026-42581 / CVE-2026-42584 (HTTP request smuggling);
#                                    both fixed in 4.1.133.Final, so staying on the 4.1.x line keeps
#                                    binary compatibility with PySpark's sibling netty 4.1.96 jars.

@sonarqubecloud

Copy link
Copy Markdown

@ayush-shah
ayush-shah added this pull request to the merge queue Aug 3, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🚦 Removed from the merge queue — failed_checks (2026-08-03T07:47:51Z)

Blocked the queue: playwright-summary

  • Postgresql PR Playwright E2E Tests — playwright-summary, playwright-ci-postgresql (chromium-15), playwright-ci-postgresql (chromium-10), playwright-ci-postgresql (chromium-09)

@harshsoni2024
harshsoni2024 added this pull request to the merge queue Aug 3, 2026
Merged via the queue into main with commit 279c8e9 Aug 3, 2026
106 of 111 checks passed
@harshsoni2024
harshsoni2024 deleted the fix/patch_pyspark_jars_ingestion_slim branch August 3, 2026 19:26
@gitar-bot

gitar-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 4 resolved / 4 findings

Centralizes PySpark-bundled CVE jar remediation and spaCy test fixture cleanup into a shared, checksum-verified script applied across all ingestion Dockerfiles, addressing concerns around jar surgery duplication, netty compatibility, and build failure handling.

✅ 4 resolved
Edge Case: jackson-asl jars removed without replacement may break Hive path

📄 ingestion/scripts/patch_pyspark_jars.sh:52-54
Unlike zookeeper and netty (which are removed and re-fetched), jackson-mapper-asl / jackson-core-asl (org.codehaus.jackson.*) are deleted with no replacement jar. If any PySpark/Hive codepath reached via deltalake's .enableHiveSupport() loads those Jackson 1.x classes, it will throw NoClassDefFoundError at runtime. This is now newly applied to the slim images. The build verification (import pyspark; SparkSession) does not exercise this path, so a break would only surface at connector runtime. Recommend running an actual Hive-support/delta operation against a built slim image before publishing, since the airflow-image precedent only demonstrates import works, not the full Hive path.

Quality: netty 4.1.135 codec-http mixed with 4.1.96 siblings only import-tested

📄 ingestion/scripts/patch_pyspark_jars.sh:64-66 📄 ingestion/scripts/patch_pyspark_jars.sh:18-20
netty-codec-http is upgraded to 4.1.135.Final while its sibling netty jars remain at 4.1.96. Netty maintains binary compatibility within the 4.1.x line so this is low risk, but the verification (import pyspark; SparkSession) never exercises an HTTP-codec path, which is exactly where a version-skew LinkageError would surface. Suggest a runtime smoke test that actually triggers the netty HTTP stack (or at minimum classloading of netty-codec-http against the 4.1.96 core) before relying on this in production images.

Bug: spaCy fixture cleanup skipped when PySpark absent

📄 ingestion/scripts/patch_pyspark_jars.sh:64-66 📄 ingestion/scripts/patch_pyspark_jars.sh:100-108 📄 ingestion/operators/docker/Dockerfile:146 📄 ingestion/operators/docker/Dockerfile.ci:151
Folding the spaCy requirements.txt cleanup into patch_pyspark_jars.sh places it after the early exit 0 at lines 64-66 that triggers when PySpark is not installed. In the operators slim images the cleanup was previously a standalone RUN line independent of PySpark. spaCy (from pii-processor/sample-data extras) and PySpark (from deltalake) install independently, so a build with INGESTION_DEPENDENCY=pii-processor (or any spaCy-but-no-PySpark extra) now skips the strip and reintroduces the CVE-2026-31900 phantom finding the PR set out to remove. Move the spaCy cleanup so it runs regardless of the PySpark skip path (e.g. before the pyspark exit, or in its own function invoked on both branches).

Quality: find -delete can fail build (lost || true guard)

📄 ingestion/scripts/patch_pyspark_jars.sh:106-107
The removed inline spaCy cleanup used find ... -delete 2>/dev/null || true, but the new script at line 107 runs find ... -delete under set -euo pipefail with no error suppression. Any file it cannot delete (permission/read-only layer) now returns non-zero and aborts the build, whereas the fixture strip is best-effort. Restore the tolerant behavior, e.g. find "${SPACY_DIR}/tests" -name 'requirements.txt' -delete 2>/dev/null || true.

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

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.

4 participants