Repository navigation
fix: update filelock, multidict, and pip security floors - #843
Conversation
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
…t/christopherk/dependency-security-optional Signed-off-by: Christopher Kevin <[email protected]> # Conflicts: # CHANGELOG.md # pyproject.toml
Signed-off-by: Christopher Kevin <[email protected]>
…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]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
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.
Signed-off-by: Christopher Kevin <[email protected]>
Signed-off-by: Christopher Kevin <[email protected]>
rng1995
left a comment
There was a problem hiding this comment.
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.
Summary
Verification
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.
python -m pipso the Windows launcher can upgrade an older pip during installation.[security]and[all]from pip 26.2.1 and certifi 2025.8.3 upgraded to pip 26.3 and certifi 2026.10.23. Both passedpip checkand started pip-audit. Native Windows CI passed both install paths in separate venvs on managed Python 3.12.16.Release impact