Skip to content

Instantly share code, notes, and snippets.

@int0x80
Created January 7, 2021 15:59
Show Gist options
  • Save int0x80/79ef32fdf0a248c21788b5d83158a202 to your computer and use it in GitHub Desktop.
Save int0x80/79ef32fdf0a248c21788b5d83158a202 to your computer and use it in GitHub Desktop.

Finding creds in git repos is awesome.

$ for commit in $(seq 1 $(git reflog | wc -l)); do git diff HEAD@{$commit} 2>/dev/null | grep password; done
-spring.datasource.password=g!'301T%y%xT@uL`
+spring.datasource.password=4AT&G;[H@&'\^uDK
-spring.datasource.password=UmAnR=-v|{2=gyx?
+spring.datasource.password=4AT&G;[H@&'\^uDK
...

I do this as a double-check alongside running tools like gitrob and gitleaks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment