I want to identify the AWS basic auth from the files in a repository. For this I want to add a pattern for git-secret to scan the value for basic auth value in the repository.
I have tried with the below pattern:
git secrets --add '^\bBasic [A-Za-z0-9[!@#$%^&*(),.?":{}|<>=]{60}$'
patterns = (\"|')?(Basic )[A-Za-z0-9\\+=]{60}(\"|')$
The script is as follows:
git secrets --add '^\bBasic [A-Za-z0-9[!@#$%^&*(),.?":{}|<>=]{60}$'
git secrets --add 'Basic [A-Za-z0-9!@#$%^&*(),.?":{}|<>=]{60}'
I expect the pattern to add for git-secret to identify the AWS basic auth value from the repository.
Here is an example of a basic auth value:
Basic aW5mQExampleauthvalueGlCeGUzeXk4UmMyT29HeFJOVFVEXAMPLEKEYS==
'Basic' + + <60 characters> then we should flag it. If it has less than 60, or more than 60, then it's not a valid string.