diff --git a/pkg/fanal/secret/builtin-rules.go b/pkg/fanal/secret/builtin-rules.go index 4c434e89253d..f923601abf0b 100644 --- a/pkg/fanal/secret/builtin-rules.go +++ b/pkg/fanal/secret/builtin-rules.go @@ -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,