diff --git a/internal/namesgenerator/names-generator.go b/internal/namesgenerator/names-generator.go index 3ec6a5565f..7860a0be5d 100644 --- a/internal/namesgenerator/names-generator.go +++ b/internal/namesgenerator/names-generator.go @@ -12,7 +12,7 @@ package namesgenerator import ( - "math/rand" + "math/rand/v2" "strconv" ) @@ -848,13 +848,13 @@ var ( // integer between 0 and 10 will be added to the end of the name, e.g `focused_turing3` func GetRandomName(retry int) string { begin: - name := left[rand.Intn(len(left))] + "_" + right[rand.Intn(len(right))] //nolint:gosec // G404: Use of weak random number generator (math/rand instead of crypto/rand) + name := left[rand.IntN(len(left))] + "_" + right[rand.IntN(len(right))] // #nosec G404 -- Use of weak random number generator (math/rand instead of crypto/rand) if name == "boring_wozniak" /* Steve Wozniak is not boring */ { goto begin } if retry > 0 { - name += strconv.Itoa(rand.Intn(10)) //nolint:gosec // G404: Use of weak random number generator (math/rand instead of crypto/rand) + name += strconv.Itoa(rand.IntN(10)) // #nosec G404 -- Use of weak random number generator (math/rand instead of crypto/rand) } return name }