Skip to content

ci(gh_app_token): --reads-only treats file-backed GraphQL requests as writes - #35824

Merged
teamleaderleo merged 1 commit into
mainfrom
nightly-next-tick-graphql-input
Nov 4, 2026
Merged

teamleaderleo merged 1 commit into
mainfrom
nightly-next-tick-graphql-input

Conversation

@teamleaderleo

Copy link
Copy Markdown
Collaborator

Follow-up from the router review of #35688 (finding F1 at d5f6ec7).

gh_app_token.sh --reads-only classified gh api graphql --input body.json and -F query=@file.graphql as reads, because the query is not on the command line and the mutation check never sees it. A mutation sent that way would go out as the read-only App first. The App's refusal would then fall back to github.token, so nothing broke, but the mode's promise is that writes go out as github.token. Any GraphQL request whose body comes from a file or stdin (@file, --input) now counts as a write and goes out once as github.token.

Nothing in nightly-next-tick's unstick job (the only user of the mode) sends GraphQL today, so this changes no current call.

Tests: tests/test_gh_app_token.py adds both forms to the write cases (each goes out once as github.token and is not retried).

Agent session: agent session

🤖 Generated with Claude Code

…le or stdin as a write

A query given with `-F query=@file` or `--input` is not on the command line, so the wrapper
cannot tell a mutation from a read; it now goes out once as github.token. Follow-up from the
router review of #35688.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Agent-Session: https://cmux.com/deeplink/agent?id=aid-fb75b7af9902231028aa
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Owned by an agent session · session

@teamleaderleo

Copy link
Copy Markdown
Collaborator Author

Review (codex, router-review): SHIP at 6e60580

Reviewer: codex gpt-6.1-sol xhigh, fast tier.

Follow-ups: 1. They land as checklist items in this PR's one follow-up tracking issue in this repo (Follow-ups: #N ..., label follow-up; add to an open one before filing, never one issue per finding), linking this receipt; the lane that opened the PR fixes them forward.

SHIP at 6e60580

Visual verdict: unchanged by this diff

  • [P2] [follow-up] [category:correctness] [finding:F1] [outcome:pending] scripts/ci/gh_app_token.sh:110 — *=@* treats any GraphQL argument containing =@ as a mutation, so valid reads with such text in a header or query literal bypass the App. Restrict the check to field/input arguments.

Follow-ups:

  • [finding:F1] Narrow the =@ detection to file-backed field values.

@teamleaderleo
teamleaderleo merged commit 11db77b into main Nov 4, 2026
51 checks passed
@teamleaderleo
teamleaderleo deleted the nightly-next-tick-graphql-input branch November 4, 2026 19:13
@github-actions

github-actions Bot commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

cmux status (one comment, edited in place; each line is updated by the job that owns it)

Merge receipt for 6e605801d1: every check was green at merge (11 verified; 16 skipped by policy). Full suite runs on main after merge.

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