fix: bump litellm floor to 1.83.7 to clear SSTI advisory GHSA-xqmj-j6mv-4862#208
Open
scale-ballen wants to merge 2 commits intomainfrom
Open
fix: bump litellm floor to 1.83.7 to clear SSTI advisory GHSA-xqmj-j6mv-4862#208scale-ballen wants to merge 2 commits intomainfrom
scale-ballen wants to merge 2 commits intomainfrom
Conversation
…mv-4862 Aqua/trivy flagged `egp-mirror-int/agentex:*-fips` for HIGH advisory GHSA-xqmj-j6mv-4862 ("Server-Side Template Injection in /prompts/test endpoint") — vulnerable range `>= 1.80.5, < 1.83.7`, patched in `>= 1.83.7`. Current pin `litellm>=1.48.2,<2` resolved to 1.83.0 in the latest image build, which is in the vulnerable range. This change: - Bumps `litellm` floor in `agentex/pyproject.toml` from `>=1.48.2,<2` to `>=1.83.7,<2`. The new floor automatically dodges the litellm 1.82.7/1.82.8 supply-chain compromise (PR #195 was protecting against that with `<1.82.7`; this PR supersedes that need by setting the floor above those versions). - Widens the test extra `httpx[http2]` upper bound to `<0.29` because litellm 1.83.7 transitively requires `httpx==0.28.1`. - Adds a workspace `override-dependencies` entry for `httpx[http2]>=0.28.1` to override the pinned `httpx<0.28` constraint in `agentex-sdk`. - Regenerates `uv.lock`. Reachability: agentex consumes litellm as an SDK (`litellm.acompletion`, `litellm.types.*`, etc.); the vulnerable code path lives in `litellm.proxy.*` and is not invoked at runtime here. Scanner flags by package version regardless, so the bump is required to clear Aqua. Closes / supersedes #195 (which was pinning `<1.82.7` for the 1.82.7/1.82.8 supply-chain compromise — the higher floor here covers that scenario as a side effect). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Two integration tests asserted the legacy spaced JSON body format
(`b'{"key": "value"}'`). Starting in httpx 0.28, the `json=...` arg is
serialized in compact form (`b'{"key":"value"}'`, no spaces) for wire
efficiency.
This caused:
1. test_forwarding_post_request: direct body assertion failure
(`b'{"key":"value"}' != b'{"key": "value"}'`)
2. test_forwarding_request_with_slack: 401 instead of 200, because the
test-side HMAC was computed over the spaced bytes while the server
verified against the compact bytes httpx actually sent
Both are test-side adaptations; runtime forwarding behavior is correct.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Clears the HIGH advisory
GHSA-xqmj-j6mv-4862("Server-Side Template Injection in litellm/prompts/testendpoint") flagged by trivy/Aqua onegp-mirror-int/agentex:*-fips. Vulnerable range>= 1.80.5, < 1.83.7, patched in>= 1.83.7.The current pin
litellm>=1.48.2,<2resolves to1.83.0in the latest image, which falls in the vulnerable range.Changes
agentex/pyproject.toml: bumplitellmfloor>=1.48.2,<2→>=1.83.7,<2. Inline comment notes the advisory.agentex/pyproject.toml: widen test extrahttpx[http2]upper bound<0.28→<0.29because litellm 1.83.7 transitively requireshttpx==0.28.1.pyproject.toml(workspace root): add anoverride-dependenciesentry forhttpx[http2]>=0.28.1,<0.29to override the pinnedhttpx<0.28constraint inherited fromagentex-sdk.uv.lock: regenerated to reflect the bumps.Reachability
agentexuses litellm as an SDK (litellm.acompletion,litellm.types.*, etc.). The vulnerable SSTI is inlitellm.proxy.*(proxy server route handler/prompts/test) which is not invoked here. The bump is required because Aqua flags by package version regardless of reachable code.Relationship to PR #195
PR #195 (
fix: pin litellm <1.82.7 due to security vulnerability) has been open since 2026-04-09. It targets a different vulnerability — the 1.82.7/1.82.8 supply-chain compromise (credential-stealing malware, both versions removed from PyPI).This PR supersedes #195 because the new floor (
>=1.83.7) is above 1.82.7/1.82.8, so any resolution under this constraint will skip the compromised versions automatically. The<2upper bound is preserved.@danielmillerp — feel free to close #195 once this is reviewed; no functional gap.
Verification
uv lockresolves cleanly with the new constraints🤖 Generated with Claude Code
Greptile Summary
This PR bumps the
litellmfloor from>=1.48.2to>=1.83.7to clear advisory GHSA-xqmj-j6mv-4862 (SSTI in the/prompts/testproxy endpoint), and widens thehttpxbounds to satisfy litellm's transitive requirement forhttpx==0.28.1. Test assertions are correctly updated to reflect httpx 0.28's compact JSON serialization.The lock file regeneration also produces some unexpected version downgrades —
click(8.2.1→8.1.8),importlib-metadata(8.7.0→8.5.0), andjsonschema(4.25.1→4.23.0) — which appear to be caused by litellm 1.83.7's transitive constraints. These are worth a quick sanity-check but are unlikely to cause regressions.Confidence Score: 5/5
Safe to merge — all changes are well-scoped dependency version bumps with correct test updates; only remaining finding is a P2 observation about transitive lock downgrades.
The litellm floor bump is correctly motivated by the advisory, the httpx override chain is correctly threaded through pyproject.toml and uv.lock, and the test assertion changes accurately reflect httpx 0.28's compact JSON serialization. The only open item (unexpected transitive downgrades) is P2 and conditional on CI results already being checked.
uv.lock — review the transitive downgrades of click, importlib-metadata, and jsonschema to confirm CI coverage.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart TD A["agentex/pyproject.toml\nlitellm >=1.83.7,<2"] -->|"requires"| B["httpx ==0.28.1"] C["agentex-sdk\nhttpx <0.28 pin"] -->|"conflicts"| B D["pyproject.toml (workspace root)\noverride-dependencies:\nhttpx[http2]>=0.28.1,<0.29"] -->|"overrides"| C D --> E["uv.lock\nhttpx 0.28.1 resolved"] A --> E E --> F["GHSA-xqmj-j6mv-4862 cleared\n(SSTI in /prompts/test)"] style F fill:#2d8a4e,color:#fff style C fill:#c0392b,color:#fffPrompt To Fix All With AI
Reviews (2): Last reviewed commit: "test(agent_api_keys): adapt assertions t..." | Re-trigger Greptile