You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Will log all request headers in plain text, including API keys.
While I understand this only happens in debug logging level, it still feels like a potential security issue. These logs should probably be filtered to remove this sensitive header.
To Reproduce
Run an application with DEBUG log level that communicates with OpenAI using an API key
Observe that the API key is printed in the logs in plain text
Confirm this is an issue with the Python library and not an underlying OpenAI API
Describe the bug
When sending a request using the library, line 439 of
/openai/openai-python/blob/main/src/openai/_base_client.py
Will log all request headers in plain text, including API keys.
While I understand this only happens in debug logging level, it still feels like a potential security issue. These logs should probably be filtered to remove this sensitive header.
To Reproduce
Code snippets
OS
macOS
Python version
Python 3.11.6
Library version
openai v1.3.7
The text was updated successfully, but these errors were encountered: