Skip to content

Conversation

@denis-kudelin
Copy link

@denis-kudelin denis-kudelin commented Dec 6, 2025

Related GitHub Issue

Closes: #9881

Description

  • Add Windows-only script pathway to execute_command: accepts script_content + script_runner, writes to a temp file, runs, deletes.
  • Prompt/tool descriptions mention script mode only when Windows + toggle enabled; defaults unchanged elsewhere.
  • Settings toggle label: “Windows: run long commands via temporary script.”

Test Procedure

  • pnpm vsix (full bundle build).
  • On Windows with toggle ON: call execute_command using script_content/script_runner → expect temp script executes and is deleted.
  • On Windows with toggle OFF or on non-Windows: ensure only standard command path is available and works.

Pre-Submission Checklist

  • Issue Linked: This PR is linked to an approved GitHub Issue.
  • Scope: Changes focus on the linked issue.
  • Self-Review: Completed.
  • Testing: Add/confirm tests as applicable.
  • Documentation Impact: Prompt/tool/settings text updated; no extra docs PR required.
  • Contribution Guidelines: Read and agreed.

Screenshots / Videos

N/A (settings toggle reuses existing UI).

Documentation Updates

  • No documentation updates are required. (Text updates already included in prompts/tools/settings.)

Additional Notes

Temp script auto-cleans; script mode exposed only on Windows with the toggle.

Get in Touch

Discord: denis.kudelin


Important

Adds Windows-only script execution mode to execute_command, controlled by a new setting windowsScriptExecutionEnabled.

  • Behavior:
    • Adds Windows-only script execution mode to execute_command in execute_command.ts, using script_content and script_runner.
    • Temporary script files are created, executed, and deleted automatically.
    • Controlled by windowsScriptExecutionEnabled setting in global-settings.ts.
  • UI Changes:
    • Adds checkbox for windowsScriptExecutionEnabled in TerminalSettings.tsx.
    • Updates SettingsView.tsx to include new setting.
  • Misc:
    • Updates ExtensionStateContext.tsx to handle new setting.
    • Modifies ChatView.tsx to handle command execution changes.

This description was created by Ellipsis for 44629d5. You can customize this summary. It will automatically update as commits are pushed.

@roomote
Copy link
Contributor

roomote bot commented Dec 6, 2025

Rooviewer Clock   See task on Roo Cloud

Re-review completed. 3 of 4 issues have been resolved. 1 issue remains:

  • Command injection vulnerability in script_runner parameter (line 84)
  • Path traversal vulnerability in temp file creation (line 80)
  • Incomplete cleanup when user rejects approval (lines 192-196)
  • Invalid JSON schema with oneOf constraint in strict mode (lines 74-81)
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 6, 2025
@denis-kudelin denis-kudelin force-pushed the windows-script-tool branch 2 times, most recently from 8e11e1c to 44629d5 Compare December 6, 2025 02:24
@denis-kudelin denis-kudelin marked this pull request as ready for review December 6, 2025 02:37
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. Enhancement New feature or request labels Dec 6, 2025
@roomote
Copy link
Contributor

roomote bot commented Dec 6, 2025

Rooviewer Clock   See task on Roo Cloud

Re-review completed. 3 of 4 issues have been resolved. 1 issue remains:

  • Command injection vulnerability in script_runner parameter (line 84)
  • Path traversal vulnerability in temp file creation (line 80)
  • Incomplete cleanup when user rejects approval (lines 192-196)
  • Invalid JSON schema with oneOf constraint in strict mode (lines 74-81)
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

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

Labels

Enhancement New feature or request Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:L This PR changes 100-499 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[ENHANCEMENT] Allow Roo Code to run long Windows commands via temporary script files

2 participants