mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04:22 +01:00
Removing base scanner (#477)
This commit is contained in:
1 parent
7db08bfd90
commit
65a91ae976
8 files changed
+86
-78
No files matched your search
+8
-5
@@ -7,6 +7,9 @@ import (
|
||||
"path/filepath"
|
||||
"strings"
|
||||
|
||||
"github.com/zricethezav/gitleaks/v7/config"
|
||||
"github.com/zricethezav/gitleaks/v7/options"
|
||||
|
||||
log "github.com/sirupsen/logrus"
|
||||
|
||||
"golang.org/x/sync/errgroup"
|
||||
@@ -14,17 +17,17 @@ import (
|
||||
|
||||
// NoGitScanner is a scanner that absolutely despises git
|
||||
type NoGitScanner struct {
|
||||
BaseScanner
|
||||
opts options.Options
|
||||
cfg config.Config
|
||||
}
|
||||
|
||||
// NewNoGitScanner creates and returns a nogit scanner. This is used for scanning files and directories
|
||||
func NewNoGitScanner(base BaseScanner) *NoGitScanner {
|
||||
func NewNoGitScanner(opts options.Options, cfg config.Config) *NoGitScanner {
|
||||
ngs := &NoGitScanner{
|
||||
BaseScanner: base,
|
||||
opts: opts,
|
||||
cfg: cfg,
|
||||
}
|
||||
|
||||
ngs.scannerType = typeNoGitScanner
|
||||
|
||||
// no-git scans should ignore .git folders by default
|
||||
// issue: https://github.com/zricethezav/gitleaks/issues/474
|
||||
// ngs.cfg.Allowlist
|
||||
|
||||
Reference in new issue
Block a user