Bump snowflake-connector-python to 4.7.3 (CVE-2026-15925) and add query runner tests - #7806
Open
madmuffin1 wants to merge 1 commit into
Open
madmuffin1 wants to merge 1 commit into
madmuffin1 wants to merge 1 commit into
Conversation
snowflake-connector-python 4.5.0 is affected by CVE-2026-15925 (CRITICAL). Bump to 4.7.3, which is both past the 4.7.1 fixed version and the current release. The Snowflake query runner had no test coverage, so add tests for the logic that a connector upgrade could plausibly affect: * determine_type / TYPES_MAP, including the scale > 0 -> float rule * connection parameters: the us-west region special case, region-in-host derivation, explicit host override, password auth and key pair auth (plain and password-encrypted), and the missing-credentials error * run_query: column and row parsing, the USE WAREHOUSE / USE <db> preamble, lower_case_columns, and cursor and connection cleanup when execute raises * get_schema: grouping by schema.table, skipping non-COLUMN rows, and SHOW COLUMNS vs SHOW COLUMNS IN DATABASE The tests patch snowflake.connector.connect and drive the runner through fake cursor and connection objects, following the existing style in tests/query_runner/test_athena.py. Relocking also picks up the redash version change from the 26.09.0-dev snapshot, which the lockfile had not caught up with yet. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Greptile SummaryThe PR upgrades
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issues identified. The upgraded connector matches the repository’s supported runtime and existing DB-API usage, resolves the targeted vulnerability, and the new tests are collected in CI with the required optional dependency installed.
|
| Filename | Overview |
|---|---|
| pyproject.toml | Updates the pinned Snowflake connector to a Python 3.13-compatible version beyond the stated security fix. |
| tests/query_runner/test_snowflake.py | Adds well-scoped unit coverage whose fakes match the query runner’s exercised cursor and connection contracts. |
| uv.lock | Resolves connector 4.7.3 with matching artifacts and updates the project version metadata without changing other dependency versions. |
Reviews (1): Last reviewed commit: "Bump snowflake-connector-python to 4.7.3..." | Re-trigger Greptile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
Description
snowflake-connector-pythonis currently pinned to4.5.0, which is affected by CVE-2026-15925 (CRITICAL). This bumps the pin to 4.7.3 — past the4.7.1fixed version, and the current release at time of writing.Compatible versions: the query runner uses only the DB-API surface of
snowflake.connector(connect,cursor,execute,description,close), which is unchanged across4.5.0→4.7.3.The Snowflake query runner had no test coverage at all, so this also adds
tests/query_runner/test_snowflake.pycovering the logic a connector upgrade could plausibly affect:determine_type/TYPES_MAP, including thescale > 0→ float ruleus-westregion special case, region-in-host derivation, explicithostoverride, password auth and key pair auth (plain and password-encrypted), and the missing-credentials errorrun_query— column and row parsing, theUSE WAREHOUSE/USE <db>preamble,lower_case_columns, and cursor/connection cleanup whenexecuteraisesget_schema— grouping byschema.table, skipping non-COLUMNrows, andSHOW COLUMNSvsSHOW COLUMNS IN DATABASEThe tests patch
snowflake.connector.connectand drive the runner through fake cursor/connection objects, following the existing style intests/query_runner/test_athena.py. No new dependencies.Note on the lockfile: re-running
uv lockalso picks up theredashversion change from the26.09.0-devsnapshot, which the committed lockfile had not caught up with yet. That line is unrelated to this change.How is this tested?
17 new tests, all passing against
4.7.3. They also pass against the old4.5.0, confirming the bump is not a behaviour change on these paths.Additionally, the type-code mapping was verified out-of-tree against a real connector
4.7.3talking the actual Snowflake wire protocol to a fakesnow server, feeding the resulting cursor to the runner's own_parse_results. Every code still maps asTYPES_MAPexpects:That check is not included in the test suite: fakesnow requires
duckdb~=1.5.5while this repo pinsduckdb==1.3.2for the DuckDB runner, so the two cannot currently coexist. It also does not implementUSE WAREHOUSE, bareUSE <db>, orSHOW COLUMNS IN DATABASE, so it cannot driverun_query/get_schemaend to end regardless.Related Tickets & Documents
CVE-2026-15925
Mobile & Desktop Screenshots/Recordings (if there are UI changes)
N/A — no UI changes.