Skip to content

Commit

Permalink
Removed rules after they have been added to SonarPHP 2.14 core rules set
Browse files Browse the repository at this point in the history
https://jira.sonarsource.com/jira/secure/ReleaseNote.jspa?projectId=10956&version=14346
S1 -  Functions used for system command execution are forbidden
-> [SONARPHP-806] - Rule S4721: Executing OS commands is security-sensitive
S7 - unserialize function should not be used on untrusted data
-> [SONARPHP-805] - Rule S4508: Deserializing objects from an untrusted source is security-sensitive
  • Loading branch information
Pierre-Loup TRISTANT committed Oct 5, 2018
1 parent 224701d commit da8806b
Show file tree
Hide file tree
Showing 13 changed files with 1 addition and 186 deletions.
2 changes: 0 additions & 2 deletions src/main/java/fr/niji/sonarphp/PHPRuleDefinitions.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@ public String repositoryKey() {
@Override
public ImmutableList<Class> checkClasses() {
return ImmutableList.of(
SystemExecFunctionUseCheck.class,
CURLDisableTLSCheck.class,
CURLTLSMisconfigurationCheck.class,
NamespaceImportCheck.class,
DrupalDatabaseStaticQueryCheck.class,
DrupalDatabaseDynamicQueryCheck.class,
UnserializeFunctionUseCheck.class,
InputSuperglobalVariableUseCheck.class,
DrupalFormStateUserInputUsageCheck.class,
FilterInputUnsafeRawUseCheck.class
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,11 @@
import org.sonar.plugins.php.api.tree.Tree;
import org.sonar.plugins.php.api.tree.Tree.Kind;
import org.sonar.plugins.php.api.tree.declaration.NamespaceNameTree;
import org.sonar.plugins.php.api.tree.expression.ArrayInitializerFunctionTree;
import org.sonar.plugins.php.api.tree.expression.ExpressionTree;
import org.sonar.plugins.php.api.tree.expression.FunctionCallTree;
import org.sonar.plugins.php.api.tree.expression.LiteralTree;
import org.sonar.plugins.php.api.visitors.PHPVisitorCheck;

import java.text.NumberFormat;
import java.text.ParseException;
import java.util.Set;

@Rule(key = CURLDisableTLSCheck.KEY)
public class CURLDisableTLSCheck extends PHPVisitorCheck {
Expand Down

This file was deleted.

This file was deleted.

12 changes: 0 additions & 12 deletions src/main/resources/fr/niji/l10n/php/rules/custom/S1.html

This file was deleted.

14 changes: 0 additions & 14 deletions src/main/resources/fr/niji/l10n/php/rules/custom/S1.json

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/resources/fr/niji/l10n/php/rules/custom/S7.html

This file was deleted.

14 changes: 0 additions & 14 deletions src/main/resources/fr/niji/l10n/php/rules/custom/S7.json

This file was deleted.

2 changes: 1 addition & 1 deletion src/test/java/fr/niji/sonarphp/PHPRuleDefinitionsTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ public void rules() {
RulesDefinition.Context context = new RulesDefinition.Context();
rulesDefinition.define(context);
RulesDefinition.Repository repository = context.repository("niji-php-rules");
assertEquals(10, repository.rules().size());
assertEquals(8, repository.rules().size());
}
}

This file was deleted.

This file was deleted.

25 changes: 0 additions & 25 deletions src/test/resources/checks/systemExecFunctionUseCheck.php

This file was deleted.

5 changes: 0 additions & 5 deletions src/test/resources/checks/unserializeFunctionUseCheck.php

This file was deleted.

0 comments on commit da8806b

Please sign in to comment.