Skip to content
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

DRAFT: Simple Vulnerabilities API #4

Open
wants to merge 11 commits into
base: vulns-api
Choose a base branch
from
Open

DRAFT: Simple Vulnerabilities API #4

wants to merge 11 commits into from

Conversation

di
Copy link
Owner

@di di commented Dec 28, 2022

This PR is for accepting comments/edits/suggestions on the PEP draft prior to submitting it to python/peps.

pep-9999.rst Outdated Show resolved Hide resolved
pep-9999.rst Outdated Show resolved Hide resolved
pep-9999.rst Outdated Show resolved Hide resolved
pep-9999.rst Outdated Show resolved Hide resolved
pep-9999.rst Outdated Show resolved Hide resolved
pep-9999.rst Outdated Show resolved Hide resolved
pep-9999.rst Outdated Show resolved Hide resolved
Copy link

@hugovk hugovk left a comment

Choose a reason for hiding this comment

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

Some little nits

pep-9999.rst Outdated Show resolved Hide resolved
pep-9999.rst Outdated Show resolved Hide resolved
pep-9999.rst Show resolved Hide resolved
@pradyunsg
Copy link

pradyunsg commented Jan 2, 2023

FWIW, have you considered making this a more general mechanism (eg: advisories instead of vulnerabilities)?

x-ref https://discuss.python.org/t/adding-a-mechanism-to-deprecate-a-published-project/13937/4?u=pradyunsg and https://github.com/pypi/warehouse/issues/3451

Footnotes

  1. Intentionally not a link, since I don't wanna add a back-reference to this draft PR from there.

@di
Copy link
Owner Author

di commented Jan 2, 2023

FWIW, have you considered making this a more general mechanism (eg: advisories instead of vulnerabilities)?

Probably a good item for the FAQ. Basically: yes, but the OSV format doesn't support it and there is no schema like OSV that exists that we can point to that is as widely accepted by the ecosystem, so I'd be essentially making it up here, which seems wrong.

I think if that were to happen at some point in the future, it would be straightforward to add an advisories key here, but we could also potentially future-proof this by changing the keys to advisories/advisory-ids instead?

@woodruffw
Copy link
Collaborator

I think if that were to happen at some point in the future, it would be straightforward to add an advisories key here, but we could also potentially future-proof this by changing the keys to advisories/advisory-ids instead?

My 0.02c would be for a separate key, under the theory that advisories might differ substantially from vulnerabilities in both ID format and layout (since there's no OSV-like spec for them yet). But that's admittedly small and unlikely (since advisories should closely resemble vuln reports in form) 🙂

@pradyunsg
Copy link

I'm not an author so I'll defer to y’all on picking the scope of this. This was a scope-creep/improvement that I could spot almost immediately during my first read, so that's why I asked.

This PEP's eventual goal of moving vulnerability data into a standardised API is worthwhile on its own though. :)

@pradyunsg
Copy link

potentially future-proof this

I like the idea of future-proofing the new keys in some form like -- I'm spending mental energy on https://discuss.python.org/t/python-packaging-strategy-discussion-part-1/22420 right now, so sorry but that's literally all I'm gonna say for now. 😓

@woodruffw
Copy link
Collaborator

I gave this some more thought, and renaming everything to advisories/advisory-ids is IMO a good idea for the reasons @pradyunsg mentioned: future-proofing outweighs the likelihood of needing a substantially different format for advisories.

If we do need to mitigate a potential format difference, we could have each advisory body contains a type: string field where the default (absence) implies type: "vulnerability".

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.

5 participants