-
-
Notifications
You must be signed in to change notification settings - Fork 833
Add session-level auto-approve for AI file read operations #3101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mits-pl
wants to merge
18
commits into
wavetermdev:main
Choose a base branch
from
mits-pl:feature/session-read-auto-approve
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+4,926
−67
Open
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
20de8a8
add session-level auto-approve for AI file read operations
programista-wordpress 03ae5bd
fix: handle Windows path separators in directory extraction
programista-wordpress 0ab2969
fix: block sensitive directories from session auto-approval
programista-wordpress 42a16e7
fix: canonicalize paths with symlink resolution to prevent bypass
programista-wordpress 12f4861
feat: add MCP (Model Context Protocol) client package
programista-wordpress 85eb4b0
feat: integrate MCP with AI chat pipeline
programista-wordpress f7f72c6
feat: MCP Context toggle and auto-detect in AI panel
programista-wordpress 69c7e84
feat: MCP Client widget with tools panel and call log
programista-wordpress 92c9603
feat: web content tools - read text, read HTML, SEO audit
programista-wordpress 0e6a6bc
feat: session history - persist and display previous AI sessions
programista-wordpress dd7f3d8
feat: AI execution plans with progress tracking
programista-wordpress b4c8402
feat: project instructions reader (WAVE.md, CLAUDE.md, .cursorrules)
programista-wordpress b02b7f6
perf: compress tool descriptions and consolidate utility tools
programista-wordpress df51b85
fix: syntax highlighting in AI diff viewer
programista-wordpress 7a0db93
feat: Quick Add Model with BYOK presets
programista-wordpress f6d1e4f
feat: graceful shutdown for MCP clients and session history save
programista-wordpress 7df705f
fix: improve AI message handling and shell command detection
programista-wordpress 54da2fc
docs: update README with MCP, web tools, plans, session history, and …
programista-wordpress File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 2483
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 885
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1029
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1531
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 258
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 764
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 180
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 411
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 376
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 384
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1424
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
# Look at the beginning of tools_web.go to understand the structure head -150 pkg/aiusechat/tools_web.goRepository: wavetermdev/waveterm
Length of output: 4305
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 527
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 370
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1108
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1227
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 361
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1609
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 212
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 237
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 709
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 383
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 958
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 1491
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 232
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 173
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
🏁 Script executed:
Repository: wavetermdev/waveterm
Length of output: 46
Add input validation for
optsparameter in RPC handler to prevent arbitrary JavaScript execution.At lines 69–86, this code executes arbitrary JavaScript if
opts.execjsis populated. While current AI tool code paths hardcode safe values (onlyseoAuditJSis used for SEO auditing), the RPC handler atemain-wsh.ts:30accepts and forwardsdata.optsdirectly without validation. Future code changes, frontend modifications, or misuse could introduce user/model-controlled input intoexecjs.Add validation in
handle_webselectorto either:opts(blockexecjsentirely from RPC)This protects against accidental exposure and ensures the RPC boundary enforces intent, not just current code patterns.
🤖 Prompt for AI Agents