2018-03-04 20:16:04 -06:00
2018-02-25 16:18:26 -06:00
2018-02-17 11:44:07 -06:00
2018-02-25 16:10:44 -06:00
2018-02-28 23:25:04 -06:00
2018-03-02 16:55:02 -06:00
2018-02-27 11:54:09 -08:00
2018-02-25 16:18:26 -06:00
2018-02-25 16:18:26 -06:00
2018-02-20 09:40:43 -06:00
2018-03-03 21:44:04 -06:00
2018-03-03 21:44:04 -06:00
2018-03-04 20:16:04 -06:00
2018-03-04 18:36:27 -06:00
2018-03-04 18:36:27 -06:00
2018-03-04 20:16:04 -06:00
2018-03-03 21:44:04 -06:00
2018-03-04 18:36:27 -06:00

Alt Text Build Status

Audit git repos for secrets and keys

Installing

go get -u github.com/zricethezav/gitleaks

Usage and Explanation

Alt Text

./gitleaks [options] <url/path>

Gitleaks audits local and remote repos by running regex checks against all commits.

Options

usage: gitleaks [options] <URL>/<path_to_repo>

Options:
 -u --user              Git user mode
 -r --repo              Git repo mode
 -o --org               Git organization mode
 -l --local             Local mode, gitleaks will look for local repo in <path>
 -t --temp              Clone to temporary directory
 -v --verbose           Verbose mode, will output leaks as gitleaks finds them
 --report-path=<STR>    Save report to path, gitleaks default behavior is to save report to pwd
 --clone-path=<STR>     Gitleaks will clone repos here, default pwd
 --concurrency=<INT>    Upper bound on concurrent diffs
 --since=<STR>          Commit to stop at
 --b64Entropy=<INT>     Base64 entropy cutoff (default is 70)
 --hexEntropy=<INT>     Hex entropy cutoff (default is 40)
 -e --entropy           Enable entropy
 -h --help              Display this message
 --token=<STR>          Github API token
 --stopwords            Enables stopwords

Exit Codes

Use these codes to hook gitleaks into whatever pipeline you're running

code explanation
0 Gitleaks succeeded with no leaks
1 Gitleaks failed or wasn't attempted due to execution failure
2 Gitleaks succeeded and leaks were present during the audit

Examples

gitleaks

Run audit on current working directory if .git is present |

gitleaks https://github.com/some/repo

Run audit on github.com/some/repo.git and clone repo to

gitleaks --clone-path=$HOME/Desktop/audits https://github.com/some/repo

Run audit on github.com/some/repo.git and clone repo to $HOME/Desktop/audits

gitleaks --temp https://github.com/some/repo

Run audit on github.com/some/repo.git and clone repo to $TMPDIR (this will remove repos after audit is complete)

gitleaks --temp -u https://github.com/some-user

Run audit on all of some-user's repos. Again, --temp flag will clone all repos into $TMPDIR after be removed after audit

If you find a valid leak in a repo

Please read the Github article on removing sensitive data from a repository to remove the sensitive information from your history.

Run me with docker

Simply run docker run --rm --name=gitleaks zricethezav/gitleaks https://github.com/zricethezav/gitleaks

Or build the image yourself to get the latest version :

docker build -t gitleaks .
docker run --rm --name=gitleaks gitleaks https://github.com/zricethezav/gitleaks

cypherphunky

BTC: 1H2rSXDJZxWcTk2Ugr5P9r9m93m2NhL4xj

BCH: qp4mdaef04g5d0xpgecx78fmruk6vgl4pgqtetrl9h

ETH: 0xe48b4Fce6A1C1a9C780376032895b06b1709AddF

LTC: LRhDzMyGos5CtZMoSTEx5rdLksPUwSrtuz

s/o to @jlakowski for the gimp skillz

S
Description
No description provided
Readme MIT
13 MiB
0 Stars 1 Watchers 0 Forks
2024-10-28 14:31:02 +01:00
Languages
Go 83%
Go Template 16.5%
Shell 0.3%