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

Merged
merged 1 commit into from
Dec 20, 2024

Conversation

mstmdev
Copy link
Member

@mstmdev mstmdev commented Dec 12, 2024

Fixes https://github.com/no-src/gofs/security/code-scanning/7

To fix the problem, we should avoid logging the password in clear text. Instead, we can log the attempt to log in without including the password. This way, we maintain the ability to debug login attempts without exposing sensitive information.

  • Remove the password from the log message.
  • Keep the log message informative by including the username and other non-sensitive information.
  • Ensure that the functionality of the code remains unchanged.

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>
@mstmdev mstmdev marked this pull request as ready for review December 12, 2024 05:37
@mstmdev mstmdev added this to the v0.9.0 milestone Dec 12, 2024
Copy link

codecov bot commented Dec 12, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 31.45%. Comparing base (bdbd0d5) to head (04bf30f).
Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
server/client/login.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #412   +/-   ##
=======================================
  Coverage   31.45%   31.45%           
=======================================
  Files         134      134           
  Lines        7274     7274           
=======================================
  Hits         2288     2288           
  Misses       4892     4892           
  Partials       94       94           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@mstmdev mstmdev merged commit bd273c9 into main Dec 20, 2024
12 of 13 checks passed
@mstmdev mstmdev deleted the alert-autofix-7 branch December 20, 2024 01:13
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