mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-27 03:34:22 +01:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
991223abab |
No files matched your search
@@ -7,7 +7,6 @@ import (
|
||||
"sync"
|
||||
|
||||
"golang.org/x/sync/errgroup"
|
||||
godocutil "golang.org/x/tools/godoc/util"
|
||||
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
"github.com/zricethezav/gitleaks/v8/report"
|
||||
@@ -50,10 +49,6 @@ func FromFiles(source string, cfg config.Config, outputOptions Options) ([]repor
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if !godocutil.IsText(b) {
|
||||
return nil
|
||||
}
|
||||
fis := DetectFindings(cfg, b, p, "")
|
||||
for _, fi := range fis {
|
||||
// need to add 1 since line counting starts at 1
|
||||
|
||||
@@ -9,7 +9,6 @@ import (
|
||||
"github.com/rs/zerolog/log"
|
||||
"github.com/zricethezav/gitleaks/v8/config"
|
||||
"github.com/zricethezav/gitleaks/v8/report"
|
||||
godocutil "golang.org/x/tools/godoc/util"
|
||||
)
|
||||
|
||||
// FromGit accepts a gitdiff.File channel (structure output from `git log -p`) and a configuration
|
||||
@@ -58,10 +57,6 @@ func FromGit(files <-chan *gitdiff.File, cfg config.Config, outputOptions Option
|
||||
continue
|
||||
}
|
||||
|
||||
if !godocutil.IsText([]byte(tf.Raw(gitdiff.OpAdd))) {
|
||||
continue
|
||||
}
|
||||
|
||||
for _, fi := range DetectFindings(cfg, []byte(tf.Raw(gitdiff.OpAdd)), f.NewName, commitSHA) {
|
||||
// don't add to start/end lines if finding is from a file only rule
|
||||
if !strings.HasPrefix(fi.Match, "file detected") {
|
||||
|
||||
Reference in new issue
Block a user