#!/bin/bash USERNAME=$1 # Only reads 200 for now. Havent implemented token + page iteration to extend this # Show repo name when showing findings # display help/usage # display need of install pip install gittyleaks => pip list --format=legacy | grep -F gittyleaks # AND trufflehog => pip install truffleHog echo "Creating directory for $1" mkdir $1 cd $1 echo "" echo "Found these repos:" curl -s https://api.github.com/users/$USERNAME/repos?per_page=200 | jq -r '.[].name' echo "" echo "Downloading repositories" curl -s https://api.github.com/users/$USERNAME/repos?per_page=200 | jq -r '.[].clone_url' | xargs -n 1 git clone echo "" echo "Download doen" echo "" echo "gittyleaks => Checking repos for creds and keys" for d in *; do echo " Checking: $d" gittyleaks -user=$1 -repo $d echo "" echo "" done echo "" echo "truffleHog => Checking repos for creds and keys" for d in *; do echo " Checking: $d" trufflehog --regex --entropy=False $d echo "" echo "" done echo "" echo "Fin"