mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-28 20:24:22 +01:00
bug fix: use manager pointers instead of value for gitleaks hosts... this was causing an issue with metadata logging
This commit is contained in:
1 parent
e6fabdbb31
commit
b200a13c8d
3 files changed
+9
-9
No files matched your search
+3
-3
@@ -15,14 +15,14 @@ import (
|
||||
// Gitlab wraps a gitlab client and manager. This struct implements what the Host interface defines.
|
||||
type Gitlab struct {
|
||||
client *gitlab.Client
|
||||
manager manager.Manager
|
||||
manager *manager.Manager
|
||||
ctx context.Context
|
||||
wg sync.WaitGroup
|
||||
}
|
||||
|
||||
// NewGitlabClient accepts a manager struct and returns a Gitlab host pointer which will be used to
|
||||
// perform a gitlab audit on an group or user.
|
||||
func NewGitlabClient(m manager.Manager) (*Gitlab, error) {
|
||||
func NewGitlabClient(m *manager.Manager) (*Gitlab, error) {
|
||||
var err error
|
||||
|
||||
gitlabClient := &Gitlab{
|
||||
@@ -82,7 +82,7 @@ func (g *Gitlab) Audit() {
|
||||
|
||||
// iterate of gitlab projects
|
||||
for _, p := range projects {
|
||||
r := audit.NewRepo(&g.manager)
|
||||
r := audit.NewRepo(g.manager)
|
||||
cloneOpts := g.manager.CloneOptions
|
||||
cloneOpts.URL = p.HTTPURLToRepo
|
||||
err := r.Clone(cloneOpts)
|
||||
|
||||
Reference in new issue
Block a user