Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
add proto that was missing. (#986)
ahrav009756dce619
diff --git a/pkg/sources/filesystem/filesystem.go b/pkg/sources/filesystem/filesystem.goindex 5b71c31de..30fe20ee3 100644--- a/pkg/sources/filesystem/filesystem.go+++ b/pkg/sources/filesystem/filesystem.go@@ -34,7 +34,6 @@ type Source struct {jobId int64verify boolpaths []string- aCtx context.Contextlog *log.Entrysources.Progress}@@ -60,7 +59,6 @@ func (s *Source) JobID() int64 {func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, _ int) error {s.log = log.WithField("source", s.Type()).WithField("name", name)- s.aCtx = aCtxs.name = names.sourceId = sourceIds.jobId = jobIddiff --git a/pkg/sources/git/git.go b/pkg/sources/git/git.goindex e66d14d0b..192d257dc 100644--- a/pkg/sources/git/git.go+++ b/pkg/sources/git/git.go@@ -40,7 +40,6 @@ type Source struct {jobId int64verify boolgit *Git- aCtx context.Contextsources.Progressconn *sourcespb.Git}@@ -89,7 +88,6 @@ func (s *Source) JobID() int64 {// Init returns an initialized GitHub source.func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error {- s.aCtx = aCtxs.name = names.sourceId = sourceIds.jobId = jobIddiff --git a/pkg/sources/github/github.go b/pkg/sources/github/github.goindex 2f0e7c00c..9f1bd1e24 100644--- a/pkg/sources/github/github.go+++ b/pkg/sources/github/github.go@@ -56,7 +56,6 @@ type Source struct {ignoreRepos []stringgit *git.GithttpClient *http.Client- aCtx context.Contextlog *log.Entryconn *sourcespb.GitHubjobPool *errgroup.Group@@ -128,7 +127,6 @@ func (s *Source) UserAndToken(ctx context.Context, installationClient *github.Clfunc (s *Source) Init(aCtx context.Context, name string, jobID, sourceID int64, verify bool, connection *anypb.Any, concurrency int) error {s.log = log.WithField("source", s.Type()).WithField("name", name)- s.aCtx = aCtxs.name = names.sourceID = sourceIDs.jobID = jobIDdiff --git a/pkg/sources/gitlab/gitlab.go b/pkg/sources/gitlab/gitlab.goindex 74a83602a..c139c0bbf 100644--- a/pkg/sources/gitlab/gitlab.go+++ b/pkg/sources/gitlab/gitlab.go@@ -43,7 +43,6 @@ type Source struct {ignoreRepos []stringgit *git.GitscanOptions *git.ScanOptions- aCtx context.ContextresumeInfoSlice []stringresumeInfoMutex sync.MutexjobSem *semaphore.Weighted@@ -68,9 +67,8 @@ func (s *Source) JobID() int64 {}// Init returns an initialized Gitlab source.-func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error {+func (s *Source) Init(_ context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error {- s.aCtx = aCtxs.name = names.sourceId = sourceIds.jobId = jobIddiff --git a/pkg/sources/s3/s3.go b/pkg/sources/s3/s3.goindex eb55fca28..7dc2489c6 100644--- a/pkg/sources/s3/s3.go+++ b/pkg/sources/s3/s3.go@@ -35,7 +35,6 @@ type Source struct {jobId int64verify boolconcurrency int- aCtx context.Contextlog logr.Loggersources.ProgresserrorCount *sync.Map@@ -62,7 +61,6 @@ func (s *Source) JobID() int64 {func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error {s.log = context.WithValues(aCtx, "source", s.Type(), "name", name).Logger()- s.aCtx = aCtxs.name = names.sourceId = sourceIds.jobId = jobIddiff --git a/pkg/sources/syslog/syslog.go b/pkg/sources/syslog/syslog.goindex 7770f0a51..fce51d432 100644--- a/pkg/sources/syslog/syslog.go+++ b/pkg/sources/syslog/syslog.go@@ -32,7 +32,6 @@ type Source struct {jobId int64verify boolsyslog *Syslog- aCtx context.Contextsources.Progressconn *sourcespb.Syslog}@@ -83,9 +82,8 @@ func (s *Source) InjectConnection(conn *sourcespb.Syslog) {}// Init returns an initialized Syslog source.-func (s *Source) Init(aCtx context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error {+func (s *Source) Init(_ context.Context, name string, jobId, sourceId int64, verify bool, connection *anypb.Any, concurrency int) error {- s.aCtx = aCtxs.name = names.sourceId = sourceIds.jobId = jobIddiff --git a/proto/sources.proto b/proto/sources.protoindex 08b1333e8..6350d0e56 100644--- a/proto/sources.proto+++ b/proto/sources.proto@@ -157,6 +157,7 @@ message GitHub {string head = 9;string base = 10;repeated string ignoreRepos = 11;+ repeated string includeRepos = 12;}message JIRA {