3 ms·
IIRC, a regex that matches a generic AWS access key will also match a git hash.
by giaour 11y ago
IIRC, a regex that matches a generic AWS access key will also match a git hash.
- giaour 11y agoNot sure what I said that warrants multiple downvotes. Git commits are identified by SHA1 hashes, so they would be caught by the same regex that would catch AWS keys. According to the AWS security blog, this is the regex you should use for secret keys: `(?<![A-Za-z0-9/+=])[A-Za-z0-9/+=]{40}(?![A-Za-z0-9/+=])`. To match git hashes, you can use this one: `[0-9a-f]{40}`. See the likeness?