gitsecrets

git secrets --scan [-r|--recursive] [--cached] [--no-index] [--untracked] [<files>...]
git secrets --scan-history
git secrets --install [-f|--force] [<target-directory>]
git secrets --list [--global]
git secrets --add [-a|--allowed] [-l|--literal] [--global] <pattern>
git secrets --add-provider [--global] <command> [arguments...]
git secrets --register-aws [--global]
git secrets --aws-provider [<credentials-file>]
git clone https://github.com/WebGoat/WebGoat.git
git clone https://github.com/awslabs/git-secrets.git
cd git-secrets/
sudo make install
git secrets
cd ..
cd WebGoat
git secrets --install
git secrets --scan
nano accesskeys.txt 

Enter this text into the accesskeys.txt file: 
This is a test!
password=ex@mplepassword
password=******
More test...

git secrets --scan

git secrets --add 'password\s*=\s*.+'
git secrets --scan

git secrets --add --allowed --literal 'ex@mplepassword'
git secrets --scan

nano accesskeys.txt
<copy and paste text from .aws/credentials file into accesskeys.txt>
git secrets --register-aws
git secrets --scan

Additional Reference: https://github.com/awslabs/git-secrets

Last updated