Skip to content

Commit 116c3fe

Browse files
committed
Fix wrong ref urls in archlinux importer
Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
1 parent 2a8f435 commit 116c3fe

2 files changed

Lines changed: 7 additions & 11 deletions

File tree

vulnerabilities/importers/archlinux.py

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2017 nexB Inc. and others. All rights reserved.
2+
# Copyright (c) nexB Inc. and others. All rights reserved.
33
# http://nexb.com and https://github.com/nexB/vulnerablecode/
44
# The VulnerableCode software is licensed under the Apache License version 2.0.
55
# Data generated with VulnerableCode require an acknowledgment.
@@ -18,7 +18,7 @@
1818
# OR CONDITIONS OF ANY KIND, either express or implied. No content created from
1919
# VulnerableCode should be considered or used as legal advice. Consult an Attorney
2020
# for any legal advice.
21-
# VulnerableCode is a free software code scanning tool from nexB Inc. and others.
21+
# VulnerableCode is a free software tool from nexB Inc. and others.
2222
# Visit https://github.com/nexB/vulnerablecode/ for support and download.
2323
import dataclasses
2424
import json
@@ -31,12 +31,10 @@
3131
from packageurl import PackageURL
3232
from schema import Regex, Schema, Or
3333

34-
from vulnerabilities.data_source import (
35-
DataSource,
36-
DataSourceConfiguration,
37-
Advisory,
38-
VulnerabilityReferenceUnit,
39-
)
34+
from vulnerabilities.data_source import Advisory
35+
from vulnerabilities.data_source import DataSource
36+
from vulnerabilities.data_source import DataSourceConfiguration
37+
from vulnerabilities.data_source import VulnerabilityReferenceUnit
4038

4139

4240
def validate_schema(advisory_dict):
@@ -117,10 +115,9 @@ def _parse(self, record) -> List[Advisory]:
117115
vuln_references.append(
118116
VulnerabilityReferenceUnit(
119117
reference_id=ref,
120-
url="https://security.archlinux.org/{}".format(record["name"]),
118+
url="https://security.archlinux.org/{}".format(ref),
121119
)
122120
)
123-
print(vuln_references)
124121

125122
advisories.append(
126123
Advisory(

vulnerabilities/importers/github.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,6 @@ def fetch(self) -> Mapping[str, List[Mapping]]:
112112
query_json = {"query": query % (ecosystem, end_cursor_exp)}
113113
resp = requests.post(self.config.endpoint,
114114
headers=headers, json=query_json).json()
115-
print(resp)
116115
if resp.get("message") == "Bad credentials":
117116
raise GitHubTokenError("Invalid GitHub token")
118117

0 commit comments

Comments
 (0)