Skip to content

fix: update vulnerable agentex dependencies#209

Merged
scale-ballen merged 2 commits intomainfrom
sec/agentex-fips-trivy-vuln-fixes
Apr 29, 2026
Merged

fix: update vulnerable agentex dependencies#209
scale-ballen merged 2 commits intomainfrom
sec/agentex-fips-trivy-vuln-fixes

Conversation

@scale-ballen
Copy link
Copy Markdown
Contributor

@scale-ballen scale-ballen commented Apr 26, 2026

Summary

  • bump vulnerable agentex backend dependencies above fixed versions
  • allow httpx 0.28.x required by newer LiteLLM
  • regenerate uv.lock with targeted package updates

Verification

  • uv lock --locked
  • docker build -f dockerfiles-fips/Dockerfile.agentex --build-arg SOURCE_DIR=public/agentex --target production -t agentex:latest-fips . (from parent repo)
  • trivy image --list-all-pkgs --format json --output trivy-agentex-latest-fips-list-all-packages-2026-04-26.json agentex:latest-fips => 0 vulnerabilities

Greptile Summary

This PR bumps several vulnerable agentex backend dependencies to their patched versions (litellm ≥1.83.7, python-dotenv ≥1.2.2, python-multipart ≥0.0.26, httpx 0.28.x), regenerates uv.lock, and updates integration tests to use raw content= bytes with an explicit Content-Type header — a behavioral change required by httpx 0.28's stricter request-building API.

Confidence Score: 5/5

Safe to merge — all dependency bumps target patched versions of known vulnerabilities and the lock file has been verified with Trivy showing 0 vulnerabilities.

All changes are dependency version bumps with a corresponding lock-file regeneration verified clean by Trivy. The integration test adjustments correctly adapt to httpx 0.28's API change (content= bytes + explicit Content-Type instead of json=), with each test defining its own payload_body locally before use. No logic regressions detected.

No files require special attention.

Important Files Changed

Filename Overview
agentex/pyproject.toml Bumps litellm, python-dotenv, python-multipart lower bounds to patched versions; widens httpx test dependency to allow 0.28.x.
agentex/tests/integration/api/agent_api_keys/test_agent_api_keys_api.py Replaces json= with content= bytes + explicit Content-Type header in two forward-request tests; each test defines its own payload_body locally before use.
pyproject.toml Adds httpx[http2]>=0.28.1,<0.29 as a workspace override dependency to enforce the updated httpx version across all workspace members.
uv.lock Regenerated lock file with updated packages (httpx 0.28.1, litellm 1.83.14, python-dotenv 1.2.2, python-multipart 0.0.26, pydantic 2.12.5, openai 2.24.0, tiktoken 0.12.0, etc.).

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[PR: bump vulnerable deps] --> B[agentex/pyproject.toml]
    A --> C[pyproject.toml workspace]
    A --> D[uv.lock regenerated]
    A --> E[integration tests updated]

    B --> B1[litellm >=1.48.2 → >=1.83.7]
    B --> B2[python-dotenv >=1.0.1 → >=1.2.2]
    B --> B3[python-multipart >=0.0.22 → >=0.0.26]
    B --> B4[httpx test dep <0.28 → <0.29]

    C --> C1[add override: httpx>=0.28.1,<0.29]

    E --> E1[json= dict → content= raw bytes]
    E --> E2[add explicit Content-Type header]
    E --> E3[Slack test: payload_body defined locally before use]
Loading

Reviews (2): Last reviewed commit: "test: stabilize forwarded request payloa..." | Re-trigger Greptile

@scale-ballen scale-ballen requested a review from a team as a code owner April 26, 2026 16:47
@socket-security
Copy link
Copy Markdown

socket-security Bot commented Apr 26, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatedpypi/​litellm@​1.83.0 ⏵ 1.83.1474100 +16100100100
Updatedpypi/​python-dotenv@​1.1.1 ⏵ 1.2.299 +1100 +2100100100
Updatedpypi/​python-multipart@​0.0.22 ⏵ 0.0.26100 +1100 +2100100100
Updatedpypi/​httpx@​0.27.2 ⏵ 0.28.1100100100100100

View full report

@scale-ballen
Copy link
Copy Markdown
Contributor Author

Downstream build/runtime verification completed through parent PR scaleapi/agentex#332 using this submodule commit.

Checks run:

  • uv lock --locked passed in this repo.
  • Parent FIPS image build passed: docker build -f dockerfiles-fips/Dockerfile.agentex --build-arg SOURCE_DIR=public/agentex --target production -t agentex:latest-fips .
  • Runtime package versions in the image: litellm 1.83.14, Mako 1.3.11, python-dotenv 1.2.2, python-multipart 0.0.26.
  • Trivy vuln scan with --list-all-pkgs reported 202 packages and 0 vulnerabilities.
  • Container runtime smoke passed: /healthz 200, /openapi.json 200, /readyz expected 503 degraded without backing services.

@scale-ballen
Copy link
Copy Markdown
Contributor Author

CI fix update for the latest push (841f86f):

  • Stabilized the forwarded request payload tests for httpx 0.28 by sending explicit JSON bytes via content= instead of relying on json= serialization formatting.
  • Kept the Slack signature test signing and sending the exact same byte payload, which fixes the 401 mismatch in CI.

Verification:

  • Local targeted integration file: 19 passed
  • Local unit marker: 215 passed, 171 deselected
  • Local integration marker: 66 passed, 320 deselected
  • GitHub Run Unit and Integration Tests: passing
  • GitHub tutorial integration matrix + summary: passing
  • Build Documentation, Socket, Greptile, and PR title checks: passing

@scale-ballen scale-ballen merged commit f446219 into main Apr 29, 2026
30 checks passed
@scale-ballen scale-ballen deleted the sec/agentex-fips-trivy-vuln-fixes branch April 29, 2026 16:36
scale-ballen added a commit that referenced this pull request Apr 29, 2026
## Summary

This PR now reflects the remaining effective diff after merging latest
`main`: a lockfile-only refresh. The LiteLLM vulnerability remediation
originally described here has already landed through PR #209.

## Current change

- `uv.lock`: updates `aiohttp` from `3.13.4` to `3.13.5` and refreshes
the associated package artifact hashes/URLs.

## Relationship to PR #209

PR #209 already landed the substantive AgentEx dependency vulnerability
fixes:

- `litellm >=1.83.7,<2`
- `python-dotenv >=1.2.2,<2`
- `python-multipart >=0.0.26`
- `httpx[http2] >=0.28.1,<0.29` workspace override
- integration test updates for httpx 0.28 request serialization behavior

Because latest `main` already includes those changes, this PR no longer
carries the LiteLLM/security remediation itself.

## Verification

- [x] Rebased/merged against latest `main`
- [x] `uv lock --locked`
- [x] GitHub CI checks passing

## Merge note

Safe to merge as a small lockfile refresh, but it is no longer required
for the LiteLLM vulnerability fix. That work is already present on
`main` via PR #209.

---------

Co-authored-by: Claude Opus 4.7 (1M context) <[email protected]>
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