Skip to content

Find, verify, and analyze leaked credentials

do not report 403s as indeterminate in AWS detector (#1481)

Cody Rosea123d5c5e15c
diff --git a/pkg/detectors/aws/aws.go b/pkg/detectors/aws/aws.go
index b8565645c..256ea42d8 100644
--- a/pkg/detectors/aws/aws.go
+++ b/pkg/detectors/aws/aws.go
@@ -192,7 +192,9 @@ func (s scanner) FromData(ctx context.Context, verify bool, data []byte) (result
continue
}
- s1.VerificationError = fmt.Errorf("request to %v returned unexpected status %d", res.Request.URL, res.StatusCode)
+ if res.StatusCode != 403 {
+ s1.VerificationError = fmt.Errorf("request to %v returned unexpected status %d", res.Request.URL, res.StatusCode)
+ }
}
} else {
s1.VerificationError = err