Skip to content

Commit cf3cb3d

Browse files
committed
Add a docs for VCS_URLS_SUPPORTED_TYPES
Remove unnecessary edits Signed-off-by: ziad hany <ziadhany2016@gmail.com>
1 parent 1859672 commit cf3cb3d

3 files changed

Lines changed: 8 additions & 1 deletion

File tree

vulnerabilities/importer.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
from vulnerabilities.utils import get_reference_id
4040
from vulnerabilities.utils import is_commit
4141
from vulnerabilities.utils import is_cve
42+
from vulnerabilities.utils import nearest_patched_package
4243
from vulnerabilities.utils import purl_to_dict
4344
from vulnerabilities.utils import update_purl_version
4445

@@ -195,7 +196,12 @@ def from_url(cls, url):
195196

196197

197198
"""
199+
For VCS URLs that can currently be formed into PURLs (github, bitbucket, and gitlab),
200+
we support full code commit collection.
198201
202+
For any VCS URL types not included in this set, CodeCommit objects will not be
203+
created at this time. Instead, unsupported VCS URLs will be stored only as
204+
references, serving as a fallback until we support them.
199205
"""
200206
VCS_URLS_SUPPORTED_TYPES = {"github", "bitbucket", "gitlab"}
201207

vulnerabilities/tests/pipes/test_advisory.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ def setUp(self):
4646
affected_version_range=VersionRange.from_string("vers:pypi/>=1.0.0|<=2.0.0"),
4747
)
4848
],
49+
references=[Reference(url="https://example.com/with/more/info/CVE-2020-13371337")],
4950
date_published=timezone.now(),
5051
url="https://test.com",
5152
)

vulnerabilities/tests/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
# See https://github.com/aboutcode-org/vulnerablecode for support or download.
77
# See https://aboutcode.org for more information about nexB OSS projects.
88
#
9-
import pytest
9+
1010
from fetchcode.package_versions import PackageVersion
1111
from packageurl import PackageURL
1212
from univers.version_constraint import VersionConstraint

0 commit comments

Comments
 (0)