Files
codeql/java/ql/test/query-tests/security/CWE-295/AndroidMissingCertificatePinning/Test1/Test.java
2022-12-09 13:41:17 +00:00

12 lines
329 B
Java

import java.net.URL;
import java.net.URLConnection;
class Test{
URLConnection test1() throws Exception {
return new URL("https://good.example.com").openConnection();
}
URLConnection test2() throws Exception {
return new URL("https://bad.example.com").openConnection(); // $hasUntrustedResult
}
}