Repository navigation
fix(tools): pin v2 tool execution credentials to the request workspace - #10323
Merged
Merged
Conversation
POST /api/v2/tools/{toolId}/execute evaluated allowedIntegrations and
deniedTools against the request workspace, but the executor authorized
the caller-supplied credentialId with no workflow and no workspace, so a
credential from another workspace the caller belongs to ran under the
request workspace's policy. Authorize the credential against the request
workspace before dispatch.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
[Medium impact] The PR appears safe to merge. SummaryThe PR checks that a supplied
Reviews (1) · Last reviewed commit: "fix(tools): pin v2 tool execution creden..." · Reviewed by Greptile |
Contributor
There was a problem hiding this comment.
No issues found across 5 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
This PR changes authentication, authorization, or input validation. Ultrareviews find 2.4x more serious bugs than standard reviews. Comment @cubic-dev-ai ultrareview to run one.
Turn on auto-fix | Re-trigger cubic
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /api/v2/tools/{toolId}/executecheckedallowedIntegrationsanddeniedToolsagainst the request workspace, but the executor authorized the caller-suppliedcredentialIdwith no workflow and no workspace, so the cross-workspace check inauthorizeCredentialUseForAuthnever ranexecuteToolForCallernow authorizescredentialIdagainst the request workspace before billing or dispatch and answers403otherwise — the same patternbinding-targets.tsand the selector path use403for unknown, foreign, and other-workspace credentials, so it is not an existence oracle403Type of Change
Testing
execute-tool.test.ts: new test runs the realauthorizeCredentialUseForAuthwith a credential from another workspace and expects a refusal with no dispatch; red with the guard reverted, 32/32 green with itcheck:openapi,check:test-patterns,check:comment-hygiene,check:boundaries,check:actorless-executor-operations,check:source-conventions,check:explicit-any, biomebun run generatevia the pre-push hook; fullcheck:auditsleft to CIChecklist
test-auditauthoring gate)