mirror of
https://github.com/github/codeql.git
synced 2026-04-25 16:55:19 +02:00
Java: Add example of missing sink generation.
This commit is contained in:
@@ -7,6 +7,13 @@ extensions:
|
||||
- [ "p", "Sinks", False, "sink", "(Object)", "", "Argument[0]", "test-sink", "manual" ]
|
||||
- [ "p", "Sinks", False, "sink2", "(Object)", "", "Argument[0]", "test-sink2", "manual" ]
|
||||
- [ "p", "Sinks", False, "manualSinkAlreadyDefined", "(Object)", "", "Argument[0]", "test-sink", "manual" ]
|
||||
- [ "p", "Sinks", False, "saveAndGet", "(Object)", "", "Argument[0]", "test-sink", "df-generated"]
|
||||
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
extensible: sourceModel
|
||||
data:
|
||||
- [ "p", "Sinks", False, "saveAndGet", "(Object)", "", "ReturnValue", "test-source", "manual"]
|
||||
|
||||
- addsTo:
|
||||
pack: codeql/java-all
|
||||
|
||||
@@ -25,6 +25,14 @@ public class Sinks {
|
||||
// neutral=p;Sinks;nosink;(Object);summary;df-generated
|
||||
public void nosink(Object o) {}
|
||||
|
||||
// Sink and Source defined in the extensible file next to the sink test.
|
||||
// MISSING SINK
|
||||
// neutral=p;Sinks;saveAndGet;(Object);summary;df-generated
|
||||
public Object saveAndGet(Object o) {
|
||||
sink(o);
|
||||
return null;
|
||||
}
|
||||
|
||||
// sink=p;Sinks;true;copyFileToDirectory;(Path,Path,CopyOption[]);;Argument[0];path-injection;df-generated
|
||||
// sink=p;Sinks;true;copyFileToDirectory;(Path,Path,CopyOption[]);;Argument[1];path-injection;df-generated
|
||||
// neutral=p;Sinks;copyFileToDirectory;(Path,Path,CopyOption[]);summary;df-generated
|
||||
|
||||
Reference in New Issue
Block a user