fix: harden execution boundaries and preserve async client state - #36
Merged
Conversation
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.
What this changes
Fix data-loss and authorization defects found in an adversarial review, and preserve client state across failed sends, navigation and reconnects. Changes are separated by concern into commits.
API_KEYto upgrades. Harden uploads, symlink reads, approval types, grant revocation and terminal socket ownership.Deployment change: DNS-based reverse proxies and tailnet names must set
ALLOWED_HOSTSexplicitly. Loopback and literal IP access remain supported;ALLOWED_HOSTS=*opts out. The migration is documented indocs/SELF-HOST.md,.env.exampleand the Nginx template.Why
Reproductions included unauthorized WebSocket access, matching attacker Host/Origin requests, an upload served as HTML, cross-request clone deletion, stale run/event mutation, non-boolean permission approval and the actual AppContent wrapper losing failed sends. Independent review found three additional composition/cleanup regressions; all were fixed and re-reviewed.
Nine skills were invoked through the real app using only Astra xhigh. They are not all successful workflows:
deep-interview: five answers persisted and specification saved pending approval.no-english: requested Korean output preserved code identifiers and commands.insane-search/extragoal: expected rejection of private-target / invalid-branch-and-model-family prerequisites.gpt-image/insane-review: blocked by the Astra-only constraint and required external lane/environment.ultragoal: requested file and tests passed; mandatory review/goal completion remained blocked.autoresearch: verified numeric result and verdict persisted; goal completion/cleanup remained blocked.Real-SDK offline tests prove delegated children can bypass the parent's denied Bash permission and app allowlist.
task,subagentand goal mode remain disabled; no unsafe enabling or alternate model was used to manufacture success. Issues #3/#18 and draft #30 are discussed in the report, without claiming the upstream SDK is fixed.Detailed findings, test scenarios, outcomes and limitations:
docs/plans/adversarial-skills-e2e-2026-09-05.md.Verification
npm run verify— passed on macOS: audit, licenses/notices, TypeScript, native checks, Node/Bun tests, lint, identity, production builds.905f4c5(run 33970941330); standalone website tests/build also passed. Windows execution and a Linux release tarball build were not run locally; no release/notarization was performed.npm run verifypasses.