Audit the random number generation source (rand) GSC-G404
Security
Minor
1 occurrence in this check
Use of weak random number generator (math/rand instead of crypto/rand)
109		return errors.New("no valid secondary to transfer primary")
110	}
111
112	r := rand.New(rand.NewSource(time.Now().UnixNano()))113	nextPrimaryID := r.Intn(len(primaryIDs))
114
115	clusterID, err := etcdutil.GetClusterID(client, utils.ClusterIDPath)