[PR #4000] [MERGED] Harden Personal Extensions and polish Settings UI #6195

Closed
opened 2026-10-23 04:08:01 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/4000
Author: @SpicyMarinara
Created: 7/23/2026
Status: ✅ Merged
Merged: 7/23/2026
Merged by: @SpicyMarinara

Base: staging ← Head: agent/sandbox-external-extensions


📝 Commits (4)

  • 3aaab50 Harden extensions and Settings UI
  • 67e14d7 Merge branch 'staging' into agent/sandbox-external-extensions
  • 2a153ed Harden extension sandbox boundaries and localize approval dialog
  • 07e7037 docs: add extension platform-support table

📊 Changes

29 files changed (+1900 additions, -702 deletions)

View changed files

📝 .env.example (+4 -0)
📝 CHANGELOG.md (+4 -1)
📝 README.md (+1 -1)
📝 docs/CONFIGURATION.md (+9 -0)
📝 docs/FAQ.md (+8 -0)
📝 docs/TROUBLESHOOTING.md (+15 -0)
📝 docs/development/frontend.md (+2 -2)
📝 docs/development/personal-extensions.md (+39 -28)
📝 docs/extending/personal-extensions.md (+37 -46)
📝 docs/home/professor-mari.md (+1 -1)
📝 docs/settings/settings-overview.md (+1 -1)
📝 e2e/core-flows.e2e.ts (+58 -58)
📝 packages/client/src/components/layout/PersonalExtensionInjector.tsx (+136 -162)
📝 packages/client/src/components/panels/SettingsPanel.tsx (+73 -6)
📝 packages/client/src/components/panels/settings/PersonalExtensionsSettings.tsx (+141 -112)
📝 packages/client/src/components/panels/settings/SettingControls.tsx (+4 -4)
📝 packages/client/src/hooks/use-personal-extensions.ts (+24 -3)
📝 packages/client/src/localization/locales/en.json (+32 -1)
➕ packages/server/src/assets/personal-extension-runner.mjs (+241 -0)
📝 packages/server/src/config/env-watcher.ts (+9 -0)

...and 9 more files

📄 Description

Linked issue

Closes #3999

Why this change

Personal Extensions mixed Professor Mari-authored drafts with third-party imports and previously relied on in-process or same-page execution boundaries that were not suitable for untrusted code. The Settings UI also exposed user authoring/import actions by default, cramped the Custom sound copy beside its controls, and used hard-coded colors instead of the selected accent.

This change makes extension execution default-deny, keeps third-party code hidden until the host and user deliberately opt in, and gives browser and server code narrow sandbox boundaries. It also includes the earlier Settings layout and accent-color fixes requested in the same maintainer review.

What changed

  • Made Personal Extensions Professor Mari-authored and disabled by default; removed New Draft and default import actions, and require approval of the complete current SHA-256 hash.
  • Added a separately gated External Extensions section. It appears only when ENABLE_EXTERNAL_EXTENSIONS=true and the user accepts the warning through the final control at the bottom of Advanced > Danger Zone.
  • Kept external, legacy, profile-imported, manually stored, and unknown-source records hidden and unexecutable until both gates are open; closing either gate disables and stops them.
  • Moved browser extensions into watchdog-supervised Workers inside opaque-origin sandboxed iframes with no Marinara DOM, origin-storage, or network access.
  • Moved server extensions into separate Node processes under mandatory macOS Seatbelt or Linux Bubblewrap isolation, with minimal environment, exact protocol-file access, resource bounds, and fail-closed unsupported platforms.
  • Fixed the Custom sound card so text uses the available width and actions no longer overlap it on narrow screens.
  • Made installed-theme icons and the third-party warning follow the selected accent, and kept supported External Extension formats permanently expanded.
  • Updated canonical English localization, regressions, README, user/developer docs, configuration, troubleshooting, FAQ, and changelog.

Validation

  • pnpm check passes locally
  • Container (Docker / Podman) built and ran without issue
  • Ran the app, clicked through the changes manually
  • Checked edge cases (light + dark mode, mobile viewport, empty states, error paths)
  • Above manual verification completed (describe below)
  • Read and followed CONTRIBUTING.md

Additional automated validation performed:

  • pnpm regression:extensions-security
  • pnpm version:check
  • Targeted Playwright desktop/mobile coverage for legacy-record cleanup, hidden imports, Professor Mari-only defaults, Danger Zone ordering, disabled host gate, and accent-color warning
  • git diff --check

Manual verification notes

No human manual verification is claimed. The relevant desktop/mobile paths were exercised through Playwright, including the empty state and computed accent color. The full smoke suite previously encountered an unrelated Custom Mouse Pointer reload assertion; the scoped extension and Settings tests pass.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Version/release files updated (only if this PR includes a version bump)

Documentation and changelog updates are included. This PR does not bump the application version.

UI evidence (if applicable)

The original maintainer report included the narrow Custom sound layout screenshot. No new screenshot artifact is attached; reviewers should manually verify dark/light themes and the final Danger Zone placement before marking the PR ready.

Summary by CodeRabbit

  • New Features
    • Personal Extensions now require exact SHA-256 approval and sandboxed-code confirmation before running.
    • Added optional External Extensions with host and Danger Zone opt-ins.
    • Browser extensions run in isolated sandboxes; server extensions require supported OS sandboxing.
  • Bug Fixes
    • Improved custom sound layout on narrow screens.
    • Theme icons and extension warnings now respect the selected accent color.
  • Documentation
    • Updated setup, security, troubleshooting, FAQ, and extension guides with the revised behavior and safeguards.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Pasta-Devs/Marinara-Engine/pull/4000 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/23/2026 **Status:** ✅ Merged **Merged:** 7/23/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/sandbox-external-extensions` --- ### 📝 Commits (4) - [`3aaab50`](https://github.com/Pasta-Devs/Marinara-Engine/commit/3aaab50b976954b502767ba6dc45fa379630a07a) Harden extensions and Settings UI - [`67e14d7`](https://github.com/Pasta-Devs/Marinara-Engine/commit/67e14d777e428fcb199276665ab0c97da066694c) Merge branch 'staging' into agent/sandbox-external-extensions - [`2a153ed`](https://github.com/Pasta-Devs/Marinara-Engine/commit/2a153ed4e4969c7d478400b39fd60a2908dc76d5) Harden extension sandbox boundaries and localize approval dialog - [`07e7037`](https://github.com/Pasta-Devs/Marinara-Engine/commit/07e70373d6c2672a6ec70efa7fe41c8fc9979a52) docs: add extension platform-support table ### 📊 Changes **29 files changed** (+1900 additions, -702 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+4 -0) 📝 `CHANGELOG.md` (+4 -1) 📝 `README.md` (+1 -1) 📝 `docs/CONFIGURATION.md` (+9 -0) 📝 `docs/FAQ.md` (+8 -0) 📝 `docs/TROUBLESHOOTING.md` (+15 -0) 📝 `docs/development/frontend.md` (+2 -2) 📝 `docs/development/personal-extensions.md` (+39 -28) 📝 `docs/extending/personal-extensions.md` (+37 -46) 📝 `docs/home/professor-mari.md` (+1 -1) 📝 `docs/settings/settings-overview.md` (+1 -1) 📝 `e2e/core-flows.e2e.ts` (+58 -58) 📝 `packages/client/src/components/layout/PersonalExtensionInjector.tsx` (+136 -162) 📝 `packages/client/src/components/panels/SettingsPanel.tsx` (+73 -6) 📝 `packages/client/src/components/panels/settings/PersonalExtensionsSettings.tsx` (+141 -112) 📝 `packages/client/src/components/panels/settings/SettingControls.tsx` (+4 -4) 📝 `packages/client/src/hooks/use-personal-extensions.ts` (+24 -3) 📝 `packages/client/src/localization/locales/en.json` (+32 -1) ➕ `packages/server/src/assets/personal-extension-runner.mjs` (+241 -0) 📝 `packages/server/src/config/env-watcher.ts` (+9 -0) _...and 9 more files_ </details> ### 📄 Description ## Linked issue Closes #3999 ## Why this change Personal Extensions mixed Professor Mari-authored drafts with third-party imports and previously relied on in-process or same-page execution boundaries that were not suitable for untrusted code. The Settings UI also exposed user authoring/import actions by default, cramped the Custom sound copy beside its controls, and used hard-coded colors instead of the selected accent. This change makes extension execution default-deny, keeps third-party code hidden until the host and user deliberately opt in, and gives browser and server code narrow sandbox boundaries. It also includes the earlier Settings layout and accent-color fixes requested in the same maintainer review. ## What changed - Made Personal Extensions Professor Mari-authored and disabled by default; removed New Draft and default import actions, and require approval of the complete current SHA-256 hash. - Added a separately gated External Extensions section. It appears only when `ENABLE_EXTERNAL_EXTENSIONS=true` and the user accepts the warning through the final control at the bottom of Advanced > Danger Zone. - Kept external, legacy, profile-imported, manually stored, and unknown-source records hidden and unexecutable until both gates are open; closing either gate disables and stops them. - Moved browser extensions into watchdog-supervised Workers inside opaque-origin sandboxed iframes with no Marinara DOM, origin-storage, or network access. - Moved server extensions into separate Node processes under mandatory macOS Seatbelt or Linux Bubblewrap isolation, with minimal environment, exact protocol-file access, resource bounds, and fail-closed unsupported platforms. - Fixed the Custom sound card so text uses the available width and actions no longer overlap it on narrow screens. - Made installed-theme icons and the third-party warning follow the selected accent, and kept supported External Extension formats permanently expanded. - Updated canonical English localization, regressions, README, user/developer docs, configuration, troubleshooting, FAQ, and changelog. ## Validation - [ ] `pnpm check` passes locally - [ ] Container (Docker / Podman) built and ran without issue - [ ] Ran the app, clicked through the changes manually - [ ] Checked edge cases (light + dark mode, mobile viewport, empty states, error paths) - [ ] Above manual verification completed (describe below) - [ ] Read and followed `CONTRIBUTING.md` Additional automated validation performed: - `pnpm regression:extensions-security` - `pnpm version:check` - Targeted Playwright desktop/mobile coverage for legacy-record cleanup, hidden imports, Professor Mari-only defaults, Danger Zone ordering, disabled host gate, and accent-color warning - `git diff --check` ### Manual verification notes No human manual verification is claimed. The relevant desktop/mobile paths were exercised through Playwright, including the empty state and computed accent color. The full smoke suite previously encountered an unrelated Custom Mouse Pointer reload assertion; the scoped extension and Settings tests pass. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Version/release files updated (only if this PR includes a version bump) Documentation and changelog updates are included. This PR does not bump the application version. ## UI evidence (if applicable) The original maintainer report included the narrow Custom sound layout screenshot. No new screenshot artifact is attached; reviewers should manually verify dark/light themes and the final Danger Zone placement before marking the PR ready. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Personal Extensions now require exact SHA-256 approval and sandboxed-code confirmation before running. * Added optional External Extensions with host and Danger Zone opt-ins. * Browser extensions run in isolated sandboxes; server extensions require supported OS sandboxing. * **Bug Fixes** * Improved custom sound layout on narrow screens. * Theme icons and extension warnings now respect the selected accent color. * **Documentation** * Updated setup, security, troubleshooting, FAQ, and extension guides with the revised behavior and safeguards. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:08:01 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Pasta-Devs/Marinara-Engine#6195
No description provided.