fix(wren-ai-service): resolve all open dependabot alerts (39 high, 12 medium) - #2680
Conversation
… medium)
Bumps the 10 packages behind every open dependabot alert on
wren-ai-service/poetry.lock, pinning the four transitive ones so the lock
cannot drift back below the patched version.
Declared deps:
sqlparse 0.5.5 -> 0.6.0 lexer/grouping/comment quadratic DoS
aiohttp 3.13.4 -> 3.14.3 OOB heap read in C HTTP response parser
litellm 1.83.14 -> 1.95.1 MCP auth bypass via OAuth2 passthrough
nltk 3.9.3 -> 3.10.3 path traversal, SSRF filter bypass, ReDoS
gitpython 3.1.45 -> 3.1.59 git option injection / arbitrary file write
pillow 12.1.1 -> 12.3.0 heap OOB writes, decompression-bomb DoS
Newly pinned transitive deps, each in the group where its consumer lives so
the pin does not add anything to the runtime image:
pyasn1 0.6.2 -> 0.6.4 main (google-auth, rsa, pyasn1-modules)
h2 4.3.0 -> 4.4.1 main (httpx[http2] via qdrant-client)
tornado 6.5.2 -> 6.5.8 dev (streamlit, ipykernel, jupyter-client)
setuptools 80.9.0 -> 84.0.0 dev (deepeval, locust)
Dependabot reads poetry.lock, which records one version per package
regardless of group, so the dev-group pins close their alerts while
`poetry install --without dev,eval,test` (docker/Dockerfile) keeps
tornado and setuptools out of the image, as before this change.
The lock moves 12 packages in total: the 10 above plus hpack (h2's dep)
and defusedxml (new nltk dep). Nothing else changed.
Verified with `pytest --ignore tests/pytest/test_usecases.py` against a
throwaway Qdrant v1.15.0 and a live OPENAI_API_KEY: 95 passed, 4 skipped
(pre-existing @pytest.mark.skip in test_ask.py), 0 failed. Beyond that:
- litellm: the suite covers neither streaming nor the Router fallback, so
both were driven directly against the API. Streaming yields chunks that
connect_chunks joins correctly; a Router with mock_testing_fallbacks
serves from the fallback model; the normal Router path serves from the
primary. Response fields build_message/build_chunk read (model, index,
finish_reason, usage) are all still populated.
- aiohttp: only ClientSession, ClientTimeout, ClientError and
aiohttp.request are used, none of which 3.14 changed -- its removals are
server-side. WrenUI and WrenIbis were round-tripped against an
in-process server: query args and JSON bodies unchanged, the
x-wren-fallback_disable header still arrives, a slow response still
raises asyncio.TimeoutError, and a refused connection still raises an
aiohttp.ClientError subclass so the backoff decorators still retry.
- sqlparse: 21 statements x 3 call shapes diffed between 0.5.5 and 0.6.0.
The only difference is ALTER TABLE ... ROW_FORMAT=, which 0.6.0 now
recognises as a keyword; this service formats SELECT queries. split() is
not used, so the splitter rewrite is not on any path.
- nltk: word_tokenize output is identical on 5 statements. Only
word_tokenize and download("punkt_tab") are used.
- gitpython: the CVE fixes work by rejecting unsafe git options, but the
only usage is Repo(search_parent_directories=True) with active_branch
and head.commit in eval/prediction.py, which takes no options.
- setuptools 84 removes pkg_resources. Every reference to it under
site-packages sits behind a try/except ImportError; litellm's is the
only one on a runtime path and prefers importlib.resources, which works
on 3.12. litellm, tiktoken, pytz, numpy, pandas, pyarrow, wrapt,
werkzeug, matplotlib, sentry_sdk, locust, streamlit and dspy all import
cleanly.
One user-visible change: litellm 1.95 logs `register_model: model=... not
in built-in cost map` when a Router is constructed. The string does not
exist in 1.83.14, so this is new log noise, not a behaviour change.
tests/pytest/eval/test_metrics.py still fails to collect: eval/metrics/
accuracy.py imports TestResult from deepeval.evaluate, which lives in
deepeval.evaluate.types since deepeval 3.x. deepeval is 3.8.8 both before
and after this change, so that break is pre-existing and left alone.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
CI note: the
|
Closes every open dependabot alert on
wren-ai-service/poetry.lock— 39 high and 12 medium, all of which sit on 10 packages. The last commit to touch this lock was e42b8d0 (2026-05-04), so the backlog is ~3 months of advisories.What changes for a user
Nothing in the service's behaviour, with one exception: litellm 1.95 logs
register_model: model=... not in built-in cost mapwhenever aRouteris constructed. That string does not exist in 1.83.14, so it is new log noise, not a behaviour change.Versions
Declared deps:
Newly pinned transitive deps, each placed in the group where its consumer lives so the pin adds nothing to the runtime image:
Dependabot reads
poetry.lock, which records one version per package regardless of group, so the dev-group pins close their alerts whilepoetry install --without dev,eval,test(docker/Dockerfile:15) keeps tornado and setuptools out of the image, as before this change. Confirmed via thegroupsmetadata in the lock.The lock moves 12 packages in total: the 10 above plus
hpack(h2's dep) anddefusedxml(new nltk dep). Nothing else changed.Verification
pytest --ignore tests/pytest/test_usecases.pyagainst a throwaway Qdrant v1.15.0 and a liveOPENAI_API_KEY: 95 passed, 4 skipped, 0 failed. The 4 skips are pre-existing@pytest.mark.skipintest_ask.py.Because the suite does not reach every upgraded package, each was checked against the surface this repo actually uses:
Routerfallback, so both were driven against the API directly. Streaming produced chunks thatconnect_chunksjoined correctly; aRouterwithmock_testing_fallbacksserved from the fallback model; the normalRouterpath served from the primary. The response fieldsbuild_message/build_chunkread (model,index,finish_reason,usage) are all still populated, andaembedding'sresponse.data[i]["embedding"]subscript still works.ClientSession,ClientTimeout,ClientErrorandaiohttp.request; 3.14's removals are server-side (web.BaseRequest.hostgetfqdn fallback), plus the Python 3.9 drop and header control-char tightening (the only custom header here is the staticx-wren-fallback_disable).WrenUIandWrenIbiswere round-tripped against an in-process server: query args and JSON bodies unchanged, the header still arrives, a slow response still raisesasyncio.TimeoutErrorand returns the same tuple, and a refused connection still raises anaiohttp.ClientErrorsubclass so thebackoffdecorators still retry.ALTER TABLE ... ROW_FORMAT=, which 0.6.0 now recognises as a keyword; this service formats SELECT queries.split()is not used, so the splitter rewrite is not on any path.word_tokenizeoutput is identical on 5 statements. Onlyword_tokenizeanddownload("punkt_tab")are used, both ineval/metrics/spider.Repo(search_parent_directories=True)withactive_branchandhead.commitineval/prediction.py, which passes no options.pkg_resources. Every reference to it under site-packages sits behind atry/except ImportError; litellm's is the only one on a runtime path and prefersimportlib.resources, which works on 3.12. litellm, tiktoken, pytz, numpy, pandas, pyarrow, wrapt, werkzeug, matplotlib, sentry_sdk, locust, streamlit and dspy all import cleanly._load_image_from_url, used for Bedrock/Vertex image conversion.qdrant_clientdefaultshttp2=Falseand the repo never overrides it, so h2 is installed but not executed.Not covered
tests/pytest/test_usecases.pywas not run;just testignores it and it needs a full stack.Pre-existing, left alone
tests/pytest/eval/test_metrics.pystill fails to collect:eval/metrics/accuracy.pyimportsTestResultfromdeepeval.evaluate, which has lived indeepeval.evaluate.typessince deepeval 3.x. deepeval is 3.8.8 both before and after this change, so the break predates it (introduced by e7db92e).🤖 Generated with Claude Code