Merge pull request #2899 from p-/cwe-036

Java: Calling openStream on URLs created from remote source can lead to file disclosure
This commit is contained in:
Anders Schack-Mulligen
2020-04-02 13:55:06 +02:00
committed by GitHub
4 changed files with 100 additions and 0 deletions

View File

@@ -12,6 +12,10 @@ class TypeSocket extends RefType {
TypeSocket() { hasQualifiedName("java.net", "Socket") }
}
class TypeUrl extends RefType {
TypeUrl() { hasQualifiedName("java.net", "URL") }
}
class URLConnectionGetInputStreamMethod extends Method {
URLConnectionGetInputStreamMethod() {
getDeclaringType() instanceof TypeUrlConnection and