Skip to content

Find, verify, and analyze leaked credentials

[chore] Remove unnecessary string conversion in tefter detector (#2209)

Miccah84b7461796f0
diff --git a/pkg/detectors/tefter/tefter.go b/pkg/detectors/tefter/tefter.go
index 009ddc818..ad2bef1a8 100644
--- a/pkg/detectors/tefter/tefter.go
+++ b/pkg/detectors/tefter/tefter.go
@@ -61,8 +61,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if err != nil {
continue
}
- bodyString := string(bodyBytes)
- validResponse := json.Valid([]byte(bodyString))
+ validResponse := json.Valid(bodyBytes)
defer res.Body.Close()
if res.StatusCode >= 200 && res.StatusCode < 300 && validResponse {