Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
fix(snowflake): avoid extraneous attempts (#2057)
Richard Gomez69d5e0c993bd
diff --git a/pkg/detectors/snowflake/snowflake.go b/pkg/detectors/snowflake/snowflake.goindex 0b837f9e1..fda103aea 100644--- a/pkg/detectors/snowflake/snowflake.go+++ b/pkg/detectors/snowflake/snowflake.go@@ -116,6 +116,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultctx = context.Background()}+ // Disable pool + retries to prevent flooding the server with failed login attemps.+ db.SetConnMaxLifetime(time.Second)+ db.SetMaxOpenConns(1)+err = db.PingContext(ctx)if err != nil {if strings.Contains(err.Error(), "Incorrect username or password was specified") {