claude-mention: pull_request_review_comment events lack secrets for fork PRs (regression from #1421)
Problem
PR #1421 removed the fork filter (head.repo.full_name == github.repository) from the pull_request_review_comment trigger in claude-mention.yaml, based on the assumption that this event type has access to secrets for fork PRs (like pull_request_target does).
This assumption is wrong. Run 22914840420 (triggered 25 minutes after #1421 merged) failed at checkout with:
Input required and not supplied: token
This means WORKTRUNK_BOT_TOKEN was empty — secrets are NOT available for pull_request_review_comment events on fork PRs, same as pull_request events.
Evidence
- PR #1421 merged at 16:46 UTC
- Run 22914840420 triggered at 17:11 UTC by this inline comment from
@max-sixtyon fork PR #1401 - The
Verify bot engagementstep was skipped (comment contained@worktrunk-bot) - The
Checkout codestep failed becausetoken:received an empty string
Root cause
GitHub Actions event types and secret availability for fork PRs:
pull_request— no secrets (runs in fork context)pull_request_target— has secrets (runs in base repo context)pull_request_review_comment— no secrets (runs in fork context, likepull_request)issue_comment— has secrets (always runs in base repo context)
The previous fork filter was correct. It should be restored, with the comment updated to reflect the actual behavior.
Impact
Any inline review comment on a fork PR now triggers claude-mention, which fails at checkout. Before #1421, the fork filter would skip these runs entirely. The workaround (using a conversation-tab comment instead of inline review) still works since issue_comment events have secret access.
Suggested fix
Restore the fork filter in the if: condition and update the workflow comment and .github/CLAUDE.md to document that pull_request_review_comment does NOT have secret access for fork PRs.
Thanks for reporting this! The analysis is spot-on — pull_request_review_comment does not have secret access for fork PRs, same as pull_request.
I've opened #1426 with a fix that:
- Restores the fork filter (
head.repo.full_name == github.repository) in theif:condition - Restores the workflow comment and "Does not trigger" documentation
- Adds a "Fork PR secret availability" reference table to
.github/CLAUDE.mddocumenting which event types have secrets for fork PRs, to prevent this from recurring
CI is green across all platforms. A maintainer will review shortly.
This is a GitHub platform limitation, not a bug we can fix in the current architecture.
GitHub has no event type that provides secret access for pull_request_review_comment on fork PRs. Unlike pull_request (which has pull_request_target), there is no pull_request_review_comment_target — and GitHub has no plans to add one. The same gap affects pull_request_review (aws-actions/configure-aws-credentials#416).
The reason we haven't seen failures recently: the verify job's engagement check accidentally prevents most fork PR review comments from reaching the broken checkout. Only explicit @bot mentions in inline review comments on fork PRs trigger the failure — and that hasn't happened since the original incident.
Documented in tend:
- README.md — new Limitations section
- docs/security-model.md — fork context added to event type definitions
Workaround: use conversation-tab comments instead of inline when interacting with the bot on fork PRs.
This was written by Claude Code on behalf of @max-sixty