You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Run rake sync_github_advisories as a scheduled workflow #537
I noticed that a significant fraction of the commit history of this project looks like automated changes on the part of the rake sync_github_advisories task. Yesterday, while the maintainers were dealing with #536, I had the impression that running this task manually was a burdensome chore. I think that this task could be made easier using a Github Actions workflow.
If you are interested, I can contribute a PR for a workflow that will automatically run the rake task and submit a PR if any new advisories were added. This workflow could be triggered manually by clicking a button in the Github UI, or it could run on a schedule like a cron job.
Please feel free to contribute a workflow. I will note that the current script isn't as easy as it might seem. Still a lot of manual work to take the output and get the advisories in order.
I've attempted to get this working in https://github.com/ddalcino/ruby-advisory-db/tree/sync_github_advisories, but I keep running into credential problems. I can run the rake sync_github_advisories task locally, using the same github API token that I'm using in the workflow, and the task runs successfully. However, in a GitHub workflow, I get Github GraphQL credential problems. I don't understand what's going on here, and I'm not sure what to look for in the documentation.
After doing this for over two year, I know that this is best done with a hybrid (part automated and part manual) process, I recommend this issue by closed.
Agreed. The rake sync_github_advisories task is not designed to be fully automated.
I would prefer developing a new automated import process that can import data from GHSA and/or NVD, but automatically submit PRs instead of directly committing to the repo. We could then approve/reject/edit the submitted PRs.
Activity
reedloden commentedon Jan 20, 2023
Please feel free to contribute a workflow. I will note that the current script isn't as easy as it might seem. Still a lot of manual work to take the output and get the advisories in order.
ddalcino commentedon Feb 7, 2023
I've attempted to get this working in https://github.com/ddalcino/ruby-advisory-db/tree/sync_github_advisories, but I keep running into credential problems. I can run the
rake sync_github_advisoriestask locally, using the same github API token that I'm using in the workflow, and the task runs successfully. However, in a GitHub workflow, I get Github GraphQL credential problems. I don't understand what's going on here, and I'm not sure what to look for in the documentation.Here's the stack trace from this build: https://github.com/ddalcino/ruby-advisory-db/actions/runs/4109381580/jobs/7091810877
reedloden commentedon Feb 7, 2023
Try using
${{ secrets.GITHUB_TOKEN }}. The default token should have privileges enough.ddalcino commentedon Feb 12, 2023
I have added the
secrets.GITHUB_TOKEN, so the sync step is now:... and I'm still seeing the same 'Bad credentials' error:
reedloden commentedon Feb 12, 2023
I meant this:
GH_API_TOKEN is needed here:
ruby-advisory-db/lib/github_advisory_sync.rb
Lines 172 to 181 in 38305c6
But the value will come from
secrets.GITHUB_TOKEN.jasnow commentedon Aug 9, 2025
After doing this for over two year, I know that this is best done with a hybrid (part automated and part manual) process, I recommend this issue by closed.
postmodern commentedon Aug 10, 2025
Agreed. The
rake sync_github_advisoriestask is not designed to be fully automated.I would prefer developing a new automated import process that can import data from GHSA and/or NVD, but automatically submit PRs instead of directly committing to the repo. We could then approve/reject/edit the submitted PRs.