mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Java: Add tests for supported framework methods
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
| com/github/codeql/test/PublicClass.java:7:15:7:19 | stuff | com.github.codeql.test.PublicClass#stuff(String) | false | supported | test | library | | type | unknown | classification |
|
||||
| com/github/codeql/test/PublicClass.java:11:22:11:32 | staticStuff | com.github.codeql.test.PublicClass#staticStuff(String) | false | supported | test | library | | type | unknown | classification |
|
||||
| com/github/codeql/test/PublicClass.java:15:18:15:31 | protectedStuff | com.github.codeql.test.PublicClass#protectedStuff(String) | false | supported | test | library | | type | unknown | classification |
|
||||
| com/github/codeql/test/PublicClass.java:27:17:27:28 | summaryStuff | com.github.codeql.test.PublicClass#summaryStuff(String) | true | supported | test | library | summary | type | unknown | classification |
|
||||
| com/github/codeql/test/PublicClass.java:31:17:31:27 | sourceStuff | com.github.codeql.test.PublicClass#sourceStuff() | true | supported | test | library | source | type | unknown | classification |
|
||||
| com/github/codeql/test/PublicClass.java:35:15:35:23 | sinkStuff | com.github.codeql.test.PublicClass#sinkStuff(String) | true | supported | test | library | sink | type | unknown | classification |
|
||||
| com/github/codeql/test/PublicClass.java:39:15:39:26 | neutralStuff | com.github.codeql.test.PublicClass#neutralStuff(String) | true | supported | test | library | neutral | type | unknown | classification |
|
||||
| com/github/codeql/test/PublicGenericClass.java:6:15:6:19 | stuff | com.github.codeql.test.PublicGenericClass#stuff(Object) | false | supported | test | library | | type | unknown | classification |
|
||||
| com/github/codeql/test/PublicGenericClass.java:10:20:10:25 | stuff2 | com.github.codeql.test.PublicGenericClass#stuff2(Object) | false | supported | test | library | | type | unknown | classification |
|
||||
| com/github/codeql/test/PublicGenericInterface.java:4:17:4:21 | stuff | com.github.codeql.test.PublicGenericInterface#stuff(Object) | false | supported | test | library | | type | unknown | classification |
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
extensions:
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: sourceModel
|
||||
data:
|
||||
- ["com.github.codeql.test","PublicClass",true,"sourceStuff","()","","ReturnValue","remote","manual"]
|
||||
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: sinkModel
|
||||
data:
|
||||
- ["com.github.codeql.test","PublicClass",true,"sinkStuff","(String)","","Argument[0]","sql-injection","manual"]
|
||||
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: summaryModel
|
||||
data:
|
||||
- ["com.github.codeql.test","PublicClass",true,"summaryStuff","(String)","","Argument[0]","ReturnValue","taint","manual"]
|
||||
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: neutralModel
|
||||
data:
|
||||
- ["com.github.codeql.test","PublicClass","neutralStuff","(String)","summary","manual"]
|
||||
@@ -23,4 +23,20 @@ public class PublicClass {
|
||||
void packagePrivateStuff(String arg) {
|
||||
System.out.println(arg);
|
||||
}
|
||||
|
||||
public String summaryStuff(String arg) {
|
||||
return arg;
|
||||
}
|
||||
|
||||
public String sourceStuff() {
|
||||
return "stuff";
|
||||
}
|
||||
|
||||
public void sinkStuff(String arg) {
|
||||
// do nothing
|
||||
}
|
||||
|
||||
public void neutralStuff(String arg) {
|
||||
// do nothing
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user