We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
math/rand/v2
In Go 1.22, the math/rand/v2 package has been added. Is it necessary to change G404 or create a new G405?
G404
G405
func RandomString(letters []byte, n int) string { b := make([]byte, n) for i := range n { b[i] = letters[rand.IntN(len(letters))] } return string(b) }
v2.19.0
go version go1.22.0
Raised a security fatal
No error
The text was updated successfully, but these errors were encountered:
I would enhance the existing rule to support the rand v2.
Sorry, something went wrong.
@ccojocar Thank you for your suggestion! Would it be alright if I take care of implementing it on my end?
Yes, please go ahead!
fixed by #1112
No branches or pull requests
Summary
In Go 1.22, the
math/rand/v2
package has been added. Is it necessary to changeG404
or create a newG405
?Steps to reproduce the behavior
gosec version
v2.19.0
Go version (output of 'go version')
go version go1.22.0
Operating system / Environment
Expected behavior
Raised a security fatal
Actual behavior
No error
The text was updated successfully, but these errors were encountered: