From 7f0b0274864905d2490c159d9d77ccd19099e419 Mon Sep 17 00:00:00 2001 From: zach rice Date: Wed, 13 Nov 2019 20:03:51 -0500 Subject: [PATCH] changing ret err to warning for owner-path scan --- audit/audit.go | 4 +++- hosts/github.go | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/audit/audit.go b/audit/audit.go index 34f22afc..0d5391e8 100644 --- a/audit/audit.go +++ b/audit/audit.go @@ -2,8 +2,10 @@ package audit import ( "fmt" + log "github.com/sirupsen/logrus" "github.com/zricethezav/gitleaks/manager" "io/ioutil" + "path" ) @@ -20,7 +22,7 @@ func Run(m *manager.Manager) error { } m.Opts.RepoPath = fmt.Sprintf("%s/%s", m.Opts.OwnerPath, f.Name()) if err := runHelper(NewRepo(m)); err != nil { - return err + log.Warnf("%s is not a git repo, skipping", f.Name()) } } return nil diff --git a/hosts/github.go b/hosts/github.go index bf1ab358..5114b7fa 100644 --- a/hosts/github.go +++ b/hosts/github.go @@ -80,6 +80,7 @@ func (g *Github) Audit() { for _, repo := range githubRepos { r := audit.NewRepo(&g.manager) + r.Name = *repo.Name err := r.Clone(&git.CloneOptions{ URL: *repo.CloneURL, })