mirror of
https://github.com/trufflesecurity/trufflehog.git
synced 2024-11-10 07:04:24 +00:00
Make AzureDevopsPersonalAccessToken verification more robust (#2359)
* Make AzureDevopsPersonalAccessToken verification more robust * fix snifftest
This commit is contained in:
parent
5651eb6cbd
commit
c2ae31d060
2 changed files with 3 additions and 2 deletions
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
REPO_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"
|
||||
|
|
|
@ -69,7 +69,8 @@ func (s Scanner) FromData(ctx context.Context, verify bool, data []byte) (result
|
|||
res, 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)
|
||||
|
|
Loading…
Reference in a new issue