C#/Java: Add test for missing neutral summary generation.

This commit is contained in:
Michael Nebel
2024-07-18 16:29:04 +02:00
parent bf69c76829
commit c9832df3c0
4 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,7 @@
extensions:
- addsTo:
pack: codeql/java-all
extensible: neutralModel
data:
- [ "p", "Sinks", "nosink", "(Object)", "sink", "manual"]
- [ "p", "Sinks", "nosink", "(Object)", "summary", "df-generated"]

View File

@@ -21,6 +21,11 @@ public class Sinks {
// neutral=p;Sinks;sink2;(Object);summary;df-generated
public void sink2(Object o) {}
// Defined as sink neutral file in the model file next to the
// neutral test.
// MISSING NEUTRAL.
public void nosink(Object o) {}
// 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