Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
[chore] - update comments and logs. (#1654)
ahrava2a7a2087e08
diff --git a/pkg/sources/github/github.go b/pkg/sources/github/github.goindex 46ddaf583..0f54f1249 100644--- a/pkg/sources/github/github.go+++ b/pkg/sources/github/github.go@@ -59,7 +59,7 @@ type Source struct {filteredRepoCache *filteredRepoCachememberCache map[string]struct{}repoSizes repoSize- totalRepoSize int // total size in bytes of all repos+ totalRepoSize int // total size of all repos in kbgit *git.GitscanOptMu sync.Mutex // protects the scanOptions@@ -116,7 +116,7 @@ func (s *Source) JobID() int64 {type repoSize struct {mu sync.RWMutex- repoSizes map[string]int // size in bytes of each repo+ repoSizes map[string]int // size in kb of each repo}func (r *repoSize) addRepo(repo string, size int) {@@ -775,7 +775,7 @@ func (s *Source) scan(ctx context.Context, installationClient *github.Client, chs.setScanOptions(s.conn.Base, s.conn.Head)repoSize := s.repoSizes.getRepo(repoURL)- logger.V(2).Info(fmt.Sprintf("scanning repo %d/%d", i, len(s.repos)), "repo_size", repoSize)+ logger.V(2).Info(fmt.Sprintf("scanning repo %d/%d", i, len(s.repos)), "repo_size_kb", repoSize)now := time.Now()defer func(start time.Time) {diff --git a/pkg/sources/github/repo.go b/pkg/sources/github/repo.goindex 502a89797..76694d409 100644--- a/pkg/sources/github/repo.go+++ b/pkg/sources/github/repo.go@@ -226,7 +226,7 @@ func (s *Source) processRepos(ctx context.Context, target string, listRepos repos.repoSizes.addRepo(repoURL, r.GetSize())s.totalRepoSize += r.GetSize()s.filteredRepoCache.Set(repoName, repoURL)- logger.V(3).Info("repo attributes", "name", repoName, "size", r.GetSize(), "repo_url", repoURL)+ logger.V(3).Info("repo attributes", "name", repoName, "kb_size", r.GetSize(), "repo_url", repoURL)}if res.NextPage == 0 {