Skip to content

Gate the @claude mention workflow on the operator - #145

Merged
yihanzhu merged 2 commits into
mainfrom
ystack/fix/claude-mention-actor-gate
Aug 27, 2026
Merged

Gate the @claude mention workflow on the operator#145
yihanzhu merged 2 commits into
mainfrom
ystack/fix/claude-mention-actor-gate

Conversation

@yihanzhu

Copy link
Copy Markdown
Owner

The repo went public today with this workflow ungated: anyone could write @claude in a comment and spend the operator's subscription. It now requires both github.actor and github.triggering_actor to be the operator — the same both-actors rule the spec states for every gate, because on a re-run the first field names whoever started the original run.

Bots stay refused on purpose. The action already rejects bot actors unless they are in allowed_bots, and no bot edge is opened here: cross-vendor review belongs in a workflow that fires on every PR (Stack B's review-on-pr), not in a mention edge where one bot can spend your quota by talking to another.

🤖 Generated with Claude Code

The repo went public today with this workflow ungated, so any passer-by
could spend the operator's subscription by writing "@claude" in a
comment. It now checks both actors, the rule every other job here
follows — on a re-run github.actor stays whoever started the original
run, and the person who pressed re-run appears only in
github.triggering_actor.

Bots stay refused deliberately: the action rejects bot actors unless
listed in allowed_bots, and no bot edge is opened here. Cross-vendor
review belongs in a workflow that fires on every PR, not in a mention
edge where one bot can spend the operator's quota by talking to another.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@yihanzhu

Copy link
Copy Markdown
Owner Author

@codex review

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 27, 2026

Copy link
Copy Markdown

Deploying ystack with  Cloudflare Pages  Cloudflare Pages

Latest commit: d4c8b72
Status: ✅  Deploy successful!
Preview URL: https://067ce9d0.fabrica-6yx.pages.dev
Branch Preview URL: https://ystack-fix-claude-mention-ac.fabrica-6yx.pages.dev

View logs

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 13dd816990

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +31 to +32
github.actor == 'yihanzhu' &&
github.triggering_actor == 'yihanzhu' &&

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge [Security] Check who wrote an assigned issue

For the issues: assigned trigger, github.actor and github.triggering_actor identify the operator who assigned the issue, not the person who wrote its title or body. An outsider can therefore open an issue containing @claude and attacker-controlled instructions; if the operator later assigns that issue during normal triage, both new checks pass and Claude processes the outsider's text, spending quota despite this gate. Remove the assigned trigger or also require the issue author to be the operator.

Useful? React with 👍 / 👎.

@yihanzhu yihanzhu added the needs-human Escalation: round cap hit, ambiguous spec, oversized PR, or failure label Aug 27, 2026
Codex [Security]: the actor gate says who triggered the event, not who
wrote the text the agent then reads. On `issues: assigned` the actor is
the operator doing triage while the body belongs to whoever opened the
issue — so a stranger could file an issue containing "@claude" and
instructions, and it would run the moment it was assigned.

Issue events now also require the issue author to be the operator.
Comment events need no separate check: there the actor is the author.

The general shape, worth carrying: gate on the provenance of the CONTENT
an agent will act on, not only on who fired the event.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@yihanzhu

Copy link
Copy Markdown
Owner Author

@codex review

@yihanzhu yihanzhu removed the needs-human Escalation: round cap hit, ambiguous spec, oversized PR, or failure label Aug 27, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: d4c8b72d28

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@yihanzhu
yihanzhu merged commit 43be630 into main Aug 27, 2026
2 checks passed
@yihanzhu
yihanzhu deleted the ystack/fix/claude-mention-actor-gate branch August 27, 2026 21:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant