Eric Ripa 5585e10933 Change error handling in getRepo functions
Instead of returning an empty list of repositories
and an error if any cloning operation fails, simply
store the error in the Repo instance and always
return all repos.

Then later on check for errors during the audit step.

By having this approach we don't prematurely exit
the scanning if there are problems during cloning,
such as if a repository is empty and fails to clone.
2018-08-09 11:31:29 -07:00
2018-07-20 20:02:52 -05:00
2018-07-20 20:02:52 -05:00
2018-07-22 20:16:09 -05:00
2018-07-20 21:17:49 -05:00
2018-07-20 20:02:52 -05:00
2018-07-20 20:02:52 -05:00
2018-07-20 20:02:52 -05:00
2018-07-21 14:19:28 -05:00
2018-07-22 20:16:09 -05:00
2018-07-22 10:03:01 -05:00

gitleaks

Travis

Audit git repos for secrets

Powered by src-d's go-git

Installing

go get -u github.com/zricethezav/gitleaks

Or download from release binaries here

Usage and Options

Usage:
  gitleaks [OPTIONS]

Application Options:
  -r, --repo=          Repo url to audit
      --github-user=   User url to audit
      --github-org=    Organization url to audit
  -p, --private        Include private repos in audit
  -c, --commit=        sha of commit to stop at
      --repo-path=     Path to repo
      --owner-path=    Path to owner directory (repos discovered)
      --max-go=        Maximum number of concurrent go-routines gitleaks spawns
      --disk           Clones repo(s) to disk
      --all-refs       run audit on all refs
      --single-search= single regular expression to search for
      --config=        path to gitleaks config
      --ssh-key=       path to ssh key
  -l, --log=           log level
  -v, --verbose        Show verbose output from gitleaks audit
      --report=        path to write report file
      --redact         redact secrets from log messages and report

Help Options:
  -h, --help           Show this help message

Exit Codes

1: leaks present
0: no leaks

Additional Examples and Explanations

Check the wiki here

If you find a valid leak in a repo

Please read this 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 --help

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%