Align tests with new query structure

This commit is contained in:
Benjamin Muskalla
2021-08-16 21:55:00 +02:00
parent 87ef540b52
commit 1d3bcdf522
15 changed files with 43 additions and 3 deletions

View File

@@ -1 +0,0 @@
| java.time;?;Duration;ofMillis;(long) | 1 |

View File

@@ -1 +0,0 @@
Telemetry/ExternalAPIUsages.ql

View File

@@ -0,0 +1,2 @@
| java.io;?;FileWriter;FileWriter;(File) | 1 |
| java.net;?;URL;openStream;() | 1 |

View File

@@ -0,0 +1,11 @@
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.net.URL;
class SupportedExternalSinks {
public static void main(String[] args) throws Exception {
new FileWriter(new File("foo"));
new URL("http://foo").openStream();
}
}

View File

@@ -0,0 +1 @@
Telemetry/SupportedExternalSinks.ql

View File

@@ -0,0 +1 @@
| java.net;?;URLConnection;getInputStream;() | 1 |

View File

@@ -0,0 +1,9 @@
import java.io.InputStream;
import java.net.URL;
class SupportedExternalSources {
public static void main(String[] args) throws Exception {
URL github = new URL("https://www.github.com/");
InputStream stream = github.openConnection().getInputStream();
}
}

View File

@@ -0,0 +1 @@
Telemetry/SupportedExternalSources.ql

View File

@@ -0,0 +1,2 @@
| java.lang;?;StringBuilder;append;(String) | 1 |
| java.lang;?;StringBuilder;toString;() | 1 |

View File

@@ -0,0 +1,7 @@
class SupportedExternalTaint {
public static void main(String[] args) throws Exception {
StringBuilder builder = new StringBuilder();
builder.append("foo");
builder.toString();
}
}

View File

@@ -0,0 +1 @@
Telemetry/SupportedExternalTaint.ql

View File

@@ -0,0 +1,6 @@
| java.io;?;PrintStream;println;(Object) | 3 |
| java.lang;?;Object;Object;() | 2 |
| java.lang;?;String;length;() | 1 |
| java.time;?;Duration;ofMillis;(long) | 1 |
| java.util;?;ArrayList;ArrayList<>;() | 1 |
| java.util;?;HashMap;HashMap<String,Object>;() | 1 |

View File

@@ -0,0 +1 @@
Telemetry/UnsupportedExternalAPIs.ql