mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
Add thymeleaf steps
This commit is contained in:
61
java/ql/test/library-tests/frameworks/thymeleaf/Test.java
Normal file
61
java/ql/test/library-tests/frameworks/thymeleaf/Test.java
Normal file
@@ -0,0 +1,61 @@
|
||||
package generatedtest;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
import org.thymeleaf.TemplateSpec;
|
||||
import org.thymeleaf.templatemode.TemplateMode;
|
||||
|
||||
// Test case generated by GenerateFlowTestCase.ql
|
||||
public class Test {
|
||||
|
||||
Object source() { return null; }
|
||||
void sink(Object o) { }
|
||||
|
||||
public void test() throws Exception {
|
||||
|
||||
{
|
||||
// "org.thymeleaf;TemplateSpec;false;TemplateSpec;;;Argument[0];Argument[-1];taint;manual"
|
||||
TemplateSpec out = null;
|
||||
String in = (String)source();
|
||||
out = new TemplateSpec(in, (Map)null);
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.thymeleaf;TemplateSpec;false;TemplateSpec;;;Argument[0];Argument[-1];taint;manual"
|
||||
TemplateSpec out = null;
|
||||
String in = (String)source();
|
||||
out = new TemplateSpec(in, (Set)null, (String)null, (Map)null);
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.thymeleaf;TemplateSpec;false;TemplateSpec;;;Argument[0];Argument[-1];taint;manual"
|
||||
TemplateSpec out = null;
|
||||
String in = (String)source();
|
||||
out = new TemplateSpec(in, (Set)null, (TemplateMode)null, (Map)null);
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.thymeleaf;TemplateSpec;false;TemplateSpec;;;Argument[0];Argument[-1];taint;manual"
|
||||
TemplateSpec out = null;
|
||||
String in = (String)source();
|
||||
out = new TemplateSpec(in, (String)null);
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.thymeleaf;TemplateSpec;false;TemplateSpec;;;Argument[0];Argument[-1];taint;manual"
|
||||
TemplateSpec out = null;
|
||||
String in = (String)source();
|
||||
out = new TemplateSpec(in, (TemplateMode)null);
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
{
|
||||
// "org.thymeleaf;TemplateSpec;false;getTemplate;;;Argument[-1];ReturnValue;taint;manual"
|
||||
String out = null;
|
||||
TemplateSpec in = (TemplateSpec)source();
|
||||
out = in.getTemplate();
|
||||
sink(out); // $ hasTaintFlow
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
1
java/ql/test/library-tests/frameworks/thymeleaf/options
Normal file
1
java/ql/test/library-tests/frameworks/thymeleaf/options
Normal file
@@ -0,0 +1 @@
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/thymeleaf-3.0.14
|
||||
2
java/ql/test/library-tests/frameworks/thymeleaf/test.ql
Normal file
2
java/ql/test/library-tests/frameworks/thymeleaf/test.ql
Normal file
@@ -0,0 +1,2 @@
|
||||
import java
|
||||
import TestUtilities.InlineFlowTest
|
||||
Reference in New Issue
Block a user