Skip to content

Latest commit

 

History

History
30 lines (24 loc) · 1.09 KB

README.md

File metadata and controls

30 lines (24 loc) · 1.09 KB

secret-scan

This is a small wrapper for Gittyleaks to add recursiveness and better output control.

I wrote this because I had a need to scan multiple Git repositories w/ Gittyleaks. This script will iterate through the target directory, assuming each nested directory is a Git repo, and run GL on them. The output will then be written to the output directory, with the following format: <output dir>/<scanned repo>_secrets.txt

If you couldn't tell, it requires Gittyleaks to be installed.

Usage

./secretScan.sh <target directory> <output directory>

  • ./secretScan.sh /repositories /repositories/secrets

Assumed Directory Structure

-> repositories/
----> repo1
----> repo2
----> repo3


Example Output Structure

With command arguments: ./secretScan.sh /repositories /repositories/secrets

-> repositories/
----> repo1
----> repo2
----> repo3
----> secrets/
-------> repo1_secrets.txt
-------> repo2_secrets.txt
-------> repo3_secrets.txt