-
Notifications
You must be signed in to change notification settings - Fork 70
Replace time.After with a timer created only once for a function call. #1966
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
base: master
Are you sure you want to change the base?
Conversation
Linter exclusion comments updated.
| // The peer was not found in the larges group, time to change the peer. | ||
| // Select the random peer from the group and return it along with a new score value. | ||
| i := rand.IntN(len(g.peers)) // #nosec: it's ok to use math/rand/v2 here | ||
| i := rand.IntN(len(g.peers)) //nolint: gosec // it's ok to use math/rand/v2 here. |
Check failure
Code scanning / gosec
Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand) Error
| return PeerInfo{}, err | ||
| } | ||
| n := rand.IntN(len(ips)) // #nosec: it's ok to use math/rand/v2 here | ||
| n := rand.IntN(len(ips)) //nolint: gosec // it's ok to use math/rand/v2 here. |
Check failure
Code scanning / gosec
Use of weak random number generator (math/rand or math/rand/v2 instead of crypto/rand) Error
Moved TODOs from error handling blocks whether possible without loosing context. Added suppression comments for test data that looks like telegram bot API keys or AWS access tokens or generic API keys. Call to time.After replaced with single Timer in session's keepAliveLoop function.
Added more suppression comments for API keys lookalike data.
| itests/config/template.conf | ||
|
|
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: generic.ci.audit.changed-semgrepignore.changed-semgrepignore Warning
| **/*.pb.go | ||
| **/*.gen.go |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: generic.ci.audit.changed-semgrepignore.changed-semgrepignore Warning
|
|
||
| # Ignore generated protobuf files | ||
| **/*.pb.go | ||
| **/*.gen.go |
Check warning
Code scanning / Semgrep OSS
Semgrep Finding: generic.ci.audit.changed-semgrepignore.changed-semgrepignore Warning
Fixed error handling in the package.
No description provided.