mirror of
https://github.com/github/codeql.git
synced 2025-12-22 19:56:32 +01:00
java: sharpen java/maven/non-https-url to allow localhost URLs
This commit is contained in:
@@ -25,8 +25,7 @@ private class DeclaredRepository extends PomElement {
|
|||||||
string getUrl() { result = getAChild("url").(PomElement).getValue() }
|
string getUrl() { result = getAChild("url").(PomElement).getValue() }
|
||||||
|
|
||||||
predicate isInsecureRepositoryUsage() {
|
predicate isInsecureRepositoryUsage() {
|
||||||
getUrl().matches("http://%") or
|
getUrl().regexpMatch("(?i)^(http|ftp)://(?!localhost[:/]).*")
|
||||||
getUrl().matches("ftp://%")
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,3 @@
|
|||||||
| insecure-pom.xml:31:9:36:30 | snapshotRepository | Downloading or uploading artifacts over insecure protocol (eg. http or ftp) to/from repository http://localhost.example |
|
| insecure-pom.xml:31:9:36:30 | snapshotRepository | Downloading or uploading artifacts over insecure protocol (eg. http or ftp) to/from repository http://localhost.example |
|
||||||
| insecure-pom.xml:39:9:44:22 | repository | Downloading or uploading artifacts over insecure protocol (eg. http or ftp) to/from repository http://insecure-repository.example |
|
| insecure-pom.xml:39:9:44:22 | repository | Downloading or uploading artifacts over insecure protocol (eg. http or ftp) to/from repository http://insecure-repository.example |
|
||||||
| insecure-pom.xml:47:9:52:28 | pluginRepository | Downloading or uploading artifacts over insecure protocol (eg. http or ftp) to/from repository http://insecure-repository.example |
|
| insecure-pom.xml:47:9:52:28 | pluginRepository | Downloading or uploading artifacts over insecure protocol (eg. http or ftp) to/from repository http://insecure-repository.example |
|
||||||
| secure-pom.xml:31:9:36:30 | snapshotRepository | Downloading or uploading artifacts over insecure protocol (eg. http or ftp) to/from repository http://localhost/snaphots |
|
|
||||||
| secure-pom.xml:37:9:42:30 | snapshotRepository | Downloading or uploading artifacts over insecure protocol (eg. http or ftp) to/from repository http://localhost:82 |
|
|
||||||
| secure-pom.xml:51:9:55:22 | repository | Downloading or uploading artifacts over insecure protocol (eg. http or ftp) to/from repository http://localhost:${deploy.webserver.port}/repo |
|
|
||||||
|
|||||||
Reference in New Issue
Block a user