Crypto Weakrandsource

Go's `math/rand` is not meant for use in generating random numbers for any cryptographic or security sensitive context. This includes generating random numbers that could be used in user specific identifiers or where the random number that is generated is considered to be secret. Replace all imports of `math/rand` with `crypto/rand`.

IndexedPublic repositoryMediumHigh confidenceVerifiedApache-2.0Go
greprules fetch gitlab-sast-go-crypto-rule-weakrandsource --engine opengrep

Description

Go's `math/rand` is not meant for use in generating random numbers for any cryptographic or security sensitive context. This includes generating random numbers that could be used in user specific identifiers or where the random number that is generated is considered to be secret. Replace all imports of `math/rand` with `crypto/rand`.