Skip to content

Conversation

@ziadhany
Copy link
Collaborator

Signed-off-by: ziad ziadhany2016@gmail.com

ziadhany and others added 8 commits August 1, 2022 15:48
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>
Copy link
Contributor

@TG1999 TG1999 left a 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)
Copy link
Contributor

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()
Copy link
Contributor

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(
Copy link
Contributor

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]:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add tests

@ziadhany ziadhany mentioned this pull request Sep 22, 2022
9 tasks
@TG1999
Copy link
Contributor

TG1999 commented Nov 21, 2022

Been worked in #960

@TG1999 TG1999 closed this Nov 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants