Browse Source

changing ret err to warning for owner-path scan

zach rice 6 years ago
parent
commit
7f0b027486
2 changed files with 4 additions and 1 deletions
  1. 3 1
      audit/audit.go
  2. 1 0
      hosts/github.go

+ 3 - 1
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

+ 1 - 0
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,
 		})