8000 Stop github OSV importer crashes by TG1999 · Pull Request #1853 · aboutcode-org/vulnerablecode · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Stop github OSV importer crashes #1853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 4, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion vulnerabilities/importers/osv.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,14 @@ def get_affected_purl(affected_pkg, raw_id):
f"No PackageURL possible: {purl!r} for affected_pkg {affected_pkg} for OSV id: {raw_id}"
)
return
return PackageURL.from_string(str(purl))
try:
package_url = PackageURL.from_string(str(purl))
return package_url
except:
logger.error(
f"Invalid PackageURL: {purl!r} for affected_pkg {affected_pkg} for OSV id: {raw_id}"
)
return None


def get_affected_version_range(affected_pkg, raw_id, supported_ecosystem):
Expand Down
Loading
0