Repository navigation
security: remove leaked OAuth credentials and stop logging user secrets - #18658
Conversation
- a commented-out BoxOAuth example embedded a real-looking client_id and client_secret; committed secrets must be treated as compromised and rotated by their owner, so the example now uses placeholders - start_google_web_oauth printed the full parsed credentials dict (including client_secret) to stdout before caching them; drop the print so user-supplied secrets never land in container logs
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe changes remove debug output for parsed Google OAuth credentials and replace embedded Box OAuth values in a commented example with placeholders. ChangesOAuth credential cleanup
Estimated code review effort: 1 (Trivial) | ~3 minutes Merge Risk: ⚪ Minimal · up to This change replaces an embedded credential example with placeholders and stops logging user secrets; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
There was a problem hiding this comment.
Pull request overview
This PR mitigates secret-leak risk by removing committed OAuth credentials (even in commented examples) and eliminating stdout logging of user-supplied OAuth client configuration during Google web OAuth initialization.
Changes:
- Replaced real-looking Box OAuth
client_id/client_secretin a commented example with placeholders. - Removed a
print(credentials)that could leakclient_secretinto container/log aggregation output during/connectors/google/oauth/web/start.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| common/data_source/box_connector.py | Replaces embedded OAuth credential values in a commented example with non-sensitive placeholders. |
| api/apps/restful_apis/connector_api.py | Removes stdout logging of parsed Google OAuth credentials before caching flow state. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #18658 +/- ##
=======================================
Coverage 90.65% 90.65%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 650 650
Misses 39 39
Partials 28 28 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
What this PR does
common/data_source/box_connector.py: a commented-outBoxOAuthexample embedded a real-lookingclient_id/client_secret. Even disabled, committed secrets must be treated as compromised and rotated by their owner; the example now uses placeholders.api/apps/restful_apis/connector_api.py:start_google_web_oauthprinted the full parsed credentials dict (includingclient_secret) to stdout before caching it in Redis, so user-supplied secrets landed in container / log-aggregation logs. Dropped theprint.Verification
python -m py_compileon both files.