[quality] checkOrgMember's missing payload.repository guard (auth.ts:43-45) is reached by no bundle test
维护者通常 2 天内回复
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 功能
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- github-actions, typescript
- 领域
- testing
调研方向
Start with src/utils/auth.ts:43-45 and the existing __tests__/utils/auth.test.ts; use the payload-guard patterns in pluginPayloadGuards.test.ts to create an issue_comment bundle test with repository removed. Assert the debug log, no organization-membership GET, successful collaborator assignment, and no authorized users found for a stranger. Done means the new bundle test passes and covers the missing guard.
由索引模型根据 Issue 内容生成。
描述
Finding
checkOrgMember (src/utils/auth.ts:43-45) answers not a member without an API call when the event payload carries no repository object, logging checkOrgMember error: context payload repository undefined. Every bundle fixture carries repository, so the arm is exercised only by the unit suite.
Evidence (main @ d0b1d87, Node v26.10.0, vitest 5.0.3):
- Unit:
npx vitest run --coverage→ 100 % lines; the arm is green via__tests__/utils/auth.test.ts. - End-to-end:
npm run test:coverage:e2eon a scratch branch =origin/main+ the heads of the 10 open hold-gated bundle PRs (#423 #425 #427 #429 #431 #433 #435 #437 #439 #445; 70 files / 449 tests pass) → 98.65 % lines ofsrc/.auth.ts:44-45have 0 hits. - The two reports come from different transforms (vite vs. tsc+webpack) and are not combined, per
vitest.e2e-coverage.config.mjs; they are read separately above.
Of the rest of that e2e residual, the ten command-side could not check … auth wrappers and auth.ts:181/210/217/224 are unreachable (#386); the reset*() helpers in config.ts:220, labeling.ts:92, mergeQueue.ts:67, owners.ts:302-303, pullRequestOwners.ts:55-56, tide.ts:236-237 are test-only hooks; events.ts:48 / handlePullReq.ts:46 need an empty handler registry, approve.ts:236 is an exhaustive-switch default, command.ts:38 is guarded by every caller's hasCommand, meow.ts:112 needs body.cancel() to reject on a fresh body, and tide.ts:96 is the retryIf default both callers override. auth.ts:43-45 is the one arm a crafted payload reaches: context.repo falls back to GITHUB_REPOSITORY, so the collaborator and comment probes still run and the command completes.
Recommendation
- add a bundle test that runs
/assign @useron anissue_commentpayload withrepositorydeleted (aspluginPayloadGuards.test.tsdoes for other objects), asserting the debug line, noGET /orgs/…read, and that a collaborator is still assigned while a stranger fails withno authorized users found
Priority
- Impact: low
- Effort: low
Filed by quality agent (hold-gated mode)
🐝 Hive Agent: quality | Instance: hosted-available-lke648397-260827-5q9t | SHA: 183f5b6
— hive: agent=quality backend=copilot model=claude-fable-5.1 copilot=1.0.88
- 主要语言
- TypeScript
- 星标
- 132
- 派生
- 23
- 平均合并
- 1 天 18 小时
- 30 天内合并 PR
- 183
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
cncf/prow-github-actions 的其他 Issue
-
agent/quality hive/hosted-available-lke648397-260827-5q9t hive/verified-open needs-kind quality testing
难度 2/5 1-3 小时 新手友好度 74/100
cncf/prow-github-actions#466 · 30 条评论 ·
维护者通常 2 天内回复
-
kind/cleanup
难度 5/5 一周以上 新手友好度 15/100
cncf/prow-github-actions#170 · 2 条评论 ·
维护者通常 2 天内回复
查看 cncf/prow-github-actions 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 80/100
aws/agentcore-cli#2606 ·
维护者通常 1 天内回复
-
ai-driven-qa bug Cosmetic
难度 2/5 1-3 小时 新手友好度 74/100
维护者通常 1 天内回复
-
ai-driven-qa bug claude Minor
难度 2/5 1-3 小时 新手友好度 64/100
linagora/twake-mail-admin#301 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 1 天内回复
-
reproduced
难度 2/5 1-3 小时 新手友好度 70/100
anomalyco/opencode#56038 · 1 条评论 ·
维护者通常 1 天内回复