Remediate SAF-01-004 Crypto: Key Management/Encryption with 1-Byte Key (Critical)

Also, add linter error for FIXME comments in order to prevent shipping unfinished code.
This commit is contained in:
Daniel 2020-01-24 11:10:31 +01:00
parent ecff771bd9
commit 7990775cf3
2 changed files with 7 additions and 3 deletions

View file

@ -7,5 +7,10 @@ linters:
- funlen
- whitespace
- wsl
- godox
linters-settings:
godox:
# report any comments starting with keywords, this is useful for TODO or FIXME comments that
# might be left in the code accidentally and should be resolved before merging
keywords:
- FIXME

View file

@ -314,8 +314,7 @@ func newSession(e *Envelope) (*Session, error) { //nolint:gocognit,gocyclo
err := e.LoopSecrets(SignetSchemeKey, func(signet *Signet) error {
totalSignetsSeen++
keySourceAvailable = true
// FIXME
return nil
return s.calcAndCheckSecurityLevel(nil, signet)
})
if err != nil {
return nil, err