diff --git a/cmd/icingadb-migrate/main.go b/cmd/icingadb-migrate/main.go index a0fc5644a..7b04382f0 100644 --- a/cmd/icingadb-migrate/main.go +++ b/cmd/icingadb-migrate/main.go @@ -2,7 +2,7 @@ package main import ( "context" - "crypto/sha1" + "crypto/sha1" // #nosec G505 -- used as a non-cryptographic hash function to hash IDs "database/sql" _ "embed" "encoding/hex" diff --git a/cmd/icingadb-migrate/misc.go b/cmd/icingadb-migrate/misc.go index 3d33ef8c2..8a63825fd 100644 --- a/cmd/icingadb-migrate/misc.go +++ b/cmd/icingadb-migrate/misc.go @@ -2,7 +2,7 @@ package main import ( "context" - "crypto/sha1" + "crypto/sha1" // #nosec G505 -- used as a non-cryptographic hash function to hash IDs "github.com/icinga/icinga-go-library/database" "github.com/icinga/icinga-go-library/objectpacker" "github.com/icinga/icinga-go-library/types" @@ -54,7 +54,7 @@ var objectTypes = map[uint8]string{1: "host", 2: "service"} // hashAny combines objectpacker.PackAny and SHA1 hashing. func hashAny(in interface{}) []byte { - hash := sha1.New() + hash := sha1.New() // #nosec G401 -- used as a non-cryptographic hash function to hash IDs if err := objectpacker.PackAny(in, hash); err != nil { panic(err) }