Skip to content

Commit

Permalink
stricter regex for github token (#535)
Browse files Browse the repository at this point in the history
  • Loading branch information
zricethezav authored Mar 5, 2021
1 parent b3bed56 commit 6e4e9df
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ title = "gitleaks config"
[[rules]]
description = "Github"
regex = '''(?i)github(.{0,20})?(?-i)[0-9a-zA-Z]{35,40}'''
regex = '''(?i)github.{0,3}((?i)token|api|key).{0,10}?(?-i)([0-9a-zA-Z]{35,40})'''
tags = ["key", "Github"]
[[rules]]
Expand Down

0 comments on commit 6e4e9df

Please sign in to comment.