You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm considering reading the response body based on the Content-Type header. If the content type is application/json, we can unmarshal it into a JSON structure; if it's text/plain, we can simply convert it to a string. We could also handle other common content types similarly.
I'm considering reading the response body based on the Content-Type header. If the content type is application/json, we can unmarshal it into a JSON structure; if it's text/plain, we can simply convert it to a string. We could also handle other common content types similarly.
That seems like a good initial approach. Long term, we might consider including it in the custom detector config. However, since we're moving toward a config-based detector setup, there's no need to over-engineer this solution. Your approach is practical for now. 👍
Please review the Community Note before submitting
Description
When validating a customDetector, include the response body as part of the ExtraData
trufflehog/pkg/custom_detectors/custom_detectors.go
Line 173 in 23afcd7
Preferred Solution
Read the response body and include the body as ExtraData
The text was updated successfully, but these errors were encountered: