PHP code example of enlightn / security-checker

1. Go to this page and download the library: Download enlightn/security-checker library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

enlightn / security-checker example snippets


use Enlightn\SecurityChecker\SecurityChecker;

$result = (new SecurityChecker)->check('/path/to/composer.lock');
bash
php security-checker security:check /path/to/composer.lock
bash
php vendor/bin/security-checker security:check /path/to/composer.lock
bash
php security-checker security:check /path/to/composer.lock --format=json
json
{
  "laravel/framework": {
    "version": "8.22.0",
    "time": "2021-01-13T13:37:56+00:00",
    "advisories": [{
      "title": "Unexpected bindings in QueryBuilder",
      "link": "https://blog.laravel.com/security-laravel-62011-7302-8221-released",
      "cve": null
    }]
  }
}