Skip to content

Conversation

@satta
Copy link
Member

@satta satta commented Nov 20, 2025

Potential fix for https://github.com/DCSO/fever/security/code-scanning/2

The best way to fix this problem is to avoid including sensitive credentials—in this case, the MongoDB password—in any log statements. Specifically, in MakeMongoSlurper, the log line on 265 should not record the value of url as it contains sensitive information. Instead, you can log a sanitized version of the connection string, or omit the url field entirely and just report the host and database, which are not sensitive. This change should be made only to line 265, replacing the log call so that it does not expose the password. No changes to the overall logic are required, and no new dependencies are necessary. We can use Go's string manipulation to construct a sanitized string if useful, or simply log the properties individually.


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

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
@satta satta requested a review from fhonza November 20, 2025 11:32
@satta satta marked this pull request as ready for review November 20, 2025 11:46
@satta satta merged commit 2b8ff4f into master Nov 20, 2025
5 checks passed
@satta satta deleted the alert-autofix-2 branch November 20, 2025 11: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.

3 participants