A security checker for your composer.lock

Installs: 48 804 840

Dependents: 838

Suggesters: 38

Security: 0

Stars: 2 012

Watchers: 60

Forks: 112

Open Issues: 9

v6.0.3 2019-11-01 13:20 UTC


The SensioLabs Security Checker is a command line tool that checks if your application uses dependencies with known security vulnerabilities. It uses the Security Check Web service and the Security Advisories Database.

TIP: As an alternative, you can use the Symfony CLI tool that has the following advantages: it does not depend on PHP, all checks are done locally (no calls to the API):

$ symfony security:check

TIP: If you are using Github, you can use the PHP Security Checker Github Action to automatically check for vulnerabilities when pushing code.


Download the security-checker.phar file:

$ php security-checker.phar security:check /path/to/composer.lock

Use the code from the repository directly:

$ composer install
$ php security-checker security:check /path/to/composer.lock


The checker uses the Symfony Console component; so, you can easily integrate the checker into your own project:

  • by using the SecurityCheckerCommand class into your Symfony Console application;

  • by using the SecurityChecker class directly into your own code:

     use SensioLabs\Security\SecurityChecker;
     $checker = new SecurityChecker();
     $result = $checker->check('/path/to/composer.lock', 'json');
     $alerts = json_decode((string) $result, true);