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. 4: Clear-text logging of sensitive information #52

Merged
merged 1 commit into from
Oct 21, 2024

Conversation

filipporomani
Copy link
Owner

Fixes https://github.com/filipporomani/whatsapp-python/security/code-scanning/4

To fix the problem, we should avoid logging the entire JSON response directly. Instead, we can log only non-sensitive parts of the response or a generic message indicating success or failure. If detailed information is needed for debugging, it should be done in a secure manner, such as logging to a secure location with restricted access.

  1. Identify the log statements that log the entire response.
  2. Replace these log statements with more generic messages that do not include sensitive information.
  3. Ensure that any necessary detailed logging is done securely.

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

…ation

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Filippo Romani <filippo@romani.cc>
@filipporomani filipporomani marked this pull request as ready for review October 21, 2024 17:45
@filipporomani filipporomani merged commit fb3fae7 into main Oct 21, 2024
2 checks passed
@filipporomani filipporomani deleted the alert-autofix-4 branch October 21, 2024 17:46
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