mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
reword and fix error logging
This commit is contained in:
parent
e123e9f177
commit
2178f1f42e
3 changed files with 5 additions and 4 deletions
|
@ -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"]
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue