Skip to content

Commit dfeb56e

Browse files
committed
Merge remote-tracking branch 'upstream/master'
2 parents 5e5771d + 3180684 commit dfeb56e

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Annoyances
122122
As any security tools, this one comes with it's share of annoyance. At first a focus on finding vulnerabilities will be done, but later it is planned to have a phase where efforts will be towards reducing annoyances, in particular with the number of false positives.
123123

124124
* It's a generator of false positives. This can actually help you learn what are the weak functions in PHP. Paranoia mode will fix that by doing a major cut-off on warnings when set to 0.
125-
* It's slow. On big Drupal modules and core it can take too much time (and RAM, reconfigure cli/php.ini to use 512M if needed) to run. Not sure if it's because of bugs in PHPCS or this set of rules, but will be investigated last. Meanwhile you can configure PHPCS to ignore big contrib modules (and run another instance of PHPCS for .info parsing only for them). An example is og taking hours, usually everything runs under 1-2 minutes and sometime around 5 minute. You can only use one core in PHP since no multithreading is available. Possible workaround is to use phpcs --ignore=folder to skip scanning of those parts.
125+
* It's slow. On big Drupal modules and core it can take too much time (and RAM, reconfigure cli/php.ini to use 512M if needed) to run. Not sure if it's because of bugs in PHPCS or this set of rules, but will be investigated last. Meanwhile you can configure PHPCS to ignore big contrib modules (and run another instance of PHPCS for .info parsing only for them). An example is og taking hours, usually everything runs under 1-2 minutes and sometime around 5 minute. You can try using the `--parallel=8` (or another number) option to try and speed things up on supported OSes. Possible workaround is to use phpcs --ignore=folder to skip scanning of those parts.
126126
* For Drupal advisories checking: a module with multiple versions might be secure if a lesser fixed version exists and you'll still get the error or warning. Keep everything updated at latest as recommended on Drupal's website.
127127

128128

example_base_ruleset.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<ruleset name="Drupal7">
2+
<ruleset name="PHPSecurity">
33
<description>Rules for standard PHP projects</description>
44

55
<!-- Code Reviews Rules -->
@@ -12,7 +12,7 @@
1212

1313
<!-- Global properties -->
1414
<!-- Please note that not every sniff uses them and they can be overwritten by rule -->
15-
<!-- Paranoya mode: Will generate more alerts but will miss less vulnerabilites. Good for assisting manual code review. -->
15+
<!-- Paranoia mode: Will generate more alerts but will miss less vulnerabilites. Good for assisting manual code review. -->
1616
<config name="ParanoiaMode" value="1"/>
1717

1818
<!-- BadFunctions -->

example_drupal7_ruleset.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0"?>
2-
<ruleset name="Drupal7">
2+
<ruleset name="Drupal7Security">
33
<description>Rules for Drupal 7 projects</description>
44
<!-- Code Reviews Rules -->
55
<!--
@@ -13,7 +13,7 @@
1313
<!-- Please note that not every sniff uses them and they can be overwritten by rule -->
1414
<!-- Framework or CMS used. Must be a class under Security_Sniffs. -->
1515
<config name="CmsFramework" value="Drupal7"/>
16-
<!-- Paranoya mode: Will generate more alerts but will miss less vulnerabilites. Good for assisting manual code review. -->
16+
<!-- Paranoia mode: Will generate more alerts but will miss less vulnerabilites. Good for assisting manual code review. -->
1717
<config name="ParanoiaMode" value="1"/>
1818

1919
<!-- BadFunctions -->

0 commit comments

Comments
 (0)