Proposal: scheduled workflow to open a PR for new GitHub advisories
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 18/100
調査の方向性
This is a design proposal, so start by reading lib/my-process.txt and the rake sync_github_advisories task, which calls lib/rad-ignores.sh. Do not write the workflow until a maintainer picks one of the three delivery options in the issue, since that choice sets the credentials needed. Work is blocked on the prerequisite fixes #1339 and #1340 and on that decision.
索引モデルが issue の本文から書いたものです。
説明
I read through lib/my-process.txt looking for steps that could move to automation to lessen the burden on maintainers. I've found a number of opportunities, and this is the first one. Steps that need human judgment stay manual.
Summary
I'd like to propose a scheduled GitHub Actions workflow that runs the existing rake sync_github_advisories task and proposes the result for review. It does not change how advisories are reviewed or merged.
Proposed behavior
- Runs once a day on a cron schedule, and on
workflow_dispatchwith an optionalgem_nameinput. - Runs
rake sync_github_advisories, which already runslib/rad-ignores.sh, so known duplicates, withdrawn advisories and non-gems are not re-added. - If files changed, opens or updates a single rolling PR from a fixed branch (for example
automation/github-advisory-sync). It never pushes tomaster. - If nothing changed, it does nothing.
- Reading advisories needs only the built-in
GITHUB_TOKEN. - Written to pass the existing
actionlintandzizmorchecks: SHA-pinned actions,permissions: {}at the top level,persist-credentials: false.
Prerequisite fixes (separate PRs)
- Fix
GitHubAdvisorySync.synccrashing withNoMethodErrorwhen no advisory is unchanged (compact!returnsnil): #1339 - Make
lib/rad-ignores.shwork from any directory and checkout name: #1340
Question for maintainers: how should the result be delivered?
This decides what credentials are needed, so I'd like your preference before writing the workflow.
- PR using a PAT or GitHub App token stored as a secret (for example
RAD_BOT_TOKEN). CI runs automatically on the PR. This needs a maintainer to create and store the credential. - PR using
GITHUB_TOKEN(no new secret). Requires enabling "Allow GitHub Actions to create and approve pull requests" in repo settings. GitHub does not run other workflows for PRs created this way, soruby.yml(lint and schema checks) would not run until a maintainer closes and reopens the PR or pushes to it. - Issue digest only. The workflow posts or updates an issue listing the new or changed advisory files, and a maintainer runs the sync themselves. No write access to code and no secret are needed.
I'm happy to implement whichever you prefer, and to drop the idea if it isn't wanted. I'm not a maintainer, so I'll test it on my fork first.
- 主要言語
- Ruby
- スター
- 1.1k
- フォーク
- 257
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 58
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
似ている issue
-
needs triage
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
rubysec/bundler-audit#481 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
dbohdan/structured-text-tools#148 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
Coolhand-Labs/coolhand-ruby#232 ·
メンテナーはふだん 1 日以内に返信
-
community
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
newrelic/newrelic-ruby-agent#3734 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信