Skip to content

Commit

Permalink
adding 'token' keyword to regex
Browse files Browse the repository at this point in the history
  • Loading branch information
ankushgoel27 committed Oct 29, 2023
1 parent 52b3c99 commit 109b8be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/detectors/github_old/github_old.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func (Scanner) DefaultEndpoint() string { return "https://api.github.com" }
var (
// Oauth token
// https://developer.github.com/v3/#oauth2-token-sent-in-a-header
keyPat = regexp.MustCompile(`(?i)(?:github|gh|pat)[^\.].{0,40}[ =:'"]+([a-f0-9]{40})\b`)
keyPat = regexp.MustCompile(`(?i)(?:github|gh|pat|token)[^\.].{0,40}[ =:'"]+([a-f0-9]{40})\b`)

// TODO: Oauth2 client_id and client_secret
// https://developer.github.com/v3/#oauth2-keysecret
Expand Down

0 comments on commit 109b8be

Please sign in to comment.