-
Notifications
You must be signed in to change notification settings - Fork 314
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
chore: bol load: custom image 2 #5225
base: master
Are you sure you want to change the base?
Conversation
dbURL := fmt.Sprintf("postgres://postgres:%s@localhost:%d/testdb?sslmode=disable", randomPassword, freePort) | ||
|
||
// Print the database URL | ||
fmt.Printf("Database URL: %s\n", dbURL) |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
Sensitive data returned by an access to randomPassword
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix AI about 14 hours ago
To fix the problem, we should avoid logging the sensitive information contained in randomPassword
. Instead of printing the entire dbURL
, we can print a sanitized version that omits the password. This way, we maintain the ability to debug without exposing sensitive data.
- Remove the password from the
dbURL
before printing it. - Ensure that the rest of the functionality remains unchanged.
-
Copy modified line R147 -
Copy modified lines R149-R150
@@ -146,5 +146,6 @@ | ||
dbURL := fmt.Sprintf("postgres://postgres:%s@localhost:%d/testdb?sslmode=disable", randomPassword, freePort) | ||
sanitizedDbURL := fmt.Sprintf("postgres://postgres:****@localhost:%d/testdb?sslmode=disable", freePort) | ||
|
||
// Print the database URL | ||
fmt.Printf("Database URL: %s\n", dbURL) | ||
// Print the sanitized database URL | ||
fmt.Printf("Database URL: %s\n", sanitizedDbURL) | ||
|
fmt.Printf("\nFinal results:\n") | ||
fmt.Printf("Processed %d events in %v\n", totalEvents, elapsed) | ||
fmt.Printf("Average rate: %.2f events/second\n", float64(totalEvents)/elapsed.Seconds()) | ||
fmt.Printf("Database URL: %s\n", dbURL) |
Check failure
Code scanning / CodeQL
Clear-text logging of sensitive information High
Sensitive data returned by an access to randomPassword
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5225 +/- ##
==========================================
- Coverage 73.19% 72.93% -0.27%
==========================================
Files 417 418 +1
Lines 59085 59804 +719
==========================================
+ Hits 43246 43616 +370
- Misses 13426 13752 +326
- Partials 2413 2436 +23 ☔ View full report in Codecov by Sentry. |
No description provided.