Skip to content

Find, verify, and analyze leaked credentials

quick patch for cfor enumeration (#3155)

joeleonjrf927076483b6
diff --git a/pkg/sources/github_experimental/object_discovery.go b/pkg/sources/github_experimental/object_discovery.go
index 7651ad2fb..10ef15e00 100644
--- a/pkg/sources/github_experimental/object_discovery.go
+++ b/pkg/sources/github_experimental/object_discovery.go
@@ -640,6 +640,12 @@ func (s *Source) EnumerateAndScanAllObjects(ctx context.Context, chunksChan chan
// Guess all possible commit hashes
processCommits(ctx, possibleCommits, owner, repoName, folderPath)
+ // Read in the new commits
+ validHiddenCommits, err = readCommitsFromDisk(validHiddenCommit, folderPath)
+ if err != nil {
+ return fmt.Errorf("failed to read valid hidden commits from disk: %w", err)
+ }
+
// Download commit hashes and checkout into branches (only way scanner will pick them up)
err = downloadPatches(validHiddenCommits, path)
if err != nil {