Skip to content

[SNOW-4556538] Exclude snappy-java from shaded SDK jar - #1181

Open
sfc-gh-alhuang wants to merge 1 commit into
masterfrom
alhuang-snow-4556538-exclude-snappy-java
Open

sfc-gh-alhuang wants to merge 1 commit into
masterfrom
alhuang-snow-4556538-exclude-snappy-java

Conversation

@sfc-gh-alhuang

Copy link
Copy Markdown
Contributor

snowflake-ingest-sdk 4.4.x shades snappy-java 1.1.10.5, which scanners flag for CVE-2026-90559, CVE-2026-93451 and CVE-2026-93452 (snappy-java through 1.1.10.8). Since the classes are relocated, downstream consumers cannot override the version.

The SDK never uses Snappy:

  • BDEC/Iceberg Parquet compression is restricted to GZIP / ZSTD (Constants.BdecParquetCompression), validated by ParameterProvider.getBdecParquetCompressionAlgorithm().
  • The SDK only writes Parquet and never decompresses, so the vulnerable uncompress paths are unreachable.
  • In the 4.4.5 shaded jar, the only classes referencing org.xerial.snappy are the Parquet/Hadoop/Avro Snappy codec classes, which are only loaded when the SNAPPY codec is requested.

Changes:

  • Exclude snappy-java from hadoop-common and parquet-hadoop (the only paths that pull it in).
  • Drop the direct runtime dependency added in SNOW-936900 Use upgraded version of snappy-java #605 (SNOW-936900), along with its managed version and snappy.version.
  • Add a linkage-checker exclusion for org.xerial.snappy, following the existing XZ entry.

Related: #1178 (jackson-dataformat-cbor exclusion for the same customer scan).

🤖 Generated with Claude Code

Co-Authored-By: Claude Code <noreply@anthropic.com>
@sfc-gh-alhuang
sfc-gh-alhuang requested review from a team as code owners November 20, 2026 22:29
@codecov-commenter

codecov-commenter commented Nov 20, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 62.02%. Comparing base (25b0fbf) to head (2ee0984).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1181      +/-   ##
==========================================
+ Coverage   61.98%   62.02%   +0.04%     
==========================================
  Files         214      214              
  Lines       14676    14676              
  Branches     1614     1614              
==========================================
+ Hits         9097     9103       +6     
+ Misses       4863     4859       -4     
+ Partials      716      714       -2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants