Skip to content

Commit 8a3588f

Browse files
authored
ignore false positive on G407 (#106)
1 parent e04c7c1 commit 8a3588f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

encryption/crypt.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,6 @@ func (d *cryptor) Decrypt(encrypted Encrypted) ([]byte, error) {
7272
return nil, fmt.Errorf("Unable to create GCM-wrapped cipher: %q", err)
7373
}
7474

75+
// #nosec G407 - G407 is incorrectly flagging Decrypt calls that use the nonce provided in the encrypted data. we randomize this for encryption, which is where it matters. https://github.com/securego/gosec/issues/1209
7576
return aead.Open(nil, encrypted.Nonce, encrypted.CipherText, nil)
7677
}

0 commit comments

Comments
 (0)