Options (1)
-s, --sourcebooleanScan a local directory
Example:
gitleaks detect {{[-s|--source]}} {{path/to/repository}}Examples (7)
Scan a remote repository
gitleaks detect --repo-url https://github.com/username/repository.gitScan a local directory
gitleaks detect [-s|--source] path/to/repositoryOutput scan results to a JSON file
gitleaks detect [-s|--source] path/to/repository --report path/to/report.jsonUse a custom rules file
gitleaks detect [-s|--source] path/to/repository --config-path path/to/config.tomlStart scanning from a specific commit
gitleaks detect [-s|--source] path/to/repository --log-opts --since=commit_idScan uncommitted changes before a commit
gitleaks protect --stagedDisplay verbose output indicating which parts were identified as leaks during the scan
gitleaks protect --staged --verbosemade by @shridhargupta | data from tldr-pages