[fix] - Use Parent Context in Azure Detector (#3346)

* use context

* sort imports
This commit is contained in:
ahrav 2024-09-30 12:13:04 -07:00 committed by GitHub
parent 5f3b4521d7
commit 3dff283bb2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,10 +3,10 @@ package azure
import (
"context"
"fmt"
regexp "github.com/wasilibs/go-re2"
"strings"
"github.com/Azure/go-autorest/autorest/azure/auth"
regexp "github.com/wasilibs/go-re2"
"github.com/trufflesecurity/trufflehog/v3/pkg/detectors"
"github.com/trufflesecurity/trufflehog/v3/pkg/pb/detectorspb"
@ -69,7 +69,7 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
if err != nil {
continue
}
err = token.Refresh()
err = token.RefreshWithContext(ctx)
if err == nil {
res.Verified = true
}