Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tool to check known vulnerabilities in php project using composer

I am working on a php project that uses composer but some of the dependencies are very old, including the php version. We are trying to convince the client to upgrade the version of php and consequentially all other dependencies. We would like to run an analysis on the existing dependencies and look for known vulnerabilities on those.

Are there any tools available for php that run dependency check?

I have done this with ruby projects using bundle audit but I haven't been able to find a similar tool for php.

like image 467
Cris Pinto Avatar asked Aug 23 '16 00:08

Cris Pinto


People also ask

Why you have to check for vulnerabilities especially when you use PHP?

These libraries can contain security issues and vulnerabilities of their own, making it essential to use a vulnerability scanning service to ensure not only your code is secure but that your web application's dependencies are patched with the latest updates and are safe to use in a production environment.

Is composer secure?

Supply Chain Security Update: How Secure is Composer? When it comes to PHP, composer is without discussion, THE package manager. It's fast, easy to use, actively maintained and very secure — or so most thought.

What is Roave security advisories?

Roave Security Advisories is a composer package that will ensure your dependencies do not have security vulnerabilities. The checks are only executed when adding a new dependency via composer require or when running composer update: deploying an application with a valid composer.


1 Answers

Well, there's the Composer package from Roave (https://github.com/Roave/SecurityAdvisories) but the reporting on the libraries is completely up to the project. It checks against the database from this repository: https://github.com/FriendsOfPHP/security-advisories

A lot of the major projects have their issues posted there but as it's pretty voluntary it might not be as wide-spread as you're hoping for. Hope this helps.

like image 104
enygma Avatar answered Sep 19 '22 11:09

enygma