We have a client who is very concerned with Malicious code being introduced in third party modules, especially modules that are coming from Magento Connect (Or any free module) They would like to use one of these modules but want to be assured that the module does not contain code that would allow a hacker to get access to different parts of their Magento site.
My question is this: Is there a tool that we could use to scan code for content? Something like this but maybe more in depth.
function check($contents,$file) {
$this->scanned_files[] = $file;
if(preg_match('/eval\((base64|eval|\$_|\$\$|\$[A-Za-z_0-9\{]*(\(|\{|\[))/i',$contents)) {
$this->infected_files[] = $file;
}
}
Even a service that can be run on the web server.
Ideally if there was a service that would scan each commit before code got into the repo would be ideal.