mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
fix(snowflake): avoid extraneous attempts (#2057)
Co-authored-by: Dustin Decker <dustin@trufflesec.com>
This commit is contained in:
parent
97afd570ae
commit
69d5e0c993
1 changed files with 4 additions and 0 deletions
|
@ -116,6 +116,10 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
ctx = 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") {
|
||||
|
|
Loading…
Reference in a new issue