Skip to content

Properly support "withdrawn".#295

Merged
oliverchang merged 2 commits intomasterfrom
withdrawn
Feb 14, 2022
Merged

Properly support "withdrawn".#295
oliverchang merged 2 commits intomasterfrom
withdrawn

Conversation

@oliverchang
Copy link
Copy Markdown
Collaborator

  • Set "withdrawn" vulnerabilities to invalid to prevent them from
    surfacing in API results and UI.
  • Handle sending "withdrawn" vulnerabilities to PyPI. Also improve
    version aggregation while we're here.

Fixes #290.

versions.extend(affected.versions)

if vulnerability.HasField('withdrawn'):
events = []
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

@di this is the expected behaviour right?

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.

We don't really care about events unless the vulnerability is marked as fixed, the important thing is versions = [] on the line below 👍

- Set "withdrawn" vulnerabilities to invalid to prevent them from
  surfacing in API results and UI.
- Handle sending "withdrawn" vulnerabilities to PyPI. Also improve
  version aggregation while we're here.

Fixes #290.
Copy link
Copy Markdown

@jonathanmetzman jonathanmetzman left a comment

Choose a reason for hiding this comment

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

LGTM

@oliverchang oliverchang merged commit 10e3699 into master Feb 14, 2022
@oliverchang oliverchang deleted the withdrawn branch February 14, 2022 20:53
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.

pypi bridge: notify on withdrawn entries

3 participants