mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-07-24 09:15:31 +02:00
gitleaks: add page (#12653)
Co-authored-by: K.B.Dharun Krishna <kbdharunkrishna@gmail.com> Co-authored-by: Vítor Henrique <87824454+vitorhcl@users.noreply.github.com>
This commit is contained in:
parent
f225b799c9
commit
6789ec99a8
1 changed files with 32 additions and 0 deletions
32
pages/common/gitleaks.md
Normal file
32
pages/common/gitleaks.md
Normal file
|
@ -0,0 +1,32 @@
|
|||
# gitleaks
|
||||
|
||||
> Detect secrets and API keys leaked in Git repositories.
|
||||
> More information: <https://github.com/gitleaks/gitleaks>.
|
||||
|
||||
- Scan a remote repository:
|
||||
|
||||
`gitleaks detect --repo-url {{https://github.com/username/repository.git}}`
|
||||
|
||||
- Scan a local directory:
|
||||
|
||||
`gitleaks detect --source {{path/to/repository}}`
|
||||
|
||||
- Output scan results to a JSON file:
|
||||
|
||||
`gitleaks detect --source {{path/to/repository}} --report {{path/to/report.json}}`
|
||||
|
||||
- Use a custom rules file:
|
||||
|
||||
`gitleaks detect --source {{path/to/repository}} --config-path {{path/to/config.toml}}`
|
||||
|
||||
- Start scanning from a specific commit:
|
||||
|
||||
`gitleaks detect --source {{path/to/repository}} --log-opts {{--since=commit_id}}`
|
||||
|
||||
- Scan uncommitted changes before a commit:
|
||||
|
||||
`gitleaks protect --staged`
|
||||
|
||||
- Display verbose output indicating which parts were identified as leaks during the scan:
|
||||
|
||||
`gitleaks protect --staged --verbose`
|
Loading…
Add table
Reference in a new issue