Skip to content

Commit

Permalink
add support of GitHub fine-grained tokens
Browse files Browse the repository at this point in the history
  • Loading branch information
sourav977 committed Dec 6, 2023
1 parent a5342da commit 273271b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions pkg/fanal/secret/builtin-rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,14 @@ var builtinRules = []Rule{
Regex: MustCompile(`ghr_[0-9a-zA-Z]{76}`),
Keywords: []string{"ghr_"},
},
{
ID: "github_pat",
Category: CategoryGitHub,
Title: "GitHub Fine-grained personal access tokens",
Severity: "CRITICAL",
Regex: MustCompile(`^github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59}$`),
Keywords: []string{"github_pat_"},
},
{
ID: "gitlab-pat",
Category: CategoryGitLab,
Expand Down

0 comments on commit 273271b

Please sign in to comment.