github-dorks
github-dorks copied to clipboard
offline cloned repository scanning
the way it would work is run github-dorks as an offline tool and use regex and text patterns to find potential leaks.. optionally see if we can also scan history
I like the idea of setting up a pre-commit hook.
Actionable steps to achieve this:
- Clone repo. I suggest using GitPython or similar for git management.
- Write system for parsing GitHub search syntax, similar to https://github.com/Plazmaz/GHScraper/blob/master/index.js#L16-L33 and https://github.com/Plazmaz/GHScraper/blob/master/index.js#L89-L113 (sorry, messy)
- Convert dorks into objects
- Iterate commit diffs via GitPython and check them against the objects