Compare commits

..
4 Commits
Author SHA1 Message Date
Zachary Rice 12d276acd7 Bug 553 global allowlist (#554)
* add global file check

* rm whitespace
2021-04-22 18:07:07 -04:00
Pavel Shklovsky e6934bf0a5 Docker-based pre-commit configuration example (#551)
* Docker-based pre-commit configuration example

* Docker-based pre-commit configuration example
2021-04-21 12:58:03 -04:00
Zachary Rice 6f5ad9dc0b Update README.md 2021-04-12 11:07:28 -04:00
Zachary Rice a2019a4782 Update README.md 2021-04-09 14:21:15 -04:00
3 changed files with 21 additions and 2 deletions

No files matched your search

+1 -2
View File
@@ -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
[![gammanet](https://gammanet.com/assets/images/new-design/gamma-logo.png)](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)
+14
View File
@@ -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
+6
View File
@@ -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)