Find, verify, and analyze leaked credentials
Go credentialsdevsecopsdynamic-analysisprecommitscanningsecretsecret-managementsecretssecuritysecurity-toolstrufflehogverification
Make AzureDevopsPersonalAccessToken verification more robust (#2359)
Dustin Deckerc2ae31d06077
diff --git a/hack/snifftest/snifftest.sh b/hack/snifftest/snifftest.shindex 04e1bd6eb..f17b04dfb 100755--- a/hack/snifftest/snifftest.sh+++ b/hack/snifftest/snifftest.sh@@ -1,7 +1,7 @@#!/usr/bin/env bashREPO_ARRAY=(- # "https://github.com/Netflix/Hystrix.git"+ "https://github.com/Netflix/Hystrix.git"# "https://github.com/facebook/flow.git"# "https://github.com/Netflix/vizceral.git"# "https://github.com/Netflix/metaflow.git"diff --git a/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go b/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.goindex c1a50ae76..d6a3bb537 100644--- a/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go+++ b/pkg/detectors/azuredevopspersonalaccesstoken/azuredevopspersonalaccesstoken.go@@ -69,7 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (resultres, err := client.Do(req)if err == nil {defer res.Body.Close()- if res.StatusCode >= 200 && res.StatusCode < 300 {+ hasVerifiedRes, _ := common.ResponseContainsSubstring(res.Body, "lastUpdateTime")+ if res.StatusCode >= 200 && res.StatusCode < 300 && hasVerifiedRes {s1.Verified = true} else if res.StatusCode == 401 {// The secret is determinately not verified (nothing to do)