Skip to content

Commit 9a11dd8

Browse files
committed
Fix the Incomplete URL substring sanitization #1763
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 2b3c9bb commit 9a11dd8

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

scanpipe/pipes/resolve.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,11 @@ def get_pom_url_list(input_source, packages):
593593
input_source_url = input_source.get("download_url", "")
594594

595595
parsed_url = urlparse(input_source_url)
596-
if input_source_url and parsed_url.netloc.endswith("maven.org"):
596+
maven_hosts = {
597+
"repo1.maven.org",
598+
"repo.maven.apache.org",
599+
}
600+
if input_source_url and parsed_url.netloc in maven_hosts:
597601
base_url = input_source_url.rsplit("/", 1)[0]
598602
pom_url = (
599603
base_url + "/" + "-".join(base_url.rstrip("/").split("/")[-2:]) + ".pom"

0 commit comments

Comments
 (0)