Skip to content

build(deps): bump social-auth-core to 5.0.2 (CTO-5452) - #353

Open
shrish-browserstack wants to merge 1 commit into
mainfrom
security/social-auth-core-5
Open

shrish-browserstack wants to merge 1 commit into
mainfrom
security/social-auth-core-5

Conversation

@shrish-browserstack

Copy link
Copy Markdown
Collaborator

Change

Package From To Why
social-auth-core 4.5.4 5.0.2 Clears the open social-auth-core Dependabot alerts (all fixed by 5.0.0, the last one by 5.0.2)
oauthlib 3.1.0 3.3.1 social-auth-core 5.x requires oauthlib>=3.3.1
requests-oauthlib 1.3.0 2.0.0 social-auth-core 5.x requires requests-oauthlib>=2.0.0
requests 2.33.0 2.34.2 social-auth-core 5.x requires requests>=2.34.0

Supersedes #350, which bumps social-auth-core alone and cannot resolve (oauthlib==3.1.0 conflicts).

Deliberately not changed: social-auth-app-django stays at 5.4.1. It already accepts social-auth-core>=4.4.1. The newer 5.6.0 (#274) pins social-auth-core~=4.4 and needs Django 5.1+, so it is incompatible with this bump. oauthlib stays on the 3.x line rather than 4.0.

Verification (Python 3.12, CI setup)

  • Fresh-venv pip install -r requirements.txt: resolves cleanly; pip check shows no social/oauth/requests conflicts.
  • Full test suite: 138 passed, 8 skipped. One unrelated SSH access-module test currently fails on main; that is fixed by test(ssh): make injection tests self-contained (CTO-5387 follow-up) enigma-access-modules#117 and was applied for this run.
  • Google SSO end-to-end through enigma's real URLs and SOCIAL_AUTH_PIPELINE (Django test client, in-memory SQLite, Google token/userinfo endpoints mocked). Identical result on 4.5.4 and 5.0.2:
begin    -> 302 accounts.google.com/o/oauth2/auth, client_id + state set
complete -> 302 /, user created and logged in
endpoints: accounts.google.com/o/oauth2/token, www.googleapis.com/oauth2/v3/userinfo

Worth a real Google login on staging before prod, since the mock cannot cover Google-side behaviour.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Central YAML (base), Organization UI (inherited), Workspace UI (inherited); Enforced overrides: Organization
  • Review profile: ASSERTIVE
  • Plan: Enterprise
  • Run ID: a77fee7a-93cb-4ff5-baa0-57b0e27e686f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@shrish-browserstack shrish-browserstack left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Claude Code Review (automated) — 2 inline finding(s). Full report in the PR comment below. Verdict: Passed.

Comment thread requirements.txt
ndg-httpsclient==0.5.1
oauth2client==4.1.3
oauthlib==3.1.0
oauthlib==3.3.1

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

[Medium] oauthlib 3.3.1 leaves alerts #200 and #201 open

GHSA-hj66-6f7g-4r5v and GHSA-xpv3-w29h-x7cv are fixed only in 4.0.0. Nothing in the tree caps oauthlib below 4 (social-auth-core needs >=3.3.1, requests-oauthlib >=3.0.0). Both are provider-side endpoints enigma does not serve.

Suggestion: oauthlib==4.0.0 here after a changelog check, or an immediate follow-up.

Reviewer: code-review

Comment thread requirements.txt
six==1.15.0
social-auth-app-django==5.4.1
social-auth-core==4.5.4
social-auth-core==5.0.2

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

[Medium] Pairing with social-auth-app-django 5.4.1 is not an upstream-released combination

Core tightened OAuth2 state/redirect handling and added request timeouts since 4.5.4. The mocked SSO run (passes on 3.11 and 3.12) cannot exercise live Google.

Suggestion: one real Google login on staging before prod.

Reviewer: code-review

@shrish-browserstack

Copy link
Copy Markdown
Collaborator Author

Claude Code PR Review

PR: #353 • Head: 3f532f6 • Reviewers: code-review (built-in fallback; no in-scope reviewers installed in this repo)

Summary

Bumps social-auth-core 4.5.4 → 5.0.2 together with the three pins it requires (oauthlib 3.3.1, requests-oauthlib 2.0.0, requests 2.34.2); supersedes Dependabot #350, which cannot resolve.

Review Table

Priority Category Check Status Notes
High Security No hardcoded secrets or credentials Pass requirements.txt only
High Security Authentication/authorization checks present Pass SSO begin/complete verified end-to-end with mocked Google endpoints
High Security Input validation and sanitization N/A
High Security No IDOR — resource ownership validated N/A
High Security No SQL injection (parameterized queries) N/A
High Correctness Logic is correct, handles edge cases Pass Full requirements resolve; pip check clean for social/oauth/requests
High Correctness Error handling is explicit, no swallowed exceptions N/A
High Correctness No race conditions or concurrency issues N/A
Medium Testing New code has corresponding tests N/A Dependency-only change
Medium Testing Error paths and edge cases tested Pass Suite + SSO smoke on Python 3.11.9 (production image) and 3.12.7
Medium Testing Existing tests still pass (no regressions) Pass 138 passed locally; CI's only failure is the pre-existing SSH access-module test (browserstack/enigma-access-modules#117)
Medium Performance No N+1 queries or unbounded data fetching N/A
Medium Performance Long-running tasks use background jobs N/A
Medium Quality Follows existing codebase patterns Pass Exact pins, matching the file
Medium Quality Changes are focused (single concern) Pass Only the pins social-auth-core 5.x requires
Low Quality Meaningful names, no dead code N/A
Low Quality Comments explain why, not what N/A
Low Quality No unnecessary dependencies added Pass No new packages

Findings

  • File: requirements.txt:46

  • Severity: Medium

  • Reviewer: code-review

  • Issue: oauthlib==3.3.1 is still inside the ranges of GHSA-hj66-6f7g-4r5v and GHSA-xpv3-w29h-x7cv (both fixed only in 4.0.0), so enigma Dependabot alerts Fix linter issues Access folder #200 and fix: html id implementation revamp #201 stay open after this merges. Neither social-auth-core 5.0.2 (>=3.3.1) nor requests-oauthlib 2.0.0 (>=3.0.0) caps oauthlib below 4. Both advisories are in provider-side endpoints (revocation, PKCE verification) that enigma, as an OAuth client, does not serve.

  • Suggestion: Either go to oauthlib==4.0.0 here after checking its changelog, or track it as a follow-up and close Dependabot build(deps): bump oauthlib from 3.1.0 to 4.0.0 #345 in favour of it.

  • File: requirements.txt:81

  • Severity: Medium

  • Reviewer: code-review

  • Issue: social-auth-app-django stays at 5.4.1, which keeps alert feat: adding django-cid as a dependency and in the logs #84 (GHSA-wv4w-6qv2-qqfg, fixed in 5.6.0) open. Pre-existing and not fixable here: 5.6.0 requires Django ≥ 5.1 and social-auth-core~=4.4.

  • Suggestion: Resolve together with the Django 5.2 upgrade (build(deps): bump django from 4.2.30 to 5.2.17 #349).

  • File: requirements.txt:82

  • Severity: Medium

  • Reviewer: code-review

  • Issue: core 5.0.2 with app-django 5.4.1 is a pairing upstream did not release together (app-django releases that target core 5.x require Django ≥ 5.2), and core tightened OAuth2 state/redirect handling and added request timeouts between 4.5.4 and 5.0.2. The mocked SSO run cannot exercise live Google behaviour.

  • Suggestion: Do one real Google login on staging before production, as noted in the PR description.

  • File: requirements.txt:82

  • Severity: Low

  • Reviewer: code-review

  • Issue: Reviewer reports that core 5.x stores expires_in rather than expires in Google extra_data, so existing UserSocialAuth rows keep a stale expires key. Not verified; token expiry handling reads expires_in.

  • Suggestion: None needed unless something reads extra_data["expires"].

  • File: requirements.txt:75

  • Severity: Low

  • Reviewer: code-review

  • Issue: requests depends on charset_normalizer, which is not pinned, while the unused chardet==3.0.4 pin remains (pre-existing).

  • Suggestion: Follow-up: pin charset-normalizer and drop chardet.

Reviewer-flagged Python 3.11 coverage gap was closed during this review: the full requirements resolve and the Google SSO flow passes end-to-end on Python 3.11.9.


Verdict: PASS — mergeable once CI is green after #117; consider oauthlib 4.0.0 here or as an immediate follow-up.

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