use of com.cflint.plugins.core.QueryParamChecker in project CFLint by cflint.
the class TestCFLint2Files method setUp.
@Before
public void setUp() throws Exception {
final CFLintConfig conf = new CFLintConfig();
PluginInfoRule pluginRule = new PluginInfoRule();
pluginRule.setName("ArgDefChecker");
conf.getRules().add(pluginRule);
PluginMessage pluginMessage = new PluginMessage("ARG_DEFAULT_MISSING");
pluginMessage.setSeverity("WARNING");
pluginMessage.setMessageText("Argument ${variable} is not required and does not define a default value.");
pluginRule.getMessages().add(pluginMessage);
pluginRule = new PluginInfoRule();
pluginRule.setName("QueryParamChecker");
conf.getRules().add(pluginRule);
pluginMessage = new PluginMessage("QUERYPARAM_REQ");
pluginMessage.setSeverity("WARNING");
pluginMessage.setMessageText("setSql() statement should use .addParam() instead of #'s for security.");
pluginRule.getMessages().add(pluginMessage);
cfBugs = new CFLint(conf, new ArgDefChecker(), new QueryParamChecker());
}
use of com.cflint.plugins.core.QueryParamChecker in project CFLint by cflint.
the class TestCFBugs_QueryParams method setUp.
@Before
public void setUp() throws Exception {
final CFLintConfig conf = new CFLintConfig();
PluginInfoRule pluginRule = new PluginInfoRule();
pluginRule.setName("QueryParamChecker");
PluginMessage pluginMessage = new PluginMessage("QUERYPARAM_REQ");
pluginMessage.setSeverity("WARNING");
pluginMessage.setMessageText("setSql() statement should use .addParam() instead of #'s for security.");
pluginRule.getMessages().add(pluginMessage);
pluginMessage = new PluginMessage("CFQUERYPARAM_REQ");
pluginMessage.setSeverity("WARNING");
pluginMessage.setMessageText("<${tag} name=\"${variable}\"> should use <cfqueryparam/> for security reasons.");
pluginRule.getMessages().add(pluginMessage);
conf.getRules().add(pluginRule);
cfBugs = new CFLint(conf, new QueryParamChecker());
}
Aggregations