Skip to content

Conversation

@TG1999
Copy link
Contributor

@TG1999 TG1999 commented Jul 12, 2023

Fixes #1281

@TG1999 TG1999 changed the title Mark advisories as rejected according to NVD advisory Mark advisories status according to NVD advisory Sep 29, 2023
class VulnerabilityStatusType(models.IntegerChoices):
"""List of vulnerability statuses."""

PUBLISHED = 1, "published"
Copy link
Member

Choose a reason for hiding this comment

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

The code in https://github.com/nexB/vulnerablecode/pull/1232/files#diff-3e8fc96d993d0bd8585642f68239732a30a19b7ec100a36ee5d21e209625ff81R120 seem redundant. Could we have a single label, either as "published" or "Published" but not both?

def get_queryset(self):
return super().get_queryset().prefetch_related("references", "aliases", "weaknesses")

def get_status(self, status):
Copy link
Member

Choose a reason for hiding this comment

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

This method should be moved to VulnerabilityStatusType IMHO

Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

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

I added some nits... please merge when you feel comfy!

Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
Signed-off-by: Tushar Goel <tushar.goel.dav@gmail.com>
@TG1999 TG1999 merged commit dc94005 into aboutcode-org:main Nov 15, 2023
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.

Dealing with junk CVEs

2 participants