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

Merged
merged 1 commit into from
Sep 24, 2024

Conversation

nctrnm
Copy link
Owner

@nctrnm nctrnm commented Sep 24, 2024

Fixes https://github.com/nctrnm/code/security/code-scanning/2

To fix the problem, we should avoid logging the exact coordinates directly. Instead, we can log a message indicating whether the coordinates were successfully found without revealing the actual values. This approach maintains the functionality of informing the user about the success or failure of the operation without exposing sensitive data.

  • Modify the log statements to avoid printing the exact latitude and longitude.
  • Update the relevant lines in the main function to reflect this change.

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: Matthew McGilvery <[email protected]>
@nctrnm nctrnm marked this pull request as ready for review September 24, 2024 20:32
@nctrnm nctrnm merged commit 3462181 into code Sep 24, 2024
2 checks passed
@nctrnm nctrnm deleted the autofix/alert-2-23080db966 branch September 24, 2024 20:32
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