mirror of
https://github.com/github/codeql.git
synced 2026-05-03 12:45:27 +02:00
org.kohsuke.stapler.framework.adjunct tests
This commit is contained in:
26
java/ql/test/library-tests/frameworks/stapler/Test.java
Normal file
26
java/ql/test/library-tests/frameworks/stapler/Test.java
Normal file
@@ -0,0 +1,26 @@
|
||||
package generatedtest;
|
||||
|
||||
import org.kohsuke.stapler.framework.adjunct.AdjunctManager;
|
||||
|
||||
// Test case generated by GenerateFlowTestCase.ql
|
||||
public class Test {
|
||||
|
||||
Object source() {
|
||||
return null;
|
||||
}
|
||||
|
||||
void sink(Object o) {}
|
||||
|
||||
public void test() throws Exception {
|
||||
|
||||
{
|
||||
// "org.kohsuke.stapler.framework.adjunct;AdjunctManager;true;AdjunctManager;(ServletContext,ClassLoader,String,long);;Argument[2];Argument[-1].Field[org.kohsuke.stapler.framework.adjunct.AdjunctManager.rootURL];taint;ai-generated"
|
||||
AdjunctManager out = null;
|
||||
String in = (String) source();
|
||||
out = new AdjunctManager(null, null, in, 0L);
|
||||
sink(out.rootURL); // $ hasTaintFlow
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
1
java/ql/test/library-tests/frameworks/stapler/options
Normal file
1
java/ql/test/library-tests/frameworks/stapler/options
Normal file
@@ -0,0 +1 @@
|
||||
//semmle-extractor-options: --javac-args -cp ${testdir}/../../../stubs/stapler-1.263:${testdir}/../../../stubs/javax-servlet-2.5:${testdir}/../../../stubs/apache-commons-jelly-1.0.1:${testdir}/../../../stubs/apache-commons-fileupload-1.4:${testdir}/../../../stubs/saxon-xqj-9.x:${testdir}/../../../stubs/apache-commons-beanutils:${testdir}/../../../stubs/dom4j-2.1.1:${testdir}/../../../stubs/apache-commons-lang:${testdir}/../../../stubs/jaxen-1.2.0
|
||||
2
java/ql/test/library-tests/frameworks/stapler/test.ql
Normal file
2
java/ql/test/library-tests/frameworks/stapler/test.ql
Normal file
@@ -0,0 +1,2 @@
|
||||
import java
|
||||
import TestUtilities.InlineFlowTest
|
||||
Reference in New Issue
Block a user