Skip to content
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

Fix code scanning alert no. 424: Clear-text logging of sensitive information #6

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

Xerolux
Copy link
Owner

@Xerolux Xerolux commented Sep 24, 2024

Fixes https://github.com/Xerolux/violet-hass/security/code-scanning/424

To fix the problem, we need to ensure that sensitive information such as passwords is not logged. Instead of logging the full auth_url, we can log a sanitized version that excludes the password. This can be done by constructing a version of the URL that omits the sensitive parts before logging.

  • Replace the logging statement on line 65 to log a sanitized version of the auth_url.
  • Introduce a helper function to sanitize the URL by removing the password.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

…rmation

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Copy link

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails

Scanned Manifest Files

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Message that will be displayed on users' first pull request

@Xerolux Xerolux marked this pull request as ready for review September 24, 2024 20:26
@Xerolux Xerolux merged commit d682ecc into main Sep 24, 2024
17 of 18 checks passed
@Xerolux Xerolux deleted the autofix/alert-424-86a45d8d54 branch September 24, 2024 20:26
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