Skip to content

Commit

Permalink
Merge pull request #17 from rapid7/check-for-nil-ssm
Browse files Browse the repository at this point in the history
Check for nil SSM stanza and return
  • Loading branch information
asebastian-r7 authored Mar 5, 2019
2 parents 2ea17bb + 7ff5481 commit b70d098
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/secret/ssm.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ func GetSSMSecret(k string, v []byte) (string, error) {
return "", err
}

if j["$ssm"] == nil {
return "", errors.New("$ssm is nil, this is most likely due to an indentation problem")
}

var region string
var service string
if _, ok := j["$ssm"].(map[string]interface{})["service"]; ok {
Expand Down

0 comments on commit b70d098

Please sign in to comment.