-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add plugin to look for AWS key IDs #100
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great so far
Mostly LGTM. We can keep things DRYer by refactoring |
let's do that in a different PR... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚢
🏯
🛥
…rror (doesn't actually matter for anything, but...)
AWS key IDs are not strictly speaking secrets, although we've found that files containing one almost always contain the corresponding private key. (The only notable false positives I could find in an internal search are AWS S3 pre-signed URLs, which include the signing key's ID in the URL. These are arguably potentially secret anyway.)
This was implemented by adding a new plugin base class (
RegexBasedDetector
) and adding the AKIA regex as a subclass; this is a bit verbose, but necessary if we want the ability to turn individual regex-based checks on and off. It looks like potentiallyKeywordDetector
,PrivateKeyDetector
, andBasicAuthDetector
could also be implemented usingRegexBasedDetector
too, if we wanted to consolidate code a bit.Change is test-coverage neutral.