From fa512d5084712f11c5cfe3bf9570e1aeb0589a6c Mon Sep 17 00:00:00 2001 From: dmdhrumilmistry <56185972+dmdhrumilmistry@users.noreply.github.com> Date: Tue, 4 Nov 2025 19:49:19 +0530 Subject: [PATCH] chore: fix feature support to append user agent suffix (#4520) * add feature to append user agent suffix * comment resolution --- pkg/detectors/browserstack/browserstack.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/detectors/browserstack/browserstack.go b/pkg/detectors/browserstack/browserstack.go index b54e17b2a..b2ca5beb9 100644 --- a/pkg/detectors/browserstack/browserstack.go +++ b/pkg/detectors/browserstack/browserstack.go @@ -11,6 +11,7 @@ import ( regexp "github.com/wasilibs/go-re2" "golang.org/x/net/publicsuffix" + "github.com/trufflesecurity/trufflehog/v3/pkg/common" "github.com/trufflesecurity/trufflehog/v3/pkg/detectors" "github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb" ) @@ -93,6 +94,8 @@ func verifyBrowserStackCredentials(ctx context.Context, client *http.Client, use return false, err } req.Header.Add("Content-Type", "application/json") + req.Header.Add("User-Agent", common.UserAgent()) + req.SetBasicAuth(username, accessKey) res, err := client.Do(req)