Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Rename PackageVulnerability's ReferenceUrl to AdvisoryUrl and make it required #7721
Rename PackageVulnerability's ReferenceUrl to AdvisoryUrl and make it required #7721
Changes from all commits
3d79ba4
6ae47ca
3320b90
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we persist the whole URL? Isn't this a view concern? Seems more flexible in the future to just persist what we know (
GhsaId
) and allow the caller to choose what to do with it (i.e. call another API, build a URL, etc).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could do both, if desired. Though the entity is meant to be GitHub-agnostic...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that both
GhsaId
andPermalink
will be fields retrieved from the GH GraphQL API. I think we are only interested in theAdvisoryUrl
, which is what we'll be surfacing in our own protocol and UI.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I thought we already non-generic with
GitHubDatabaseKey
. Should the be "ExternalKey" instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah... I'm kinda wondering about the usefulness of that
GitHubDatabaseKey
...It's the one thing GH guaranteed that wouldn't change. But the GraphQL API is using the
GhsaId
to query for a specific advisory.See also this comment added by Scott when he modeled the entity.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it would come down to having some
Provider
column (in this caseGitHub
would be the value) so we can identify the source of the data, plus a generic external key. Or alternatively have the approach that Scott described of using a key per provider (see his comment).Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Large diffs are not rendered by default.