Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Update buffer (#3255)
ahrav06bbd6fd493f
diff --git a/pkg/engine/engine.go b/pkg/engine/engine.goindex b19b0054d..dfc5f4d88 100644--- a/pkg/engine/engine.go+++ b/pkg/engine/engine.go@@ -457,6 +457,7 @@ func (e *Engine) initialize(ctx context.Context) error {// This reflects the anticipated lower volume of data that needs re-verification.// The buffer size is a trade-off between memory usage and the need to prevent blocking.verificationOverlapChunksChanMultiplier = 25+ resultsChanMultiplier = detectableChunksChanMultiplier)// Channels are used for communication between different parts of the engine,@@ -467,7 +468,7 @@ func (e *Engine) initialize(ctx context.Context) error {e.verificationOverlapChunksChan = make(chan verificationOverlapChunk, defaultChannelBuffer*verificationOverlapChunksChanMultiplier,)- e.results = make(chan detectors.ResultWithMetadata, defaultChannelBuffer)+ e.results = make(chan detectors.ResultWithMetadata, defaultChannelBuffer*resultsChanMultiplier)e.dedupeCache = cachectx.Logger().V(4).Info("engine initialized")@@ -651,7 +652,7 @@ func (e *Engine) startVerificationOverlapWorkers(ctx context.Context) {}func (e *Engine) startNotifierWorkers(ctx context.Context) {- const notifierWorkerRatio = 4+ const notifierWorkerRatio = 2maxNotifierWorkers := 1if numWorkers := e.concurrency / notifierWorkerRatio; numWorkers > 0 {maxNotifierWorkers = numWorkers