Scan entire Git repo for dangerous Amazon Web Service IDs

git grep -Ew '[A-Z0-9]{20}'

September 5, 2018bashoneliners

Explanation

Letting your AWS credentials escape is very dangerous! This simple tool makes sure none of your secrets make into version control and therefore out into the hands of evil robots.

Use Git to quickly search for things that look like AWS IDs: a 20-character uppercase word. The -w adds word boundaries around the search pattern, and the -E make it possible to use extended regex syntax, in this example the {20} count.

Related one-liners

Scan entire Git repos for dangerous Amazon Web Service IDs

git ls-tree --full-tree -r --name-only HEAD | xargs egrep -w '[A-Z0-9]{20}'

August 31, 2018johntellsall