Skip to content

build(deps): bump certifi to 2026.10.23 - #48596

Closed
shrey-berri wants to merge 1 commit into
mainfrom
litellm_certifi_2026_10_23
Closed

shrey-berri wants to merge 1 commit into
mainfrom
litellm_certifi_2026_10_23

Conversation

@shrey-berri

@shrey-berri shrey-berri commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

This bumps certifi to 2026.10.23, which drops the emSign Root CA - C1 and emSign ECC Root CA - C3 roots, so LiteLLM's default outbound TLS trusts the same emSign roots that grpcio 1.84.1 and webpki-roots 1.0.11 already trust. It is a follow-up to #47969, which moved certifi to 2026.10.19. It also removes the osv-scanner ignore for GHSA-6q48-6c7w-9gw2, which expired on 2026-10-23

Details

TLDR

Problem this solves:

  • Locked certifi 2026.10.19 still trusts emSign C1 and C3
  • osv-scanner.toml carries an expired, now-unused GHSA-6q48-6c7w-9gw2 ignore

How it solves it:

  • Raise the certifi floor to >=2026.10.23 in all three declarations
  • Lock certifi 2026.10.23 in uv.lock with no other package changes
  • Delete the expired osv-scanner ignore
  • Test that the default SSL context no longer trusts emSign C1 or C3

User Flow

Before: a proxy built from the lock trusts servers that chain to emSign C1 or C3

  1. The operator builds the proxy with uv sync --frozen, as the Dockerfile does
  2. The install gets certifi 2026.10.19
  3. Outbound HTTPS calls to providers trust emSign Root CA - C1, emSign ECC Root CA - C3 and emSign Root CA - G1

After: the same build trusts only emSign Root CA - G1 of the emSign roots

  1. The operator builds the proxy with uv sync --frozen, as the Dockerfile does
  2. The install gets certifi 2026.10.23
  3. Outbound HTTPS calls to providers trust emSign Root CA - G1 only, and calls to OpenAI and Anthropic still connect

Relevant issues

Follow-up to #47969

Pre-Submission checklist

Please complete all items before asking a LiteLLM maintainer to review your PR

  • I have added meaningful tests
  • The handful of test files covering my change pass locally, e.g. uv run pytest tests/unit/<your_test_file>.py -v. Leave the suites (make test-unit-*, make test-unit) to CI: it finishes in ~15 minutes where a laptop takes an hour or more
  • My PR passes all required CI/CD checks (e.g., lint, schema.d.ts sync check, etc.)
  • My PR's scope is as isolated as possible; it only solves 1 specific problem
  • Every automated review on my PR's latest commit has finished, and I have addressed or replied to each of its findings before requesting a maintainer review

Delays in PR merge?

If you're seeing a delay in your PR being merged, ping the LiteLLM Team on Slack (#pr-review).

Screenshots / Proof of Fix

Shared setup: the CA check runs LiteLLM's own get_ssl_configuration() and lists the emSign roots in the SSLContext it returns

from litellm.llms.custom_httpx.http_handler import get_ssl_configuration
ctx = get_ssl_configuration()
print(sorted({dict(x[0] for x in c["subject"]).get("commonName", "") for c in ctx.get_ca_certs() if "emSign" in str(c["subject"])}))

Before (cfe0100)

Locked certifi version

  1. grep -n -A1 '^name = "certifi"' uv.lock
  2. Output: version = "2026.10.19"

Default outbound TLS trust

  1. Run the CA check with certifi 2026.10.19 installed
  2. Output: SSLContext ['emSign ECC Root CA - C3', 'emSign Root CA - C1', 'emSign Root CA - G1']

New test against the old certifi

  1. Keep the new test, install certifi 2026.10.19, run pytest -q tests/unit/llms/custom_httpx/test_http_handler.py
  2. Output: 1 failed, 133 passed. test_default_ssl_context_does_not_trust_emsign_roots_removed_from_certifi fails with certifi 2026.10.23 dropped both roots, certifi/python-certifi#445

After (1bd196bd3e)

Locked certifi version

  1. uv lock --check (uv 0.13.5) and uvx --from uv==0.10.9 uv lock --check (the version CI pins)
  2. Output, both: Resolved 470 packages, exit 0
  3. uv sync --frozen --no-default-groups --no-editable --dry-run
  4. Output: + certifi==2026.10.23
  5. grep -n certifi pyproject.toml packaging/litellm-core/pyproject.toml tests/code_coverage_tests/liccheck.ini
  6. Output: >=2026.10.23 in all three

Default outbound TLS trust

  1. Run the CA check with certifi 2026.10.23 installed
  2. Output: SSLContext ['emSign Root CA - G1']
  3. Send real chat completions through the proxy to api.openai.com and api.anthropic.com
  4. Output: both reach the provider over TLS and return the provider's 401 auth error, not a connection error

New test against the new certifi

  1. Install the locked certifi 2026.10.23 (hash checked against uv.lock), run pytest -q tests/unit/llms/custom_httpx/test_http_handler.py
  2. Output: 134 passed, the new test included

osv-scanner ignore

  1. grep -c GHSA-6q48 osv-scanner.toml
  2. Output: 0
  3. Query the OSV API for certifi 2026.10.19 and 2026.10.23
  4. Output: no vulnerabilities for either, and GHSA-6q48-6c7w-9gw2 is fixed in 2026.10.18

Type

🚄 Infrastructure
✅ Test

Final Attestation

  • The tests check the right things, including the edge cases, and regressions in the respective real-world customer use-cases are not possible after this PR

@shrey-berri

Copy link
Copy Markdown
Contributor Author

bugbot run

@shrey-berri

Copy link
Copy Markdown
Contributor Author

@greptileai review

@shrey-berri

Copy link
Copy Markdown
Contributor Author

/devin review

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Starting Devin Review.

Devin Review

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread tests/unit/test_package_metadata.py Outdated
Comment on lines +134 to +137
def test_locked_certifi_version_drops_emsign_c1_c3_roots() -> None:
locked: Final = _locked_package("certifi")["version"]
assert isinstance(locked, str)
assert Version(locked) >= CERTIFI_EMSIGN_C1_C3_REMOVAL, CERTIFI_EMSIGN_C1_C3_REMOVAL_SOURCE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Certifi tests miss unwanted trusted roots

When get_ssl_configuration() trusts emSign C1 or C3 again, the new tests still pass. They check certifi versions, not the roots trusted by the default SSL context.

Learn more

The new assertions check dependency declarations and lock metadata. Neither tests the default SSL context, which is the behavior the change intends to protect. The test rules require functional regression tests rather than tests of structure or implementation details test policy. get_ssl_configuration selects and caches the CA file used for outbound requests, so a later change there can restore unwanted trust without changing either version assertion.

Example: If the default SSL context starts loading another CA file containing emSign C1, both version tests pass while outbound TLS accepts certificates chaining to C1.

Recommended fix: Test the CA certificates returned by get_ssl_configuration() under the installed dependency and assert that C1 and C3 are absent, while retaining metadata checks only if they add value.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@greptile-apps

greptile-apps Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 4/5

[Medium impact] The PR changes the default CA bundle used for LiteLLM outbound TLS.

The dependency changes appear consistent, but the new tests must satisfy the repository’s behavior-only test requirement before merging

Findings

  1. P2 Tests only check metadata ▶

Summary

Raises the certifi floor and locked version to 2026.10.23, updates the license allowance, and removes the expired advisory exception

The new version-only tests conflict with the repository’s behavior-only test requirement

  • LiteLLM's default outbound TLS trusts fewer emSign roots.
  • OSV scanning no longer ignores the expired certifi advisory.

Reviews (1) · Last reviewed commit: "build(deps): bump certifi to 2026.10.23" · Reviewed by Greptile

Comment thread tests/unit/test_package_metadata.py Outdated
Comment on lines +128 to +131
assert any(
specifier.operator == ">=" and Version(specifier.version) >= CERTIFI_EMSIGN_C1_C3_REMOVAL
for specifier in declared[0].specifier
), CERTIFI_EMSIGN_C1_C3_REMOVAL_SOURCE

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Tests only check metadata

Both new tests pin dependency versions rather than behavior, violating the behavior-only test rule. Remove or replace them before merging

Context Used: AGENTS.md (source)

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

@cursor cursor Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 9c711d2c8498a96955e3e8bd8bd494994567f616. Configure here.

@codecov

codecov Bot commented Oct 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

certifi 2026.10.23 drops emSign Root CA - C1 and emSign ECC Root CA - C3
(certifi/python-certifi#445), so the default outbound TLS trust now
matches the roots grpcio 1.84.1 and webpki-roots 1.0.11 already use.

- raise the certifi floor to >=2026.10.23 in pyproject.toml,
  packaging/litellm-core/pyproject.toml and liccheck.ini
- lock certifi 2026.10.23 in uv.lock (no other package changes)
- remove the expired GHSA-6q48-6c7w-9gw2 osv-scanner ignore; the
  advisory was fixed in 2026.10.18
- test that the default SSL context no longer trusts emSign C1 or C3,
  and stop two SSL tests from leaking a fake context into the shared cache

Follow-up to #47969.
@shrey-berri
shrey-berri force-pushed the litellm_certifi_2026_10_23 branch from 9c711d2 to f0f0f4f Compare October 27, 2026 17:25
@codspeed

codspeed Bot commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ 1 benchmark is dominated by system calls

System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.

Learn more about system calls

See affected benchmarks

✅ 35 untouched benchmarks


Comparing litellm_certifi_2026_10_23 (f0f0f4f) with main (1419343)

Open in CodSpeed

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.

1 participant