Gitleaks
Notes
Find secrets with Gitleaks 🔑
Features
- Default go-routines spawn defaults to # cores your cpu runs with (assuming hyperthreading=2threads/core). Value comes from GOMAXPROCS/2. I did some benchmarking and notices a plateau when go-routines=max cores. Makes sense cause each goroutine will be redlining that core.
go test -run=Benchmark -bench=. -benchtime=5s
goos: darwin
goarch: amd64
pkg: github.com/zricethezav/gitleaks
BenchmarkAuditRepo1Proc-8 1 17250146938 ns/op
BenchmarkAuditRepo2Proc-8 1 8195122742 ns/op
BenchmarkAuditRepo4Proc-8 2 5076421992 ns/op
BenchmarkAuditRepo8Proc-8 2 4598899766 ns/op
BenchmarkAuditRepo10Proc-8 2 4674707999 ns/op
BenchmarkAuditRepo100Proc-8 2 4597661354 ns/op
BenchmarkAuditRepo1000Proc-8 2 4706597867 ns/op
BenchmarkAuditRepo10000Proc-8 2 4828204609 ns/op
BenchmarkAuditRepo100000Proc-8 2 5163678699 ns/op
BenchmarkAuditLeakRepo1Proc-8 300 23209156 ns/op
BenchmarkAuditLeakRepo2Proc-8 500 14325588 ns/op
BenchmarkAuditLeakRepo4Proc-8 1000 9686543 ns/op
BenchmarkAuditLeakRepo8Proc-8 1000 8920760 ns/op
BenchmarkAuditLeakRepo10Proc-8 1000 8755894 ns/op
BenchmarkAuditLeakRepo100Proc-8 1000 9072689 ns/op
BenchmarkAuditLeakRepo1000Proc-8 1000 8569304 ns/op
BenchmarkAuditLeakRepo10000Proc-8 1000 8502946 ns/op
BenchmarkAuditLeakRepo100000Proc-8 1000 8685711 ns/op
PASS
ok github.com/zricethezav/gitleaks 211.480s
- When auditing users/orgs gitleaks will now delete the repo from disk after the repo audit has been completed if running with
--diskoption. Before v1.6.0, gitleaks would wait until the entire org audit has been complete.... so you were at risk of running out of disk space. This eliminates that fear.