-
-
Notifications
You must be signed in to change notification settings - Fork 264
npm importer - improver migration #805
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
Conversation
Signed-off-by: ziad <ziadhany2016@gmail.com>
Signed-off-by: ziad <ziadhany2016@gmail.com>
Signed-off-by: ziad <ziadhany2016@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: ziad <ziadhany2016@gmail.com>
Signed-off-by: ziad <ziadhany2016@gmail.com>
Signed-off-by: ziad <ziadhany2016@gmail.com>
# Conflicts: # vulnerabilities/importer.py # vulnerabilities/importers/__init__.py
Signed-off-by: ziadhany <ziadhany2016@gmail.com>
TG1999
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! please see my feedback for your consideration
| glob = "vuln/npm/**/*.json" # subdir="vuln/npm" | ||
| files = (p for p in path.glob(glob) if p.is_file()) | ||
| for file in files: | ||
| print(file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove print statement
| publish_date = parse(record["updated_at"]) | ||
| publish_date = publish_date.replace(tzinfo=pytz.UTC) | ||
|
|
||
| pkg_manager_api = NpmVersionAPI() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
VersionAPI is needed to be handled at improver side, check github and gitlab importer for same
| aff_ver.add(ver) | ||
|
|
||
| return aff_ver, fix_ver | ||
| def get_fixed_version( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add tests
| Example: | ||
| >>> z = normalize_ranges(">=6.1.3 < 7.0.0 || >=7.0.3") | ||
| >>> assert z == [">=6.1.3,<7.0.0", ">=7.0.3"] | ||
| def map_all_versions(all_versions) -> List[SemverVersion]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add tests
|
Been worked in #960 |
Signed-off-by: ziad ziadhany2016@gmail.com