Skip to content

Potential fix for code scanning alert no. 8: Clear-text logging of sensitive information #1

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

Merged
merged 4 commits into from
Apr 9, 2025

Conversation

venkateshpabbati
Copy link
Owner

Potential fix for https://github.com/venkateshpabbati/LightRAG/security/code-scanning/8

To fix the problem, we need to ensure that sensitive information is not logged in clear text. The best way to achieve this is to sanitize the params dictionary before logging it. Specifically, we should remove or mask any sensitive information such as passwords before logging the params dictionary. This can be done by creating a sanitized copy of the params dictionary and replacing sensitive values with placeholders.

We will make changes to the query and execute methods to sanitize the params and data dictionaries before logging them. We will also add a helper function to perform the sanitization.

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

…nsitive information

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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
venkateshpabbati and others added 2 commits April 9, 2025 20:58
…ensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@venkateshpabbati venkateshpabbati marked this pull request as ready for review April 9, 2025 15:42
@venkateshpabbati venkateshpabbati merged commit a50e662 into main Apr 9, 2025
5 checks passed
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