Skip to content

Use packageurl version 0.9.3 and Add nginx importer - #264

Merged
pombredanne merged 1 commit into
aboutcode-org:mainfrom
sbs2001:nginx
Nov 17, 2020
Merged

Use packageurl version 0.9.3 and Add nginx importer#264
pombredanne merged 1 commit into
aboutcode-org:mainfrom
sbs2001:nginx

Conversation

@sbs2001

@sbs2001 sbs2001 commented Oct 7, 2020

Copy link
Copy Markdown
Collaborator

Signed-off-by: Shivam Sandbhor shivam.sandbhor@gmail.com

Signed-off-by: Shivam Sandbhor <shivam.sandbhor@gmail.com>
@sbs2001

sbs2001 commented Oct 7, 2020

Copy link
Copy Markdown
Collaborator Author

Fixes #96

@sbs2001 sbs2001 mentioned this pull request Oct 7, 2020

@pombredanne pombredanne left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I am merging this leave aside the few nitpickings... we should definitely add tests though!
Thanks!

import dataclasses
import json

import requests

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: we should sort imports. But we should also switch to using black and isort, so we can do it all at once!

return advisories

def extract_fixed_pkgs(self, vuln_info):
vuln_status, version_info = vuln_info.split(": ")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Using a .partition() is more robust as it always does a single split and always return three values making the tuple unpacking safer and more reliable. I tend to prefer it followed by a .strip() call.

@pombredanne
pombredanne merged commit d6832bd into aboutcode-org:main Nov 17, 2020
@sbs2001 sbs2001 mentioned this pull request Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants