百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

security-checker

> 安全
开源

基于安全建议数据库的 PHP 依赖漏洞扫描器。

339 stars0 点赞2 次浏览
访问官网GitHub

工具介绍

基于安全建议数据库的 PHP 依赖漏洞扫描器。

Enlightn Security Checker

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

Installation Options

  1. You may install the Enlightn Security Checker with Composer globally, for use with multiple projects:
bash
composer global require enlightn/security-checker
  1. You may also install the Enlightn Security Checker in your project as a dev dependency using Composer:
bash
composer require --dev enlightn/security-checker
  1. Instead of installing via Composer, you may also download the security-checker.phar file. Then, in the commands below you can replace security-checker with security-checker.phar.

Usage

To check for security vulnerabilities in your dependencies, you may run the security:check command:

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

This command will return a success status code of 0 if there are no vulnerabilities and 1 if there is at least one vulnerability.

Note: You would need to provide the full path of the security-checker executable if the directory is not in your path. For instance:

bash
php vendor/bin/security-checker security:check /path/to/composer.lock

Options

Format

By default, this command displays the result in ANSI. You may use the --format option to display the result in JSON instead:

bash
php security-checker security:check /path/to/composer.lock --format=json

Exclude Dev Dependencies

If you would like to exclude dev dependencies from the vulnerabilities scanning, you may use the --no-dev option (defaults to false):

bash
php security-checker security:check /path/to/composer.lock --no-dev

Allow vulnerabilities

If you would like to exclude some vulnerabilities, you may use the --allow-list option by passing the CVE identifier, or the CVE title. You can pass multiple values as well:

bash
php security-checker security:check /path/to/composer.lock --allow-list CVE-2018-15133 --allow-list "untrusted X-XSRF-TOKEN value"

Do not forget to wrap the title with quotes

Custom Directory for Caching Advisories Database

By default, the SecurityChecker API and the security:check command use the directory returned by the sys_get_temp_dir PHP function for storing the cached advisories database. If you wish to modify the directory, you may use the --temp-dir option:

bash
php security-checker security:check /path/to/composer.lock --temp-dir=/tmp

API

You may also use the API directly in your own code like so:

php
use Enlightn\SecurityChecker\SecurityChecker;

$result = (new SecurityChecker)->check('/path/to/composer.lock');

The result above is an associative array. The key is the package name and the value is an array of vulnerabilities based on your package version. An example of the JSON encoded version is as below:

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
    }]
  }
}

Contribution Guide

Thank you for considering contributing to the Enlightn security-checker project! The contribution guide can be found here.

License

The Enlightn security checkers licensed under the MIT license.

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPphpsecuritysecurity-scannervulnerability-scanner

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月18日
分类安全
定价开源

> 相关工具

O
OWASP ZAP
开源 Web 应用安全扫描器
O
owasp-wstg-tracker
Simple web app to track OWASP WSTG security testing progress
H
homebridge-mi-gateway-security
XiaoMi Gateway Security plugin for HomeBridge.