Skip to content

Commit

Permalink
Update NuGet API endpoint. (#300)
Browse files Browse the repository at this point in the history
The "registration3" endpoint returns outdated data. Use
"registration5-semver1" instead.
  • Loading branch information
oliverchang authored Feb 15, 2022
1 parent bc9f456 commit 95135bc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/osv/ecosystems.py
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ def enumerate_versions(self, package, introduced, fixed, limits=None):
class NuGet(Ecosystem):
"""NuGet ecosystem."""

_API_PACKAGE_URL = ('https://api.nuget.org/v3/registration3/{package}/'
'index.json')
_API_PACKAGE_URL = ('https://api.nuget.org/v3/registration5-semver1/'
'{package}/index.json')

def sort_key(self, version):
"""Sort key."""
Expand Down
2 changes: 1 addition & 1 deletion lib/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

setuptools.setup(
name='osv',
version='0.0.12',
version='0.0.13',
author='OSV authors',
author_email='osv-discuss@googlegroups.com',
description='Open Source Vulnerabilities library',
Expand Down

0 comments on commit 95135bc

Please sign in to comment.