Download the PHP package drupal-spider/drupalsecurity without Composer

On this page you can find all versions of the php package drupal-spider/drupalsecurity. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package drupalsecurity

DrupalSecurity

DrupalSecurity is a library for automated Drupal code security reviews. It defines rules for PHP_CodeSniffer

Note that Javascript has not been supported yet. To check and fix Javascript files please use ESLint and see the Drupal ESLint documentation.

Global installation

composer global require "squizlabs/php_codesniffer=*"
composer global require mingsong-hu/drupalsecurity

Make sure you have the composer bin dir in your PATH. The default value is ~/.composer/vendor/bin/, but you can check the value that you need to use by running

composer global config bin-dir --absolute

Usage

Check Drupal Security standards

phpcs --standard=DrupalSecurity  --ignore='*/tests/*' --extensions=php,module,inc,install,theme,yml,twig [/file/to/drupal/module]

List all sniffers

phpcs --standard=DrupalSecurity -e

Excluding files from credential scanning

The HardcodedCredentials sniff detects hardcoded passwords, API keys, tokens, and secrets in PHP and YAML files. Autogenerated or third-party config files may produce false positives. There are three ways to suppress them.

1. Exclude paths in phpcs.xml (recommended for directories or filename patterns)

Create a phpcs.xml in your project root:

2. # phpcs:ignoreFile in the YAML file (for a single autogenerated file)

Add this comment anywhere in the file — the top is conventional:

3. # phpcs:ignore on a single line (for individual false positives in YAML)

For PHP files, the standard PHPCS inline suppression works without any special handling:


All versions of drupalsecurity with dependencies

PHP Build Version
Package Version
Requires drupal/coder Version >=8.2.0
ext-mbstring Version *
php Version >=7.1.0
phpcsstandards/phpcsutils Version >=1.0.0
squizlabs/php_codesniffer Version >=3.0.0
symfony/yaml Version >=2.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package drupal-spider/drupalsecurity contains the following files

Loading the files please wait ...