Skip to content

fix(github): Deny raw issue creation egress - #689

Merged
dcramer merged 3 commits into
mainfrom
dcramer/gh-660-protect-issue-create
Jun 30, 2026
Merged

dcramer merged 3 commits into
mainfrom
dcramer/gh-660-protect-issue-create

Conversation

@dcramer

@dcramer dcramer commented Jun 30, 2026

Copy link
Copy Markdown
Member

Raw sandbox GitHub issue creation now stops before Junior issues credentials, so issue bodies have to go through the typed github.createIssue tool that owns idempotency and the runtime-generated conversation footer. The denial covers REST POST /repos/:owner/:repo/issues and GraphQL createIssue mutations, including fragment-based mutation shapes, while the host/plugin github.issue.create operation remains allowed.

The plugin API now has an explicit pre-credential policy denial error that core maps to HTTP 403 without recording an auth-required signal or contacting GitHub. The GitHub credential and plugin runtime specs document that boundary.

Refs GH-660

Reject raw sandbox GitHub issue creation before credentials are issued so issue bodies go through the typed createIssue tool that owns idempotency and the conversation footer.

Document the new pre-credential denial path and cover REST plus GraphQL createIssue bypasses.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>
@vercel

vercel Bot commented Jun 30, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
junior-docs Ready Ready Preview, Comment Jun 30, 2026 4:32pm

Request Review

@cursor cursor 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.

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit a6abd3a. Configure here.

Comment thread packages/junior-github/src/index.ts Resolved
Deny oversized raw GitHub GraphQL bodies before issuing credentials because Junior cannot prove they are not issue creation requests.

Also reject root createIssue selection documents and cover both paths with regression tests.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>
Drop the root-selection createIssue fixture because GraphQL shorthand documents are queries, not mutations. Keep the raw issue-create denial coverage focused on realistic mutation forms.

Refs GH-660

Co-Authored-By: GPT-5 Codex <[email protected]>
@dcramer
dcramer marked this pull request as ready for review June 30, 2026 16:34
@github-actions github-actions Bot added the risk: medium PR risk score: medium label Jun 30, 2026
@dcramer
dcramer merged commit 70af520 into main Jun 30, 2026
20 checks passed
@dcramer
dcramer deleted the dcramer/gh-660-protect-issue-create branch June 30, 2026 17:00

This branch was successfully deployed

1 active deployment
Preview – junior-docs — a9d7772e Deployed Jun 30, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: medium PR risk score: medium

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant