Skip to content

fix: update filelock, multidict, and pip security floors - #843

Merged
rng1995 merged 27 commits into
mainfrom
feat/christopherk/dependency-security-medium
Nov 21, 2026
Merged

rng1995 merged 27 commits into
mainfrom
feat/christopherk/dependency-security-medium

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Nov 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Raise the optional filelock and multidict floors for the LLM, Tier 2, and Tier 3 installations that depend on them.
  • Raise the filelock and pip floors in the security extra. Pip 26.2.2 removes trust for the affected certificate chain described in the Python Software Foundation advisory.
  • Build the public runtime and managed GitLab jobs from a pinned Python 3.12.16 base with the patched TLS trust checks.
  • Regenerate the lock, which changes only filelock (4.2.12), multidict (6.9.1), and pip (26.3). Stack on fix: raise the Tier 3 MCP SDK security floor #842.

Verification

  • Checked the lock and all 18 locked wheel installs across six extras profiles and three Python versions
  • Exercised clean and vulnerable requirements through the installed Tier 1 dependency audit and inspected the reports
  • Completed fresh wheel resolution, integration smoke tests, and security review

Verified 18 locked wheel combinations across Python 3.12–3.14 and five fresh PyPI installs. Real file-backed caching, file locking, and aiohttp header handling passed. The installed CLI detected the known advisory fixture and also produced passing JSON, HTML, and SARIF for a clean Linux container run. The pinned Docker base built successfully, the final image contained pip 26.3, and the managed GitLab image ran the existing uv bootstrap and verified the lock. The packaging and GitLab workflow tests passed, and an independent security review found no scoped issues. A protected GitLab pipeline and a credentialed provider run were outside the local verification environment.

Windows installation and CA trust

The security extra requires the fixed installed certifi bundle as well as the fixed pip release. See the Python Software Foundation incident guidance.

  • The install docs use python -m pip so the Windows launcher can upgrade an older pip during installation.
  • Packaging tests cover the matching digest pins in the Dockerfile and both managed GitLab jobs. The changelog records the bootstrap change.
  • Local package installs of [security] and [all] from pip 26.2.1 and certifi 2025.8.3 upgraded to pip 26.3 and certifi 2026.10.23. Both passed pip check and started pip-audit. Native Windows CI passed both install paths in separate venvs on managed Python 3.12.16.

Release impact

  • Updated the changelog and third-party notices

chrisknvidia and others added 25 commits November 19, 2026 23:35
…t/christopherk/dependency-security-optional

Signed-off-by: Christopher Kevin <[email protected]>

# Conflicts:
#	CHANGELOG.md
#	pyproject.toml
…t/christopherk/dependency-security-optional

Signed-off-by: Christopher Kevin <[email protected]>
… is blank

A blank or whitespace-only AWS_BEARER_TOKEN_BEDROCK is treated as absent and
the IAM credentials are validated, but Botocore still selects bearer
authentication for any set value and sends "Authorization: Bearer <blank>".
Pin SigV4 on both Bedrock clients in that case, without touching os.environ,
and cover it with a real-client test against a loopback TLS endpoint.

Signed-off-by: Christopher Kevin <[email protected]>
A whitespace-only AWS_BEARER_TOKEN_BEDROCK now counts as no token in host
inference, the same as in the Tier 3 preflight. The HTTPS-only endpoint check
no longer fires for it, and LiteLLM signs with the IAM credentials instead of
sending a blank Bearer header. The blank-token check lives in one shared
helper used by both paths.

Signed-off-by: Christopher Kevin <[email protected]>
…lank

LiteLLM's Bedrock Responses route takes its token from the api_key argument or,
when that is empty, from AWS_BEARER_TOKEN_BEDROCK. A whitespace-only value
therefore still became a Bearer header and the request failed before it was
sent. Host inference now blanks the variable for the duration of the call when
it holds only whitespace, and puts the exact value back afterwards. Overlapping
calls share one blanked window. Real tokens and other Bedrock routes are
unchanged.

Signed-off-by: Christopher Kevin <[email protected]>
The preflight raised InvalidConfigError, but only the exception class name
reached the result detail, so the cause was hidden. Return the failure
directly with a constant detail that names the HTTPS requirement and keeps
the token and endpoint out of the output.

Signed-off-by: Christopher Kevin <[email protected]>
Add a Fixed entry for the preflight and host inference now using IAM
credentials when AWS_BEARER_TOKEN_BEDROCK is empty or whitespace-only.

Signed-off-by: Christopher Kevin <[email protected]>
…he bearer token

Host inference only checked AWS_BEDROCK_RUNTIME_ENDPOINT, so the mantle route
(BEDROCK_MANTLE_API_BASE) and the hosted-platform route could still send the
bearer token over HTTP. Check all of those overrides with one helper, and only
when a real bearer token is set.

Signed-off-by: Christopher Kevin <[email protected]>

@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: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Devin Review

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @chrisknvidia for this contribution! I reviewed 95ab2d8725: I read the change and its callers, ran probes on the head, and checked the tests and docs. I left 4 inline comments (1 P2, 3 P3) to address before this can be approved.

Comment thread pyproject.toml Resolved
Comment thread pyproject.toml Resolved
Comment thread tests/test_oss_packaging.py Resolved
Comment thread CHANGELOG.md Resolved
Base automatically changed from feat/christopherk/dependency-security-mcp to main November 20, 2026 23:10

@rng1995 rng1995 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks @chrisknvidia for this contribution! I re-checked every review comment on this PR against the current head ed7a9aba7: the Windows pip install path (python -m pip in the README), the certifi floor with its comment and lock assertion, the packaging test that now pins the Dockerfile and both GitLab images to the same digest-pinned python:3.12.16-slim, and the CHANGELOG entry are all in place, and I found nothing new in the changes since my earlier review. The targeted packaging tests and ruff pass, every non-merge commit is signed off, CI is green and the branch merges cleanly. Approving.

@rng1995
rng1995 merged commit 4327960 into main Nov 21, 2026
25 checks passed
@rng1995
rng1995 deleted the feat/christopherk/dependency-security-medium branch November 21, 2026 00:19
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