Publish job persists a write credential where core's unpinned scripts can read it
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 48/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- git, github-actions, typescript
調査の方向性
.github/workflows/publish.yml、.github/actions/bump-versions-action/action.yml、lib/bump-versions.ts、.github/workflows/bump-versions.yml を読みます。publish の両方の checkout と action が認証情報をどのように扱うかを確認し、続いて記載されている lint および YAML のチェックを実行します。publish workflow が永続化された認証情報を公開しなくなり、バージョン更新が引き続きスコープ付きの action input を通じて認証され、必要に応じて 2 番目の呼び出し元も更新されていれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Summary
The publish job checks out this repo with credentials persisted, then runs two npm scripts from an unpinned external branch in the same runner. Those scripts can read the checkout's http.extraheader and reuse the job's contents: write token against this repository.
Detail
.github/workflows/publish.yml checks out extension-repo without persist-credentials: false, so extension-repo/.git/config carries an AUTHORIZATION: basic <base64 x-access-token:GITHUB_TOKEN> header. The job grants contents: write.
The same job then checks out paranext/paranext-core with no ref, resolving to whatever its default branch HEAD is at run time, and executes two core-owned scripts before the release is created:
npm run stage-dev-packagesnpm run verify:dev-packages
npm ci --ignore-scripts does not cover these — they are explicit invocations, added deliberately because the install skips lifecycle scripts.
A malicious or compromised core revision could read the sibling checkout's git config, extract the header, and push to this repository.
Why this workflow specifically
Every other workflow already sets persist-credentials: false on its own checkout — test.yml, lint.yml, codeql.yml. publish.yml is the only one that does not, and the only one with contents: write. This is a gap in an otherwise consistent pattern, not a missing convention.
Mitigating factors
workflow_dispatchonly, so a maintainer has to trigger it.- The unpinned core ref is deliberate and documented in-workflow; this issue is about the credential, not the floating ref. Pinning core for release builds only would make release builds diverge from what CI validated.
The two halves are coupled
persist-credentials: false alone breaks the version bump. lib/bump-versions.ts runs git push -u origin HEAD, which authenticates through exactly the header being removed. So the fix has to be:
persist-credentials: falseon bothextension-repocheckouts inpublish.yml— the second one matters too, sinceclean: falsereuses the directory and would otherwise re-persist the credential.bump-versions-actiontakes atokeninput and configures the credential itself, scoped to that one step.
Neither half ships alone.
Upstream consideration
.github/actions/bump-versions-action/action.yml is currently byte-identical to paranext-extension-template. publish.yml has already diverged substantially and is effectively repo-owned, but the action has not.
That means the vulnerability is template-wide — any extension repo built on this template has the same publish-job shape — and a local-only fix to the action creates a conflict surface on every future template merge. Worth deciding whether the action half belongs upstream before patching it here.
Verification already done
A prototype of the above was built and reverted (it was noticed on merge-template, which should stay a clean template merge). Confirmed during that work:
- Restore-on-exit logic tested under bash: token live during the run; header removed where none pre-existed, restored to the persisted value where one did, and restored on failure.
ncipollo/release-actiondefaultstokento${{ github.token }}and authenticates via the API, not the checkout — the release step is unaffected by dropping persisted credentials..github/workflows/bump-versions.ymlis a second caller of the action; it checks out no external repo so has no exposure, but it would need the new input passed.npm run lintpassed; all YAML parsed.
Nothing was run in CI.
- 主要言語
- TypeScript
- スター
- 2
- フォーク
- 0
- 平均マージ
- 1日 10時間
- マージ済み PR(30日)
- 74
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
sillsdev/interlinearizer-extension のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
sillsdev/interlinearizer-extension#552 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
sillsdev/interlinearizer-extension#548 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
sillsdev/interlinearizer-extension#543 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
sillsdev/interlinearizer-extension#537 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
sillsdev/interlinearizer-extension#515 ·
メンテナーはふだん 1 日以内に返信
sillsdev/interlinearizer-extension の issue をすべて見る
似ている issue
-
Remove unused dependencies対応中かも @alastair-smith が今日担当しました。 オープンchore other
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
alastair-smith/card-games#384 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
code-yeongyu/senpi#5571 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
nexu-io/open-design#9262 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
friction
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
kentcdodds/kody#4753 ·
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
難易度 1/5 1時間未満 初心者へのやさしさ 62/100
lingdojo/kana-dojo#33508 · コメント 1 件 · リアクション 5 件 ·
メンテナーはふだん 1 日以内に返信