-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Fix calling key with access to model alias #13830
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
prevent showing up on searches
useful for showing setup via cli
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🚨 Bugbot Trial ExpiredYour Bugbot trial has expired. Please purchase a license in the Cursor dashboard to continue using Bugbot. |
verbose_proxy_logger.exception( | ||
"Error getting team membership for user_id: %s, team_id: %s", | ||
user_id, | ||
team_id, |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI about 1 month ago
To fix the problem, we should avoid logging the raw value of team_id
in the exception message. Instead, we can log a generic error message or, if necessary, log only non-sensitive context (such as the presence of a failure, not the actual ID). If more context is needed for debugging, consider hashing or redacting the identifier, or logging only that an error occurred for a given user without specifying the team ID. The change should be made in the get_team_membership
function in litellm/proxy/auth/auth_checks.py
, specifically in the block where the exception is logged (lines 554-558). Only the log message and arguments need to be changed; no new imports or methods are required.
-
Copy modified line R555
@@ -552,9 +552,8 @@ | ||
return _response | ||
except Exception: | ||
verbose_proxy_logger.exception( | ||
"Error getting team membership for user_id: %s, team_id: %s", | ||
"Error getting team membership for user_id: %s", | ||
user_id, | ||
team_id, | ||
) | ||
return None | ||
|
Title
Relevant issues
Fixes #13310
Pre-Submission checklist
Please complete all items before asking a LiteLLM maintainer to review your PR
tests/litellm/
directory, Adding at least 1 test is a hard requirement - see detailsmake test-unit
Type
🆕 New Feature
🐛 Bug Fix
🧹 Refactoring
📖 Documentation
🚄 Infrastructure
✅ Test
Changes