Skip to content

Dual-Engine IPC Security and Secure Eval Implementation#12

Draft
yumin-chen wants to merge 1 commit into
AlloyScript/initfrom
feat/dual-engine-ipc-security-7317441071567314179
Draft

Dual-Engine IPC Security and Secure Eval Implementation#12
yumin-chen wants to merge 1 commit into
AlloyScript/initfrom
feat/dual-engine-ipc-security-7317441071567314179

Conversation

@yumin-chen

Copy link
Copy Markdown
Owner

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.eval is intercepted and redirected to the host's secureEval implementation. Source files have been organized to comply with license requirements.


PR created automatically by Jules for task 7317441071567314179 started by @yumin-chen

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.
@google-labs-jules

Copy link
Copy Markdown

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant