The detect_aws_credentials hook raises a false positive match when AWS credential values contain only a space character(s). For example, if the ~/.aws/credentials file contains the following:
[test]
aws_access_key_id = ggfgafg
aws_secret_access_key =
By having a space character after the "=" for the aws_secret_access_key variable it results in:
Detect AWS Credentials...................................................Failed
hookid: detect-aws-credentials
AWS secret found in test.txt: ****************************
Which is technically true, but in essence the hook should trim (remove) the space(s) in the values for the variables prior to checking the file(s) to prevent this confusing issue from occurring.
The detect_aws_credentials hook raises a false positive match when AWS credential values contain only a space character(s). For example, if the ~/.aws/credentials file contains the following:
By having a space character after the "=" for the aws_secret_access_key variable it results in:
Which is technically true, but in essence the hook should trim (remove) the space(s) in the values for the variables prior to checking the file(s) to prevent this confusing issue from occurring.