mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
rename existing getUrl predicate to getRepositoryUrl
This commit is contained in:
@@ -14,10 +14,10 @@ import java
|
||||
import semmle.code.xml.MavenPom
|
||||
|
||||
predicate isBintrayRepositoryUsage(DeclaredRepository repository) {
|
||||
repository.getUrl().matches("%.bintray.com%")
|
||||
repository.getRepositoryUrl().matches("%.bintray.com%")
|
||||
}
|
||||
|
||||
from DeclaredRepository repository
|
||||
where isBintrayRepositoryUsage(repository)
|
||||
select repository,
|
||||
"Downloading or uploading artifacts to deprecated repository " + repository.getUrl()
|
||||
"Downloading or uploading artifacts to deprecated repository " + repository.getRepositoryUrl()
|
||||
|
||||
@@ -17,11 +17,11 @@ import java
|
||||
import semmle.code.xml.MavenPom
|
||||
|
||||
predicate isInsecureRepositoryUsage(DeclaredRepository repository) {
|
||||
repository.getUrl().regexpMatch("(?i)^(http|ftp)://(?!localhost[:/]).*")
|
||||
repository.getRepositoryUrl().regexpMatch("(?i)^(http|ftp)://(?!localhost[:/]).*")
|
||||
}
|
||||
|
||||
from DeclaredRepository repository
|
||||
where isInsecureRepositoryUsage(repository)
|
||||
select repository,
|
||||
"Downloading or uploading artifacts over insecure protocol (eg. http or ftp) to/from repository " +
|
||||
repository.getUrl()
|
||||
repository.getRepositoryUrl()
|
||||
|
||||
Reference in New Issue
Block a user