Handle disabled Maven repositories

This commit is contained in:
Tony Torralba
2022-11-21 10:11:57 +01:00
parent a69524f7b4
commit 2809c3a77c
3 changed files with 23 additions and 1 deletions

View File

@@ -17,7 +17,8 @@ import java
import semmle.code.xml.MavenPom
predicate isInsecureRepositoryUsage(DeclaredRepository repository) {
repository.getRepositoryUrl().regexpMatch("(?i)^(http|ftp)://(?!localhost[:/]).*")
repository.getRepositoryUrl().regexpMatch("(?i)^(http|ftp)://(?!localhost[:/]).*") and
not repository.isDisabled()
}
from DeclaredRepository repository