bocharsky-bw/security-checker-bundle

Symfony Web Debug Toolbar 的安全检查器包装器

v0.0.1 2014-12-21 11:57 UTC

This package is auto-updated.

Last update: 2024-08-29 04:03:25 UTC


README

Symfony Web Debug Toolbar 的安全检查器包装器。

SensioLabsInsight

BW Security Checker

安装

首先通过运行以下命令使用 Composer 依赖管理器安装包:

$ composer require "bocharsky-bw/security-checker-bundle:dev-master"

Composer 会将包安装到您的项目的 vendor 目录。

包含

将包包含到您的 Symfony 项目中只需几个简单步骤。

  1. 在应用内核中启用 dev 环境的包
<?php
// app/AppKernel.php

public function registerBundles()
{
    // other bundles...
    
    if (in_array($this->getEnvironment(), array('dev', 'test'))) {
        // other dev bundles...
        $bundles[] = new BW\SecurityCheckerBundle\BWSecurityCheckerBundle();
    }
}
  1. dev 环境注册包的路由
# app/config/routing_dev.yml
_bw_security_checker_bundle:
    resource: "@BWSecurityCheckerBundle/Resources/config/routing.yml"
    prefix:   /_bw

恭喜!

您现在可以通过最简单的方式检查您的 Symfony 项目中的已知*安全问题了!

* 免责声明: 此检查器只能检测到在 SensioLabs 安全警告数据库中引用的漏洞。