Publish job persists a write credential where core's unpinned scripts can read it
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 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 进行身份验证,并在需要时更新第二个调用方。
由索引模型根据 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
- 平均合并
- 2 天 3 小时
- 30 天内合并 PR
- 46
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sillsdev/interlinearizer-extension 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 25/100
sillsdev/interlinearizer-extension#407 ·
维护者通常 1 天内回复
-
难度 4/5 3-5 天 新手友好度 18/100
sillsdev/interlinearizer-extension#403 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 55/100
sillsdev/interlinearizer-extension#402 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 8/100
sillsdev/interlinearizer-extension#401 ·
维护者通常 1 天内回复
-
难度 5/5 一周以上 新手友好度 25/100
sillsdev/interlinearizer-extension#388 ·
维护者通常 1 天内回复
查看 sillsdev/interlinearizer-extension 的全部 Issue
相似的 Issue
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:other issue-rating: 🦞 diamond lobster no-stale P2
难度 2/5 1-3 小时 新手友好度 72/100
openclaw/openclaw#168089 · 2 条评论 · 1 个 reaction ·
维护者通常 1 天内回复
-
✨ enhancement needs-discussion
难度 1/5 1 小时以内 新手友好度 85/100
-
[Bug]: [MCP/CLI] Bare loopback IP addresses (127.0.0.1:port) and hosts with ports fail to navigate due to erroneous scheme inference可能已有人在做 @alok-108 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
microsoft/playwright#43263 ·
维护者通常 1 天内回复
-
area:studio type:security
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
enhancement good first issue Stellar Wave trivial
难度 2/5 1-3 小时 新手友好度 85/100
StellarCanary/ProtocolCanary-Action#331 ·
维护者通常 1 天内回复