mirror of
https://github.com/pushbits/server.git
synced 2025-05-31 17:56:33 +02:00
Add scans with gosec
This commit is contained in:
parent
56f39cf64c
commit
5cd3627dc6
8 changed files with 47 additions and 12 deletions
|
@ -1,7 +1,7 @@
|
|||
package credentials
|
||||
|
||||
import (
|
||||
"crypto/sha1"
|
||||
"crypto/sha1" //#nosec G505 -- False positive, see the use below.
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
|
@ -21,7 +21,7 @@ func IsPasswordPwned(password string) (bool, error) {
|
|||
return true, nil
|
||||
}
|
||||
|
||||
hash := sha1.Sum([]byte(password))
|
||||
hash := sha1.Sum([]byte(password)) //#nosec G401 -- False positive, only the first 5 bytes are transmitted.
|
||||
hashStr := fmt.Sprintf("%X", hash)
|
||||
lookup := hashStr[0:5]
|
||||
match := hashStr[5:]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue