-
Notifications
You must be signed in to change notification settings - Fork 153
Open
Description
I was using a tool that uses regexes from this repo and noticed there was some duplication.
In rules-stable.yml:
- Generic - 1702 -
BEGIN RSA PRIVATE KEY
- RSA private key -
-----BEGIN RSA PRIVATE KEY-----
- Asymmetric Private Key -
-----BEGIN ((EC|PGP|DSA|RSA|OPENSSH) )?PRIVATE KEY( BLOCK)?-----
- private_key -
-----(?:(?:BEGIN|END) )(?:(?:EC|PGP|DSA|RSA|OPENSSH).)?PRIVATE.KEY(.BLOCK)?-----
These will all match on "-----BEGIN RSA PRIVATE KEY-----"
Is there some motivation behind this duplication or could it be organized better?
"Asymmetric Private Key" and "private_key" could be merged into one regex without losing anything. There is a question if you want to keep a regex for all private keys as a whole or divide it into more specific matchers for each one or if the current duplication is what you want.
Metadata
Metadata
Assignees
Labels
No labels