Skip to content

Find, verify, and analyze leaked credentials

reword and fix error logging

Dustin Decker2178f1f42eac
diff --git a/Dockerfile b/Dockerfile
index cb910ff88..0e7492ff5 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -7,7 +7,7 @@ COPY . .
RUN CGO_ENABLED=0 go build -a -o trufflehog main.go
FROM alpine:3.15
-RUN apk add --no-cache git
+RUN apk add --no-cache git; mkdir /tmp
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --from=builder /build/trufflehog /usr/bin/trufflehog
ENTRYPOINT ["/usr/bin/trufflehog"]
diff --git a/Dockerfile.goreleaser b/Dockerfile.goreleaser
index e2834ec2e..ac7c9e4ca 100644
--- a/Dockerfile.goreleaser
+++ b/Dockerfile.goreleaser
@@ -2,6 +2,7 @@ FROM alpine:3.15
RUN apk add --no-cache git
WORKDIR /usr/bin/
+RUN mkdir /tmp
COPY trufflehog .
ENTRYPOINT ["/usr/bin/trufflehog"]
diff --git a/pkg/sources/s3/s3.go b/pkg/sources/s3/s3.go
index 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 chan
errorCount.Store(prefix, nErr)
//too many consective errors on this page
if 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 chan
errorCount.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
}