Repository navigation
🐛 Remember per repo that Prow refuses the App's /ok-to-test - #18876
Conversation
Refs #18608 Signed-off-by: Andrew Anderson <andy@clubanderson.com>
Mutation testinggremlins found 7 surviving mutant(s) in changed files: the code ran under tests, but changing it did not fail any test.
2 mutant(s) in changed files are not reached by any test (NOT COVERED). A maintainer may apply the
Verdict: |
There was a problem hiding this comment.
Security review — one in-scope finding (trust boundary).
The repo-wide refusal memory trusts comment text from any author. deriveProwRefusal (automerge_prow_refusal_memory.go:118) returns true for any non-App comment that contains Cannot trigger testing until a trusted user and mentions @<app>. It never checks who wrote the comment. When AppBotLogin() is empty, any comment with the phrase is enough. Anyone who can comment on any issue or PR in a public repo can post that text. The result is that Hive stops posting /ok-to-test on every fork PR in the repo for up to 30 days (the lookback window), and each PR gets the needs-human note instead. The note stops the lane on its own, and the memory renews itself. This is a repo-wide denial of the lane, where the same check in automerge_held_runs.go:378 only affected one PR. It does not grant privilege.
Suggested fix: count only comments from Prow's bot. Require the author to be a Bot account, and ideally match a configured Prow login. Drop the empty-login fallback.
if appLogin != "" && comment.GetUser().GetType() == "Bot" && strings.Contains(strings.ToLower(body), "@"+strings.ToLower(appLogin)) {
Add a test where a non-bot user posts the refusal text mentioning the App and the memory stays false.
The other changes look fine. Failed lookups fail open, the quota is bounded, the note omits Prow's wording so it can't renew the memory, and the workflow-installed check clears the memory.
— hive: agent=adjudicator-2 backend=claude model=claude-sonnet-5-5 claude=2.1.326
| } | ||
| continue | ||
| } | ||
| if appLogin == "" || strings.Contains(strings.ToLower(body), "@"+strings.ToLower(appLogin)) { |
There was a problem hiding this comment.
Any commenter can forge this. No author check, so a non-bot comment with the refusal phrase and @app flips the whole repo to skip /ok-to-test for 30 days. If AppBotLogin is empty, any comment with the phrase matches. Require a Bot author (ideally Prow's configured login) and drop the empty-login fallback.
| if appLogin == "" || strings.Contains(strings.ToLower(body), "@"+strings.ToLower(appLogin)) { | |
| if appLogin != "" && comment.GetUser().GetType() == "Bot" && strings.Contains(strings.ToLower(body), "@"+strings.ToLower(appLogin)) { |
|
Hive status — updated in place; edits do not notify. Full history is in the Activity Monitor. Review findings from Correctness review at 25c8091: no in-scope blocker. The skip/note/restart/clear paths read correctly and the tests cover them. Advisory only (low):
@clubanderson this PR is held at Why:
Next: the hive does not push to your branch. Push a new head (or reply here); CI and the review swarm re-run automatically and the PR returns to the normal path. |
|
[APPROVALNOTIFIER] This PR is APPROVED Approval requirements bypassed by manually added approval. This pull-request has been approved by: The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Remaining scope of #18608 after #18748 and #18838 (decision: fold nothing further; nudge/adopt ladder is #18872).
requestProwPresubmitsForFork) now consults a repo-level memory that Prow refuses the App. When known, it skips the first/ok-to-testand posts the existinghive-ok-to-test-rejectedneeds-human guidance directly (once per PR).hive-ok-to-test.ymlis installed. Unknown repos and non-Prow repos behave as before.Refs #18608
🤖 Generated with Claude Code