mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-13 00:17:18 +00:00
use new flag
This commit is contained in:
parent
1d2741396d
commit
6b3658fb93
1 changed files with 6 additions and 0 deletions
|
@ -48,6 +48,10 @@ type Source struct {
|
|||
ignoreRepos []string
|
||||
includeRepos []string
|
||||
|
||||
// This is an experimental flag used to investigate some suspicious behavior we've seen with very large GitLab
|
||||
// organizations that have lots of group sharing.
|
||||
enumerateSharedProjects bool
|
||||
|
||||
useCustomContentWriter bool
|
||||
git *git.Git
|
||||
scanOptions *git.ScanOptions
|
||||
|
@ -155,6 +159,7 @@ func (s *Source) Init(ctx context.Context, name string, jobId sources.JobID, sou
|
|||
s.repos = conn.GetRepositories()
|
||||
s.ignoreRepos = conn.GetIgnoreRepos()
|
||||
s.includeRepos = conn.GetIncludeRepos()
|
||||
s.enumerateSharedProjects = !conn.ExcludeProjectsSharedIntoGroups
|
||||
|
||||
ctx.Logger().V(3).Info("setting ignore repos patterns", "patterns", s.ignoreRepos)
|
||||
ctx.Logger().V(3).Info("setting include repos patterns", "patterns", s.includeRepos)
|
||||
|
@ -577,6 +582,7 @@ func (s *Source) getAllProjectRepos(
|
|||
ListOptions: listOpts,
|
||||
OrderBy: gitlab.Ptr(orderBy),
|
||||
IncludeSubGroups: gitlab.Ptr(true),
|
||||
WithShared: gitlab.Ptr(s.enumerateSharedProjects),
|
||||
}
|
||||
for {
|
||||
grpPrjs, res, err := apiClient.Groups.ListGroupProjects(group.ID, listGroupProjectOptions)
|
||||
|
|
Loading…
Reference in a new issue