Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
reword and fix error logging
Dustin Decker2178f1f42eac
diff --git a/Dockerfile b/Dockerfileindex cb910ff88..0e7492ff5 100644--- a/Dockerfile+++ b/Dockerfile@@ -7,7 +7,7 @@ COPY . .RUN CGO_ENABLED=0 go build -a -o trufflehog main.goFROM alpine:3.15-RUN apk add --no-cache git+RUN apk add --no-cache git; mkdir /tmpCOPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crtCOPY --from=builder /build/trufflehog /usr/bin/trufflehogENTRYPOINT ["/usr/bin/trufflehog"]diff --git a/Dockerfile.goreleaser b/Dockerfile.goreleaserindex e2834ec2e..ac7c9e4ca 100644--- a/Dockerfile.goreleaser+++ b/Dockerfile.goreleaser@@ -2,6 +2,7 @@ FROM alpine:3.15RUN apk add --no-cache gitWORKDIR /usr/bin/+RUN mkdir /tmpCOPY trufflehog .ENTRYPOINT ["/usr/bin/trufflehog"]diff --git a/pkg/sources/s3/s3.go b/pkg/sources/s3/s3.goindex 9e64b1b12..ca34f6413 100644--- a/pkg/sources/s3/s3.go+++ b/pkg/sources/s3/s3.go@@ -248,9 +248,9 @@ func (s *Source) pageChunker(ctx context.Context, client *s3.S3, chunksChan chanerrorCount.Store(prefix, nErr)//too many consective errors on this pageif nErr.(int) > 3 {- s.log.Warnf("Too many consecutive errors. Blacklisting %s", prefix)+ s.log.Warnf("Too many consecutive errors. Excluding %s", prefix)}- log.Debugf("Error Counts: %s:%s", prefix, nErr)+ log.Debugf("Error Counts: %s:%d", prefix, nErr)return}body, err := ioutil.ReadAll(res.Body)@@ -269,7 +269,7 @@ func (s *Source) pageChunker(ctx context.Context, client *s3.S3, chunksChan chanerrorCount.Store(prefix, nErr)if nErr.(int) > 3 {- s.log.Warnf("Too many consecutive errors. Blacklisting %s", prefix)+ s.log.Warnf("Too many consecutive errors. Excluding %s", prefix)}return}