Skip to content
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

How can we pass useful data from importer to improver? #994

Open
ziadhany opened this issue Nov 6, 2022 · 0 comments
Open

How can we pass useful data from importer to improver? #994

ziadhany opened this issue Nov 6, 2022 · 0 comments
Labels

Comments

@ziadhany
Copy link
Collaborator

ziadhany commented Nov 6, 2022

For example ruby importer/improver: #799
https://github.com/rubysec/ruby-advisory-db/blob/master/rubies/ruby/CVE-2022-28738.yml

patched_versions = record.get("patched_versions", []) # [ ~> 3.0.4 , >= 3.1.2 ]
fixed_version_ranges = [GemVersionRange.from_native(v) for v in patched_versions] # type: List[VersionRange]

unaffected_versions = record.get("unaffected_versions", []) # [ ~> 2.6.0 ,  ~> 2.7.0]
unaffected_versions_ranges = [GemVersionRange.from_native(v) for v in unaffected_versions]# type: List[VersionRange]

affected_packages = AffectedPackage(purl,affected_version_range= ,fixed_version=) # How can we fill this?

AffectedPackage type should be :
affected_version_range: VersionRange | None
fixed_version: Version | None

To pass affected_version_range and/or fixed_version as a argument for AffectedPackage
it is required to use RubyVersionAPI() but we should use RubyVersionAPI() only at improver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants