Skip to content

Commit

Permalink
perf(regex): remove greediness from jwt matcher regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyorgy Demarcsek committed Sep 17, 2019
1 parent 822a1fa commit c54dcd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detect_secrets/plugins/jwt.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
class JwtTokenDetector(RegexBasedDetector):
secret_type = 'JSON Web Token'
denylist = [
re.compile(r'eyJ[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*'),
re.compile(r'eyJ[A-Za-z0-9-_=]+\.[A-Za-z0-9-_=]+\.?[A-Za-z0-9-_.+/=]*?'),
]

def secret_generator(self, string, *args, **kwargs):
Expand Down

0 comments on commit c54dcd6

Please sign in to comment.