Repository navigation
Fix P0 issues: Windows SDK patch, WS auth hardening, approval diffs, read gating - #8
Merged
Merged
Conversation
…read gating - patch-sdk: detect CLI entry by path so postinstall patches on Windows - server: refuse to start the real agent without a token, reject cross-origin WebSocket handshakes, cap WS payload at 1 MB - toolOverrides: show the real diff in write approvals; patches that cannot apply are rejected without prompting - toolOverrides: add read_files override that stays in the project and asks before credential-like files; sensitive-path regex handles Windows separators - tests for each Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
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
scripts/patch-sdk.mjscomparedimport.meta.urltofile://${argv[1]}, which never matches on Windows, sopostinstallsilently skipped the SDK patch and the first chat threw "not patched". It now compares paths.FREEBUFF_REMOTE_TOKEN(an empty token used to disable auth). WebSocket handshakes with a browserOriginthat doesn't matchHostare rejected, so another web page can't drive the local server. Messages are capped at 1 MB.write_filecomputes the diff against the file on disk before asking, so full-file writes show a diff on the phone, not just patches. Patches that can't apply are rejected without prompting.read_filesoverride stays inside the project and asks before credential-like files (.env*,*.pem,*.key). The sensitive-path regex now handles Windows separators.Known limits
read_filesoverride replaces the SDK's reader, so reads no longer honor.gitignore.code_search,globandlist_directoryare still ungated.unifiedDiff) has not been checked in a browser.Test plan
tsc --noEmitclean/tmp)