Skip to content

fix(education): move teach workspace probe out of pre-compute block - #2475

Merged
kyle-sexton merged 3 commits into
mainfrom
cursor/education-teach-precompute-63e1
Aug 12, 2026
Merged

kyle-sexton merged 3 commits into
mainfrom
cursor/education-teach-precompute-63e1

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Aug 12, 2026 •

Copy link
Copy Markdown
Member

Fixes #1687 (education/teach scope — session-flow siblings were already fixed in prior PRs).

Related

N/A

@cursor

cursor Bot commented Aug 12, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@claude

claude Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 55s —— View job


Security Review

  • Fetch PR diff
  • Review changed file(s) for security issues
  • Post findings

Scope: plugins/education/skills/teach/SKILL.md (+5/-1) — the only file changed in this PR.

Summary of the change: The pre-computed workspace-listing invocation was moved out of the auto-executed ! `command` pre-compute block (which fails under worktree-isolated agents per #1687) into a prose instruction telling the agent to run the identical bash .../list-workspaces.sh "${CLAUDE_PROJECT_DIR}" "${CLAUDE_PLUGIN_DATA}" command itself via its Bash tool, with an explicit fallback ("Treat failure as none").

Findings: None. This is a documentation/prompt-only change:

  • The underlying command is byte-for-byte the same as before (same script, same two quoted arguments, same 2>/dev/null || echo "none" fallback) — only the invocation mechanism changed, not the command construction, so there's no new injection surface.
  • Both ${CLAUDE_PROJECT_DIR} and ${CLAUDE_PLUGIN_DATA} remain properly double-quoted positional arguments to list-workspaces.sh rather than being interpolated into a larger shell string, so this doesn't introduce command injection.
  • list-workspaces.sh itself (the script that does the actual filesystem work) is unmodified by this PR.
  • No changes to permissions, secrets/token handling, GitHub Actions workflows, or trust boundaries — this is a SKILL.md prompt file, not executable/workflow code.

No security issues identified in this PR.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0b56950b75

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread plugins/education/skills/teach/SKILL.md Resolved
@claude

claude Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 1m 0s —— View job


Security Review

  • Fetch PR diff
  • Review changed file(s) for security issues
  • Post findings

Scope: plugins/education/skills/teach/SKILL.md (+5/-1), plugins/education/CHANGELOG.md (+7/-0), plugins/education/.claude-plugin/plugin.json (+1/-1) — all three files changed in this PR (gh pr diff 2475).

Summary of the change: Moves the workspace-listing invocation out of the auto-executed ! `command` pre-compute block (which the worktree-isolation Bash guard refuses when it contains $-expansions, per #1687) into a prose instruction telling the agent to run the identical command itself via its own Bash tool call, with an explicit "none" fallback on failure. plugin.json/CHANGELOG.md are version/changelog bookkeeping only.

Findings: No security issues identified in this PR.

  • The command construction is byte-for-byte unchanged — same script (list-workspaces.sh, itself untouched by this PR), same two arguments, same 2>/dev/null || echo "none" fallback. Only the invocation mechanism changed (harness pre-compute → agent-issued Bash call), not the command itself, so no new injection surface is introduced.
  • ${CLAUDE_PROJECT_DIR} and ${CLAUDE_PLUGIN_DATA} remain properly double-quoted positional arguments to the script rather than being interpolated into a larger shell string or concatenated with untrusted input — no command injection.
  • Both variables are harness-controlled environment values, not attacker- or user-controllable content, and nothing in the diff routes external/untrusted data into this call — no prompt-injection or trust-boundary concern from the instruction now living in prose instead of a pre-compute directive.
  • No changes to permissions, secrets/token handling, GitHub Actions workflows, or access-control logic.

Note: Codex's review (P1) raises a plausible correctness/reliability concern — that under worktree isolation the Bash tool itself may still refuse a call whose arguments contain literal $-expansions, causing existing workspaces to read as none and potentially mask prior state. That's a functional/logic issue (could cause duplicate-workspace creation or stale routing), not a security vulnerability (no injection, no auth/access-control impact, no secret exposure) — out of scope for this security-only pass, but worth the author's attention on the merits.

@kyle-sexton
kyle-sexton force-pushed the cursor/education-teach-precompute-63e1 branch from d3681bc to f44cfc8 Compare August 12, 2026 16:52
@claude

claude Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @kyle-sexton's task in 48s —— View job


Security Review

  • Fetch PR diff
  • Review changed file(s) for security issues
  • Post findings

Scope: plugins/education/skills/teach/SKILL.md (+5/-1), plugins/education/CHANGELOG.md (+7/-0), plugins/education/.claude-plugin/plugin.json (+1/-1) — all three changed files (gh pr diff 2475).

Summary of the change: Moves the workspace-listing invocation out of the harness-auto-executed ! `command` pre-compute block (refused under worktree isolation because it contains $-expansions, per #1687) into a prose instruction directing the agent to issue the identical command itself via its own Bash tool, falling back to "none" on failure. plugin.json / CHANGELOG.md are version-bump and changelog bookkeeping only.

Findings: No security issues identified in this PR.

  • SKILL.md:59 — the command construction is byte-for-byte unchanged from the removed pre-compute line: same script (list-workspaces.sh, itself untouched by this PR), same two arguments, same 2>/dev/null || echo "none" fallback. Only the invocation mechanism changed (harness pre-compute → agent-issued Bash call), not the command itself, so no new injection surface is introduced.
  • ${CLAUDE_PROJECT_DIR} and ${CLAUDE_PLUGIN_DATA} remain properly double-quoted positional arguments to the script rather than interpolated into a larger shell string or concatenated with untrusted input — no command injection.
  • Both variables are harness-controlled environment values, not attacker- or user-controllable content, and nothing in the diff routes external/untrusted data into this call. The instruction now lives in skill-body prose (trusted plugin content, loaded the same way the rest of SKILL.md already is) rather than a pre-compute directive — no new prompt-injection or trust-boundary concern.
  • plugin.json/CHANGELOG.md changes are version/changelog text only — no logic, permissions, or config semantics affected.
  • No changes to permissions, secrets/token handling, GitHub Actions workflows, or access-control logic anywhere in this diff.

Non-security note (outside this lane's scope): Codex's review (P1) raises a plausible correctness/reliability concern — that under worktree isolation the agent's own Bash tool call may still be refused because the command string literally contains ${CLAUDE_PLUGIN_ROOT}/${CLAUDE_PROJECT_DIR}/${CLAUDE_PLUGIN_DATA} expansions, causing existing workspaces to read as none and potentially mask prior state (stale resume/status/routing, possible duplicate-workspace creation). That's a functional/logic bug, not a vulnerability (no injection, no auth/access-control impact, no secret exposure), so it's out of scope for this security-only pass — but worth the author confirming against the actual worktree-isolation guard behavior before merge.

@cursor
cursor Bot force-pushed the cursor/education-teach-precompute-63e1 branch 3 times, most recently from ea2133a to 77dc11a Compare August 12, 2026 17:48
@cursor
cursor Bot force-pushed the cursor/education-teach-precompute-63e1 branch from 77dc11a to a632836 Compare August 12, 2026 18:54
@claude

claude Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @cursor[bot]'s task in 56s —— View job


Security Review

  • Fetch PR diff
  • Review changed file(s) for security issues
  • Post findings

Scope: plugins/education/skills/teach/SKILL.md (+5/-1), plugins/education/CHANGELOG.md (+7/-0), plugins/education/.claude-plugin/plugin.json (+2/-2) — all three files changed in this PR (gh pr diff 2475, head a632836).

Skip-gate: change has no security-relevant surface — see findings below.

Findings: No security issues identified in this PR.

  • SKILL.md#L57-L61 — moves the workspace-listing invocation out of the harness auto-executed ! `command` pre-compute block into prose instructing the agent to issue the same command itself via its own Bash tool, falling back to "none" on failure. The command construction is byte-for-byte unchanged: same script (list-workspaces.sh), same two positional arguments, same 2>/dev/null || echo "none" fallback — only the invocation mechanism changed, not the command itself, so no new injection surface is introduced.
  • ${CLAUDE_PROJECT_DIR} and ${CLAUDE_PLUGIN_DATA} remain properly double-quoted positional arguments to list-workspaces.sh rather than interpolated into a larger shell string or concatenated with untrusted/attacker-controllable input — no command injection. Both are harness-controlled environment values, not user- or attacker-supplied content.
  • list-workspaces.sh itself is unmodified by this PR; it treats both inputs as opaque positional strings (realpath/basename/hash), never evals or re-interpolates them into a shell command, so no injection path exists there either.
  • plugin.json is a version bump (0.6.1 → 0.6.2) plus a description-string re-encoding (— → —, same character, JSON-escaped); CHANGELOG.md is changelog prose. Neither affects permissions, secrets/token handling, GitHub Actions workflows, or trust boundaries.

Non-security note (outside this lane's scope): Codex's review (P1) raises a plausible correctness/reliability concern — that under worktree isolation, the agent's own Bash tool call may still be refused because the command string literally contains ${CLAUDE_PLUGIN_ROOT}/${CLAUDE_PROJECT_DIR}/${CLAUDE_PLUGIN_DATA} expansions, causing existing workspaces to read as none and potentially mask prior state (stale resume/status/routing). That's a functional bug, not a vulnerability (no injection, no auth/access-control impact, no secret exposure) — worth the author's attention on the merits, but out of scope for this security-only pass.

@github-actions

Copy link
Copy Markdown
Contributor

Last security-reviewed head: a632836fadeaf143893f07eb2b37a12ed5500294. On the next push, the relevance gate compares only the commits since this SHA; delete this comment to force a full re-review.

@kyle-sexton
kyle-sexton merged commit 7497b13 into main Aug 12, 2026
1 check passed
@kyle-sexton
kyle-sexton deleted the cursor/education-teach-precompute-63e1 branch August 12, 2026 19:10
@claude

claude Bot commented Aug 12, 2026 •

Copy link
Copy Markdown
Contributor

Claude finished @cursor[bot]'s task in 25s —— View job


Code Review

  • Fetch PR context
  • Check skip gate

Skip gate: this PR is already merged (state: MERGED), which meets skip-gate condition 1 ("PR is closed or not open") in the /review:code-review lane. Per that gate, deep review is skipped and no findings are posted.

No inline comments were added.

@github-actions

Copy link
Copy Markdown
Contributor

Claude has reviewed this PR 1 time. The lane skips further automatic reviews after 5; deleting this comment resets the count.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants