Skip to content

[WRONG BRANCH] fix(cursor): bind exec result guidance to exact tool identity - #365

Draft
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-exec-bridge-vulnerability
Draft

[WRONG BRANCH] fix(cursor): bind exec result guidance to exact tool identity#365
luvs01 wants to merge 1 commit into
mainfrom
codex/propose-fix-for-exec-bridge-vulnerability

Conversation

@luvs01

@luvs01 luvs01 commented Aug 28, 2026

Copy link
Copy Markdown
Owner

Motivation

  • A previous change classified tools as the Codex exec bridge using substring/namespace containment which misidentified unrelated namespaced tools and caused empty exec outputs to be rewritten.
  • The normalization must only apply to the actual Codex exec/shell bridge identities and must preserve an incoming isError:true state.

Description

  • Introduce CODEX_EXEC_BRIDGE_TOOL_NAMES and tighten isCodexExecBridgeTool to require either a bare recognized bridge name, the exact opencodex-responses namespace paired with a recognized name, or an exact MCP display-alias match such as mcp_opencodex-responses_<name> / mcp__opencodex-responses__<name>.
  • Preserve the incoming isError value when emitting the empty-exec guidance so existing error states are not overwritten.
  • Add regression tests to tests/cursor-exec-empty-result.test.ts covering reserved-namespace exact matching, unrelated namespaced exec pass-through, alias matching, and error-state preservation.

Testing

  • Ran the focused tests with bun test tests/cursor-exec-empty-result.test.ts tests/cursor-toolresult-normalize.test.ts, and the changed/related tests passed (27 tests, all assertions succeeded).
  • Ran the TypeScript check with bun run typecheck and bun run privacy:scan; both checks passed for the scoped changes.
  • A full repository test run (bun run test) exercised many unrelated suites and exposed existing, unrelated timeouts/authentication-status mismatches; the focused Cursor regressions introduced here remain green.

Codex Task

@coderabbitai

coderabbitai Bot commented Aug 28, 2026

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a9d8ce46-41bd-4cac-a843-1ca95e0b826a


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the bug Something isn't working label Aug 28, 2026
@github-actions

Copy link
Copy Markdown

Deterministic PR hygiene checks passed.

@github-actions github-actions Bot changed the title fix(cursor): bind exec result guidance to exact tool identity [WRONG BRANCH] fix(cursor): bind exec result guidance to exact tool identity Aug 28, 2026
@github-actions

github-actions Bot commented Aug 28, 2026

Copy link
Copy Markdown

⏳ DRAFT

  • wrong target branch (main); retarget to dev.

What to do

  • Retarget this PR to dev — all contributions go to dev.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.

@github-actions
github-actions Bot marked this pull request as draft August 28, 2026 04:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

aardvark bug Something isn't working codex

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant