Skip to content

Instantly share code, notes, and snippets.

@jdotpz
Created June 27, 2014 21:04
Show Gist options
  • Save jdotpz/976ad3481495d6ca1767 to your computer and use it in GitHub Desktop.
Save jdotpz/976ad3481495d6ca1767 to your computer and use it in GitHub Desktop.
A post-commit hook to warn you if it sees AWS keys (AKAI.....)
#!/bin/bash
# CHECK FOR FILES WITH AKAI
if grep -R "AKAI" ./*
then
echo " ";echo " ";echo " ";echo " "
echo "================================"
echo " "
echo "WARNING! WARNING! WARNING! WARNING! WARNING!"
echo " "
echo " "
echo "A potential AWS key seems to be somewhere in your repo!"
echo " "
echo "BEWARE BEFORE YOU GIT PUSH"
echo " "
echo "================================"
echo " ";echo " ";echo " ";echo " "
else
echo "No AWS keys detected in this commit"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment