mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-27 03:34:22 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
12d276acd7 | ||
|
|
e6934bf0a5 | ||
|
|
6f5ad9dc0b | ||
|
|
a2019a4782 |
No files matched your search
@@ -2,7 +2,6 @@
|
||||
<img alt="gitleaks" src="https://raw.githubusercontent.com/zricethezav/gifs/master/gitleakslogo.png" height="70" />
|
||||
<p align="center">
|
||||
<a href="https://travis-ci.org/zricethezav/gitleaks"><img alt="Travis" src="https://img.shields.io/travis/zricethezav/gitleaks/master.svg?style=flat-square"></a>
|
||||
<a href="https://gitter.im/gitleaks/gitleaks"><img alt="Travis" src="https://badges.gitter.im/gitleaks/gitleaks.svg?style=flat-square"></a>
|
||||
</p>
|
||||
</p>
|
||||
|
||||
@@ -254,7 +253,7 @@ You can always set the exit code when leaves are encountered with the `--leaks-e
|
||||
```
|
||||
|
||||
### Sponsors ❤️
|
||||
#### Corporate Sponsors
|
||||
#### Organization Sponsors
|
||||
[](https://gammanet.com/?utm_source=gitleaks&utm_medium=homepage&utm_campaign=gitleaks_promotion)
|
||||
|
||||
Gamma proactively detects and remediates data leaks across cloud apps. Scan your public repos for secret leaks with [Gamma](https://gammanet.com/github-demo?utm_source=gitleaks&utm_medium=homepage&utm_campaign=gitleaks_promotion)
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
# pre-commit configuration example to add docker-based hook that executes gitleaks
|
||||
# This should be added to .pre-commit-config.yaml coniguration file: https://pre-commit.com/#2-add-a-pre-commit-configuration
|
||||
|
||||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: gitleaks
|
||||
name: Gitleaks
|
||||
language: docker_image
|
||||
entry: zricethezav/gitleaks:v7.4.0
|
||||
args:
|
||||
- --config-path
|
||||
- .gitleaks.toml
|
||||
- --verbose
|
||||
@@ -184,6 +184,12 @@ func (us *UnstagedScanner) Scan() (Report, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// Check if file is allow listed
|
||||
if us.cfg.Allowlist.FileAllowed(filepath.Base(filename)) ||
|
||||
us.cfg.Allowlist.PathAllowed(filename) {
|
||||
continue
|
||||
}
|
||||
|
||||
dmp := diffmatchpatch.New()
|
||||
diffs := dmp.DiffMain(prevFileContents, currFileContents, false)
|
||||
prettyDiff := diffPrettyText(diffs)
|
||||
|
||||
Reference in new issue
Block a user