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

feat[docs]: bugs by version #4284

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

trocher
Copy link
Contributor

@trocher trocher commented Oct 10, 2024

What I did

Created a file bugs.json containing, for all security advisory:

  • the ghsa ID
  • a meaningful name
  • a short summary
  • link the advisory
  • version where the issue was introduced
  • version where the issue was first fixed
  • severity

Using a simple script, this bugs.json file can be used to then generate the file bugs_by_version.json which list all affected bugs in a given version.

Anything earlier than 0.2.0 was grouped under 0.1.0-beta.

How I did it

GH API was not helpful unfortunately, bugs.json was created manually and should be kept up to date over time if new security advisories are published.
EDIT: There's a gh api that can be used as detailed below in the messages, should be able to craft a small script to generate bugs.json

bugs_by_version.json can be easily regenerated each time bugs.json is updated.

How to verify it

Checking the json files.

Commit message

feat[docs]: add bugs per versions list

Description for the changelog

added bugs per versions list

Cute Animal Picture

Put a link to a cute animal picture inside the parenthesis-->

@trocher trocher changed the title Docs/bugs by version feat[docs]: bugs by version Oct 10, 2024
Copy link
Collaborator

@pcaversaccio pcaversaccio left a comment

Choose a reason for hiding this comment

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

That's very cool and super useful to have!

@cyberthirst
Copy link
Collaborator

thank you, looks great :)

would be great to automate this so we don't have to update with each released advisory. There seems to be an API for the advisories to fetch them in json (https://docs.github.com/en/rest/security-advisories/repository-advisories?apiVersion=2022-11-28)

then we'd have a similar script to yours which would parse by version. it would have to be unprivileged to avoid the risk of leaking some unreleased advisory

@cyberthirst
Copy link
Collaborator

thank you, looks great :)

would be great to automate this so we don't have to update with each released advisory. There seems to be an API for the advisories to fetch them in json (https://docs.github.com/en/rest/security-advisories/repository-advisories?apiVersion=2022-11-28)

then we'd have a similar script to yours which would parse by version. it would have to be unprivileged to avoid the risk of leaking some unreleased advisory

oh i just skimmed the PR description. i see you tried to use the API - can you please add what's the problem with it?

@trocher
Copy link
Contributor Author

trocher commented Oct 10, 2024

thank you, looks great :)
would be great to automate this so we don't have to update with each released advisory. There seems to be an API for the advisories to fetch them in json (https://docs.github.com/en/rest/security-advisories/repository-advisories?apiVersion=2022-11-28)
then we'd have a similar script to yours which would parse by version. it would have to be unprivileged to avoid the risk of leaking some unreleased advisory

oh i just skimmed the PR description. i see you tried to use the API - can you please add what's the problem with it?

Yeah, I was using the wrong API. This looks great and should do the job. Only missing thing would be: filling name and summary fields, which had to be done manually given that advisories have no short consistent name. And summaries are sometime missing or not really good.

@cyberthirst
Copy link
Collaborator

Yeah, I was using the wrong API. This looks great and should do the job. Only missing thing would be: filling name and summary fields, which had to be done manually given that advisories have no short consistent name. And summaries are sometime missing or not really good.

yeah, understand. agree that the name and summary would be great - although in the end, we want the user to read the full advisory to understand the full consequences

My worry about doing this manually is that we'll forget to update the list one day, and someone else will rely on it to contain up-to-date information.

@charles-cooper
Copy link
Member

yea, would be good to have a script instead of manually updating this. in fact, bugs_by_version.json looks like a processed form of bugs.json?

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.

4 participants