BishopFox / GitGot

Semi-automated, feedback-driven tool to rapidly search through troves of public data on GitHub for sensitive secrets.
GNU Lesser General Public License v3.0
1.45k stars 207 forks source link

RFC 1918 matches on values that do not meet the specifications #13

Closed mobiusKey closed 5 years ago

mobiusKey commented 5 years ago

Description The regex for the RFC 1918 checks will match values that do not meet the RFC 1918 specifications

Steps Taken Steps to reproduce the behavior: Running a normal behavior

Expected behavior Match on internal IP addresses and ignore values that do not meet the specifications

Example Value The current regex will match the value 10.234222222 which is not a legitimate internal IP address

Fix This issue can be fixed by replacing the regex in default.list with this

127.(([0-9]){1,3}.){2}([0-9]){1,3}|10.(([0-9]){1,3}.){2}[0-9]{1,3}|172.[123][0-9].([0-9.]{1,3}){2}|192.168.([0-9]{1,3}.[0-9]{1,3})

please change the regex so that GitGot does not create unnecessary false positives

the-bumble commented 5 years ago

Thank you for reporting this! I tried reaching out to you on your PR, but you must've gotten busy. Fixed by 915c37ed6800889b76d0e32b2db7d6f558707d5a