Audit the random number generation source (rand) GSC-G404
Security
Minor
3 occurrences in this check
Use of weak random number generator (math/rand instead of crypto/rand)
255		StartKey:    []byte(""),
256		EndKey:      []byte(""),
257		RegionEpoch: &metapb.RegionEpoch{ConfVer: 6, Version: 6},
258		Leader:      peers[rand.Intn(3)],259	}
260
261	switch kind {
Use of weak random number generator (math/rand instead of crypto/rand)
1334			Peers:    peers,
1335			StartKey: []byte(fmt.Sprintf("s_%02d", i)),
1336			EndKey:   []byte(fmt.Sprintf("s_%02d", i+1)),
1337			Leader:   peers[rand.Intn(4)%3],1338		})
1339		id += 4
1340	}
Use of weak random number generator (math/rand instead of crypto/rand)
1265			Peers:    peers,
1266			StartKey: []byte(fmt.Sprintf("s_%02d", i)),
1267			EndKey:   []byte(fmt.Sprintf("s_%02d", i+1)),
1268			Leader:   peers[rand.Intn(4)%3],1269		})
1270		id += 4
1271	}