diff --git a/pmd-visualforce/src/main/resources/rulesets/vf/security.xml b/pmd-visualforce/src/main/resources/rulesets/vf/security.xml index 25cb8a1072..41a673e84b 100644 --- a/pmd-visualforce/src/main/resources/rulesets/vf/security.xml +++ b/pmd-visualforce/src/main/resources/rulesets/vf/security.xml @@ -1,36 +1,43 @@ + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 http://pmd.sourceforge.net/ruleset_2_0_0.xsd"> - Rules concerning basic VF guidelines. + +Rules concerning basic VF guidelines. + - - - - 3 - - + +Avoid unescaped user controlled content in EL as it results in XSS. + + 3 + + - ]]> - - +]]> + + - - - - 3 - - - ]]> - - + + +Avoid calling VF action upon page load as the action becomes vulnerable to CSRF. + + 3 + + +]]> + + diff --git a/pmd-visualforce/src/test/java/net/sourceforge/pmd/lang/vf/RuleSetFactoryTest.java b/pmd-visualforce/src/test/java/net/sourceforge/pmd/lang/vf/RuleSetFactoryTest.java new file mode 100644 index 0000000000..f478885c12 --- /dev/null +++ b/pmd-visualforce/src/test/java/net/sourceforge/pmd/lang/vf/RuleSetFactoryTest.java @@ -0,0 +1,11 @@ +/** + * BSD-style license; for more info see http://pmd.sourceforge.net/license.html + */ + +package net.sourceforge.pmd.lang.vf; + +import net.sourceforge.pmd.AbstractRuleSetFactoryTest; + +public class RuleSetFactoryTest extends AbstractRuleSetFactoryTest { + // no additional tests +}