drupal-spider / drupalsecurity
Drupal Security is a library to review security issue of Drupal code.
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 2
Open Issues: 0
Type:phpcodesniffer-standard
Requires
- php: >=5.4.0
- ext-mbstring: *
- drupal/coder: >=8.2.0
- phpcsstandards/phpcsutils: >=1.0.0
- squizlabs/php_codesniffer: >=3.0.0
- symfony/yaml: >=2.0.0
Requires (Dev)
- phpunit/phpunit: >=3.7 <6
This package is auto-updated.
Last update: 2025-03-08 06:26:25 UTC
README
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 drupal-spider/drupalsecurity
Note:
You have to make sure that the phpcs command is included in the PATH environment vairalbe, otherwise you will end up a command not found error. Normally, phpcs command would locate in the user profile's folder, such as ~/.composer/vendor/bin/phpcs
Usage
Check Drupal Security standards
phpcs --standard=DrupalSecurity --extensions=php,module,inc,install,theme,yml,twig [/file/to/drupal/module]
List all sniffs
phpcs --standard=DrupalSecurity -e