Skip to content

Commit 6973051

Browse files
mohittilalaanuj-kumary
authored andcommitted
Fix: [Snyk] bump ingestion security dependencies to clear high/critical CVEs (#28623)
* bump ingestion security dependencies to clear Snyk high/critical CVEs * pin tableauserverclient==0.40 for urllib3 2.x alignment * floor cryptography>=46.0.5 to make CVE-2026-26007 fix mandatory * fix: resolve basedpyright errors from urllib3 2.x and tableauserverclient 0.40 stubs (cherry picked from commit 8a106c8)
1 parent 26d5ae1 commit 6973051

3 files changed

Lines changed: 20 additions & 26 deletions

File tree

ingestion/setup.py

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,10 @@
5555
"spacy": "spacy<3.8",
5656
"looker-sdk": "looker-sdk>=22.20.0,!=24.18.0",
5757
"lkml": "lkml~=1.3",
58-
"tableau": "tableauserverclient==0.25", # higher versions require urllib3>2.0 which conflicts other libs
58+
"tableau": "tableauserverclient==0.40", # pre-0.37 pins urllib3<2, which conflicts with collate-data-diff's urllib3>=2.7
5959
"pyhive": "pyhive[hive_pure_sasl]~=0.7",
6060
"mongo": "pymongo~=4.3",
61-
"snowflake": "snowflake-sqlalchemy>=1.6.1",
62-
"snowflake-connector": "snowflake-connector-python~=3.18.0",
61+
"snowflake": "snowflake-sqlalchemy>=1.8.0", # <1.8 caps snowflake-connector-python at <4, but we need 4.x for pyOpenSSL 26 (CVE-2026-27459)
6362
"elasticsearch8": "elasticsearch8~=8.9.0",
6463
"giturlparse": "giturlparse",
6564
"validators": "validators~=0.22.0",
@@ -113,7 +112,9 @@
113112
"fastavro>=1.2.0",
114113
# Due to https://github.com/grpc/grpc/issues/30843#issuecomment-1303816925
115114
# use >= v1.47.2 https://github.com/grpc/grpc/blob/v1.47.2/tools/distrib/python/grpcio_tools/grpc_version.py#L17
116-
VERSIONS["grpc-tools"], # grpcio-tools already depends on grpcio. No need to add separately
115+
VERSIONS[
116+
"grpc-tools"
117+
], # grpcio-tools already depends on grpcio. No need to add separately
117118
"protobuf>=5.29.6", # CVE-2026-0994 JSON recursion depth bypass
118119
},
119120
"postgres": {
@@ -153,7 +154,7 @@
153154
"cached-property==1.5.2", # LineageParser
154155
"cachetools", # Used to cache masked queries in ingestion/src/metadata/ingestion/lineage/masker.py
155156
"chardet==4.0.0", # Used in the profiler
156-
"cryptography>=42.0.0",
157+
"cryptography>=46.0.5", # CVE-2026-26007
157158
"google-cloud-secret-manager==2.24.0",
158159
"google-crc32c",
159160
"email-validator>=2.0", # For the pydantic generated models for Email
@@ -177,24 +178,20 @@
177178
"requests>=2.23",
178179
"requests-aws4auth~=1.1", # Only depends on requests as external package. Leaving as base.
179180
"sqlalchemy>=2.0.0,<3",
180-
"collate-sqllineage>=2.0.2",
181+
"collate-sqllineage>=2.1.3",
181182
"tabulate==0.9.0",
182183
"tenacity>=8.0,<10",
183184
"typing-inspect",
184185
"packaging", # For version parsing
185186
"setuptools>=78.1.1",
186187
"shapely",
187-
"collate-data-diff>=0.11.9",
188+
"collate-data-diff>=0.11.11",
188189
# Floor on dbt-extractor (transitive via collate-data-diff -> dbt-core).
189190
# Pre-0.5 versions ship no cp310-manylinux_2_17_aarch64 wheel, forcing a
190191
# Rust/Cargo source build on ARM runners. 0.5+ uses cp38-abi3 wheels.
191192
"dbt-extractor>=0.5.0",
192193
"jaraco.functools<4.2.0", # above 4.2 breaks the build
193194
"jaraco.context>=6.1.0",
194-
# TODO: Remove one once we have updated datadiff version
195-
VERSIONS["snowflake-connector"],
196-
"mysql-connector-python>=8.0.29;python_version<'3.9'",
197-
"mysql-connector-python>=9.1;python_version>='3.9'",
198195
"httpx~=0.28.0",
199196
}
200197

@@ -264,10 +261,7 @@
264261
VERSIONS["databricks-sdk"],
265262
VERSIONS["databricks-sql-connector"],
266263
"ndg-httpsclient~=0.5.1",
267-
# CVE-2026-27459 (DTLS cookie callback BoF) wants pyOpenSSL>=26.0.0, but
268-
# snowflake-connector-python 3.18 (forced via base_requirements) pins
269-
# pyOpenSSL<26.0.0. Dismiss until snowflake stack supports connector 4.x.
270-
"pyOpenSSL>=24.3.0",
264+
"pyOpenSSL>=26.0.0", # CVE-2026-27459 DTLS cookie callback BoF
271265
"pyasn1>=0.6.3", # CVE-2026-30922 DoS via unbounded recursion
272266
},
273267
"datalake-azure": {

ingestion/src/metadata/ingestion/ometa/http_adapter.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"""
1515

1616
import socket
17+
from typing import Any
1718

1819
import requests
1920
from requests.adapters import DEFAULT_POOLBLOCK, HTTPAdapter
@@ -31,7 +32,7 @@ def _socket_optname(name: str) -> int:
3132
return getattr(socket, name, -1)
3233

3334

34-
def build_keepalive_socket_options() -> list[tuple[int, int, int]]:
35+
def build_keepalive_socket_options() -> list[tuple[int, int, int | bytes]]:
3536
"""TCP keepalive socket options, guarded for platform differences."""
3637
options = list(HTTPConnection.default_socket_options) + [(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)]
3738

@@ -62,14 +63,14 @@ def build_transport_retry() -> Retry:
6263
)
6364

6465

65-
_KEEPALIVE_SOCKET_OPTIONS: list[tuple[int, int, int]] = build_keepalive_socket_options()
66+
_KEEPALIVE_SOCKET_OPTIONS: list[tuple[int, int, int | bytes]] = build_keepalive_socket_options()
6667

6768

6869
class KeepAliveRetryAdapter(HTTPAdapter):
6970
"""HTTPAdapter that enables TCP keepalive on every pooled connection."""
7071

7172
def init_poolmanager(
72-
self, connections: int, maxsize: int, block: bool = DEFAULT_POOLBLOCK, **pool_kwargs: object
73+
self, connections: int, maxsize: int, block: bool = DEFAULT_POOLBLOCK, **pool_kwargs: Any
7374
) -> None:
7475
"""Build the pool manager with keepalive socket options applied."""
7576
pool_kwargs["socket_options"] = _KEEPALIVE_SOCKET_OPTIONS

ingestion/src/metadata/ingestion/source/dashboard/tableau/client.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212
Wrapper module of TableauServerConnection client
1313
"""
14+
1415
import math
1516
import traceback
1617
from typing import Callable, Dict, Iterable, List, Optional, Tuple, Union
@@ -107,17 +108,17 @@ def site_id(self) -> str:
107108
return self.tableau_server.site_id
108109

109110
def get_tableau_owner(
110-
self, owner_id: str, include_owners: bool = True
111-
) -> Optional[TableauOwner]:
111+
self, owner_id: Optional[str], include_owners: bool = True
112+
) -> Optional[TableauOwner]: # noqa: UP045
112113
"""
113114
Get tableau owner with optional include_owners flag
114115
"""
115116
try:
116-
if not include_owners:
117+
if not include_owners or not owner_id:
117118
return None
118119
if owner_id in self.owner_cache:
119120
return self.owner_cache[owner_id]
120-
owner = self.tableau_server.users.get_by_id(owner_id) if owner_id else None
121+
owner = self.tableau_server.users.get_by_id(owner_id)
121122
if owner:
122123
owner_obj = TableauOwner(
123124
id=str(owner.id), name=owner.name, email=owner.email
@@ -283,13 +284,11 @@ def test_site_url(self):
283284
"""
284285
validation = validators.url(self.config.siteName)
285286
if validation:
286-
raise ValueError(
287-
f"""
287+
raise ValueError(f"""
288288
The site url "{self.config.siteName}" is in incorrect format.
289289
If "https://xxx.tableau.com/#/site/MarketingTeam/home" represents the homepage url for your tableau site,
290290
the "MarketingTeam" from the url should be entered in the Site Name and Site Url fields.
291-
"""
292-
)
291+
""")
293292
return True
294293

295294
def test_get_datamodels(self):

0 commit comments

Comments
 (0)