Skip to content

Instantly share code, notes, and snippets.

@malys
Created August 4, 2020 14:51
Show Gist options
  • Save malys/c4c89eba6c32e2d35ee92353103ce478 to your computer and use it in GitHub Desktop.
Save malys/c4c89eba6c32e2d35ee92353103ce478 to your computer and use it in GitHub Desktop.
[GitLeaks for user space] #git #gitleaks #security
user=$1
items=$2
depth=$3
curl --silent -kL https://api.github.com/users/$user/repos?per_page=$items |grep "full_name" |awk -v user="$user" -F"\"" '{print "https://github.com/"$4}' > $user-repos.txt
while read in; do
echo $in
gitleaks --repo="$in" --verbose --pretty --depth=$3 --threads=5 --report=$user-gitleaks-result;
done < $user-repos.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment