Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Security: Potential Sensitive Information Exposure in Logging#804

Open
tomaioo wants to merge 1 commit into
databricks:maindatabricks/databricks-sql-python:mainfrom
tomaioo:fix/security/potential-sensitive-information-exposuretomaioo/databricks-sql-python:fix/security/potential-sensitive-information-exposureCopy head branch name to clipboard
Open

Security: Potential Sensitive Information Exposure in Logging#804
tomaioo wants to merge 1 commit into
databricks:maindatabricks/databricks-sql-python:mainfrom
tomaioo:fix/security/potential-sensitive-information-exposuretomaioo/databricks-sql-python:fix/security/potential-sensitive-information-exposureCopy head branch name to clipboard

Conversation

@tomaioo
Copy link
Copy Markdown

@tomaioo tomaioo commented May 25, 2026

Summary

Security: Potential Sensitive Information Exposure in Logging

Problem

Severity: Medium | File: src/databricks/sql/experimental/oauth_persistence.py:L56

The src/databricks/sql/experimental/oauth_persistence.py file logs token persistence operations at INFO level, including the file path where OAuth tokens are stored. While not the tokens themselves, the file path could be sensitive. More critically, the DevOnlyFilePersistence class stores OAuth tokens (access_token and refresh_token) in plaintext JSON without encryption, which is noted as development-only but still presents a risk if misused in production.

Solution

Add warnings when DevOnlyFilePersistence is instantiated in non-development environments. Consider encrypting the file or using OS keyring services. Reduce log level for persistence operations or ensure no sensitive data is logged.

Changes

  • src/databricks/sql/experimental/oauth_persistence.py (modified)

The `src/databricks/sql/experimental/oauth_persistence.py` file logs token persistence operations at INFO level, including the file path where OAuth tokens are stored. While not the tokens themselves, the file path could be sensitive. More critically, the `DevOnlyFilePersistence` class stores OAuth tokens (access_token and refresh_token) in plaintext JSON without encryption, which is noted as development-only but still presents a risk if misused in production.

Signed-off-by: tomaioo <203048277+tomaioo@users.noreply.github.com>
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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.