Dual-Engine IPC Security and Secure Eval Implementation#12
Conversation
This commit introduces a redesigned secure IPC bridge for the AlloyScript runtime, treating the WebView as an inherently hostile environment. Key changes: - Implemented a 32-byte session token mechanism for IPC validation. - Added support for nested global bindings in MicroQuickJS via `JS_BindGlobal`. - Implemented `secureEval` which redirects `window.eval` from the WebView to the safe MicroQuickJS host process. - Added End-to-End (E2E) encryption hooks for all IPC messages. - Separated AlloyScript source files into the `alloyscript/` directory to maintain distinct licensing (CC0 vs MIT). - Enhanced the MicroQuickJS C API with JSON parsing and stringification. - Added `webview_set_session_token` and `webview_set_decrypt_fn` to the WebView C API. All tests passed (24/24), confirming the integrity of the process isolation and capability redirection.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
I have implemented a secure dual-engine architecture for AlloyScript. The main logic now runs in a safe MicroQuickJS environment within the C host process, while the WebView is restricted to providing browser capabilities. All IPC communication is validated using a 32-byte session token and supports E2E encryption hooks.
window.evalis intercepted and redirected to the host'ssecureEvalimplementation. Source files have been organized to comply with license requirements.PR created automatically by Jules for task 7317441071567314179 started by @yumin-chen