Skip to content

Revert "fix(github): encode owner and repo in request paths (#10085)" - #10086

Closed
waltonsteve147-coder wants to merge 1 commit into
simstudioai:stagingfrom
waltonsteve147-coder:revert-10085-sweep3/github-encoding
Closed

waltonsteve147-coder wants to merge 1 commit into
simstudioai:stagingfrom
waltonsteve147-coder:revert-10085-sweep3/github-encoding

Conversation

@waltonsteve147-coder

Copy link
Copy Markdown

This reverts commit 748ee49.

Summary

Brief description of what this PR does and why.

Fixes #(issue)

Product update (if relevant)

Who benefits, and what can they do now? Note rollout or plan restrictions, link the relevant Sim integration or docs guide, and include a real product demo or changelog production brief when available.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation
  • Other: ___________

Testing

How has this been tested? What should reviewers focus on?

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Screenshots/Videos

@vercel

vercel Bot commented Nov 16, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
docs Skipped Skipped Nov 16, 2026 7:17am UTC

Request Review

@greptile-apps

greptile-apps Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 2/5

[High impact] The path-building change reaches GitHub reads and writes across many workflow tools.

This PR needs fixes before merging because ordinary tool inputs can change destructive GitHub actions.

Findings

  1. P1 Security Identifiers can change destructive actions ▶
  2. P1 Expired tokens stop comments ▶

Summary

This PR reverts GitHub request-path helpers across the integration and removes await from both comment handlers.

  • Most GitHub tools build API paths directly from their input values.
  • Actions job-log requests encode owner and repository names in their paths.
  • Latest-commit lookups encode each URL path value directly.
  • The GitHub comment dispatcher returns its operation results directly.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Model supplies identifier] --> B[Builder inserts raw text]
  B --> C[Hash starts URL fragment]
  C --> D[HTTP request omits intended suffix]
  D --> E[Different GitHub action uses saved token]
Loading

Reviews (1) · Last reviewed commit: "Revert "fix(github): encode owner and re..." · Reviewed by Greptile

request: {
url: (params) =>
`https://api.github.com/repos/${githubRepoPath(params.owner, params.repo)}/issues/${githubPathSegment(params.issue_number, 'issue_number')}/labels/${encodeURIComponent(params.name)}`,
`https://api.github.com/repos/${params.owner}/${params.repo}/issues/${params.issue_number}/labels/${encodeURIComponent(params.name)}`,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 security Identifiers can change destructive actions

With owner: 'octo' and repo: 'demo#', github_remove_label now sends DELETE /repos/octo/demo: the # causes the intended issue-and-label suffix to be omitted. If the saved token can delete that repository, removing a label deletes the repository instead. Likewise, gist_id: '<id>#' turns github_unstar_gist into gist deletion. Valid branch names are affected too: deleting release#123 targets release.

Restore the path helpers across these builders instead of inserting identifiers directly.

How this was verified: Model-writable identifiers reach authenticated DELETE requests, and the transport sends the URL path and query without its fragment.

Knowledge Base Used: Integrations, connectors, and tools

Comment on lines +25 to +27
return executeToolOperationImplementation(executeGitHubCommentOperation, request)
case 'github_comment_v2':
return await executeToolOperationImplementation(executeGitHubCommentV2Operation, request)
return executeToolOperationImplementation(executeGitHubCommentV2Operation, request)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

P1 Expired tokens stop comments

Removing await makes rejected comment operations skip this catch. executeToolOperationImplementation lets errors pass through, including a GitHubOperationError when GitHub returns 401. The caller refreshes credentials only when this handler returns a 401 Response, so an expired token now fails the comment instead of refreshing and retrying.

Keep return await in both comment cases so failures reach the existing error response.

Suggested change
return executeToolOperationImplementation(executeGitHubCommentOperation, request)
case 'github_comment_v2':
return await executeToolOperationImplementation(executeGitHubCommentV2Operation, request)
return executeToolOperationImplementation(executeGitHubCommentV2Operation, request)
return await executeToolOperationImplementation(executeGitHubCommentOperation, request)
case 'github_comment_v2':
return await executeToolOperationImplementation(executeGitHubCommentV2Operation, request)

This branch was previously deployed

1 inactive deployment
Preview — ac05319d Deployed Nov 16, 2026 by vercel[bot]
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.

2 participants