newrelic / rusty-hog

A suite of secret scanners built in Rust for performance. Based on TruffleHog (https://github.com/dxa4481/truffleHog) which is written in Python.
Apache License 2.0
453 stars 59 forks source link

add flag recent_days #2

Closed b3nn closed 4 years ago

b3nn commented 4 years ago

Added the flag recent_days to only check commits to the repo in the last number of days. This lets us run a scan against only new commits while not requiring us to keep state of the last scanned commit (or look it up prior to the scan to pass it in). This can only be used if since_commit is not also specified.

My first PR to a Rust project, so sorry if I missed anything. Thanks for creating this! The speed of this implementation lets us get through so many more repos. 💨

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

cutler-scott-newrelic commented 4 years ago

Thanks @b3nn ! I'm new at this as well, so you'll see I already messed up the PR by committing it as a branch on this repo first (oh well). The only thing you missed was to run cargo test before commiting to make sure it passed the unit tests. I fixed that, and also changed the way it stores the argument value to match the way it was done for others. Thanks again for your work on this!!!