gosec: G404 - Use of weak rng
math/rand is good enough for uuids. disabling rule locally.
This commit is contained in:
parent
4f91a2cc81
commit
8136209d17
10 changed files with 22 additions and 0 deletions
|
|
@ -564,6 +564,8 @@ func TestBlueprintsChanges(t *testing.T) {
|
|||
|
||||
api, _ := createWeldrAPI(tempdir, rpmmd_mock.BaseFixture)
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
// math/rand is good enough in this case
|
||||
/* #nosec G404 */
|
||||
id := strconv.Itoa(rand.Int())
|
||||
ignoreFields := []string{"commit", "timestamp"}
|
||||
|
||||
|
|
@ -606,6 +608,8 @@ func TestBlueprintsUndo(t *testing.T) {
|
|||
|
||||
api, _ := createWeldrAPI(tempdir, rpmmd_mock.BaseFixture)
|
||||
rand.Seed(time.Now().UnixNano())
|
||||
// math/rand is good enough in this case
|
||||
/* #nosec G404 */
|
||||
id := strconv.Itoa(rand.Int())
|
||||
ignoreFields := []string{"commit", "timestamp"}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue