Standard Library

GoCryptoRand

crypto/rand package. The Reader is the cryptographically secure random source — use this instead of math/rand for tokens and session IDs.

Other Methods

.Read()Neutral
#
Signature
Read(b []byte) (n int, err error)

Fills b with cryptographically secure random bytes. Preferred over math/rand.Read.

.Int()Neutral
#
Signature
Int(rand io.Reader, max *big.Int) (*big.Int, error)

Returns cryptographically secure random int. Safe for security purposes.

Fully-Qualified Names

FQNField
crypto/randfqns[0]

Wrong FQN → 0 findings. Verify with: change fqns to garbage → must produce 0 results.

Import

go.mod
// standard library — no go.mod entry required
rule.py
from codepathfinder.go_rule import GoCryptoRand