Skip to content

Commit 1d55dab

Browse files
authored
Removes aliasing for namespaces that affected maven (#349)
* Removes aliasing for namespaces that affected maven Signed-off-by: Prabhu Subramanian <[email protected]> --------- Signed-off-by: Prabhu Subramanian <[email protected]>
1 parent 7efd5ac commit 1d55dab

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

depscan/lib/normalize.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,18 +101,6 @@ def create_pkg_variations(pkg_dict):
101101
vendor_aliases.add(vendor)
102102
vendor_aliases.add(vendor.lower())
103103
vendor_aliases.add(vendor.lstrip("@"))
104-
if (
105-
vendor.startswith("org.")
106-
or vendor.startswith("io.")
107-
or vendor.startswith("com.")
108-
or vendor.startswith("net.")
109-
):
110-
tmpA = vendor.split(".")
111-
# Automatically add short vendor forms
112-
# Increase to 6 to reduce false positives when the package name is core
113-
if len(tmpA) > 1 and len(tmpA[1]) > 6:
114-
if tmpA[1] != name:
115-
vendor_aliases.add(tmpA[1])
116104
# Add some common vendor aliases
117105
if purl.startswith("pkg:golang") and not name.startswith("go"):
118106
vendor_aliases.add("go")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "owasp-depscan"
3-
version = "5.4.5"
3+
version = "5.4.6"
44
description = "Fully open-source security audit for project dependencies based on known vulnerabilities and advisories."
55
authors = [
66
{name = "Team AppThreat", email = "[email protected]"},

test/test_norm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def test_pkg_variations():
2121
pkg_list = create_pkg_variations(
2222
{"vendor": "org.eclipse.foo", "name": "bar", "version": "1.0.0"}
2323
)
24-
assert len(pkg_list) > 1
24+
assert len(pkg_list) == 1
2525
pkg_list = create_pkg_variations(
2626
{
2727
"vendor": "com.fasterxml.jackson.core",

0 commit comments

Comments
 (0)