mirror of
https://github.com/gitleaks/gitleaks.git
synced 2026-11-30 05:04:22 +01:00
default conc limit too high... whoops
This commit is contained in:
1 parent
2533ea6661
commit
5c1bb93068
1 file changed
+8
-1
@@ -87,7 +87,7 @@ func getLeaks(repoName string, concurrency int) []LeakElem {
|
|||||||
)
|
)
|
||||||
|
|
||||||
if concurrency == 0 {
|
if concurrency == 0 {
|
||||||
concurrency = 100
|
concurrency = 10
|
||||||
}
|
}
|
||||||
semaphoreChan := make(chan struct{}, concurrency)
|
semaphoreChan := make(chan struct{}, concurrency)
|
||||||
|
|
||||||
@@ -112,6 +112,10 @@ func getLeaks(repoName string, concurrency int) []LeakElem {
|
|||||||
defer commitWG.Done()
|
defer commitWG.Done()
|
||||||
var leakPrs bool
|
var leakPrs bool
|
||||||
|
|
||||||
|
if currCommit == "" {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
if err := os.Chdir(fmt.Sprintf("%s/%s", appRoot, repoName)); err != nil {
|
if err := os.Chdir(fmt.Sprintf("%s/%s", appRoot, repoName)); err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
@@ -122,8 +126,11 @@ func getLeaks(repoName string, concurrency int) []LeakElem {
|
|||||||
<-semaphoreChan
|
<-semaphoreChan
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
fmt.Printf("error retrieving diff for commit %s try turning concurrency factor down %v\n", currCommit, err)
|
||||||
|
cleanup(repoName)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
lines := checkRegex(string(out))
|
lines := checkRegex(string(out))
|
||||||
if len(lines) == 0 {
|
if len(lines) == 0 {
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in new issue
Block a user