From 7990775cf35ad8b1ce55ef59903432a5d82f1c6b Mon Sep 17 00:00:00 2001
From: Daniel <dhaavi@users.noreply.github.com>
Date: Fri, 24 Jan 2020 11:10:31 +0100
Subject: [PATCH] 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.
---
 .golangci.yml | 7 ++++++-
 session.go    | 3 +--
 2 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/.golangci.yml b/.golangci.yml
index 3c2d6b3..e314a4c 100644
--- a/.golangci.yml
+++ b/.golangci.yml
@@ -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
diff --git a/session.go b/session.go
index 7a358a4..5006029 100644
--- a/session.go
+++ b/session.go
@@ -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