[PR #3952] [MERGED] Remove unsafe extension system #6174

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

📋 Pull Request Information

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

Base: staging ← Head: agent/remove-extensions-security


📝 Commits (3)

  • 7b04545 Remove unsafe extension system
  • f276878 Merge branch 'staging' into agent/remove-extensions-security
  • a0986be docs: clarify retired extension cleanup surface

📊 Changes

45 files changed (+407 additions, -2376 deletions)

View changed files

📝 CHANGELOG.md (+2 -1)
📝 README.md (+0 -2)
📝 docs/CONFIGURATION.md (+1 -1)
📝 docs/REMOTE_ACCESS.md (+1 -1)
📝 docs/appearance/chat-backgrounds.md (+1 -1)
📝 docs/appearance/custom-css-themes.md (+6 -9)
📝 docs/appearance/fonts.md (+1 -1)
📝 docs/characters/sprites.md (+1 -1)
📝 docs/data/importing-from-sillytavern.md (+1 -1)
📝 docs/development/architecture-map.md (+2 -2)
📝 docs/development/code-cleanup-audit.md (+1 -1)
📝 docs/development/frontend.md (+5 -5)
📝 docs/development/optional-agent-packages.md (+1 -1)
➖ docs/development/writing-extensions.md (+0 -292)
➖ docs/examples/extensions/minimal/extension.css (+0 -4)
➖ docs/examples/extensions/minimal/extension.js (+0 -7)
➖ docs/examples/extensions/minimal/manifest.json (+0 -12)
➖ docs/extending/extensions.md (+0 -128)
📝 docs/settings/settings-overview.md (+2 -2)
📝 e2e/core-flows.e2e.ts (+104 -107)

...and 25 more files

📄 Description

Why

The retired extension model allowed same-origin browser code and Node-hosted server code without a security boundary strong enough for untrusted third-party payloads. Partial blocking still left unnecessary authoring, storage, and UI surfaces, so this removes the feature instead of attempting to classify individual packages as safe.

No linked issue. This is a maintainer-directed emergency security change from a direct report.

What changed

  • Remove CSS, browser JavaScript, and server JavaScript extension execution.
  • Remove extension import, enable, update, download, export, package parsing, authoring schemas, and per-extension storage APIs.
  • Return 410 Gone for create/update requests.
  • Force-disable every retained legacy record at startup.
  • Return metadata-only cleanup records and keep deletion as the sole supported action.
  • Replace Settings > Addons controls with deletion-only legacy cleanup while preserving Custom Themes.
  • Delete extension guides/examples and remove the feature from Professor Mari's workspace knowledge.
  • Add a dedicated security regression and focused Playwright boundary coverage.

Validation

  • pnpm check passed independently on this branch.
  • pnpm regression:extensions-security passed.
  • Focused Playwright extension tests: 3 passed, 1 intentional shared-loader mobile skip.
  • git diff --check passed.

Manual verification

  • Manually verify Settings > Addons contains no extension import, enable, update, download, or export action.
  • Manually verify an upgraded installation lists old records as disabled and permits deletion only.
  • Manually verify Custom Themes still create, activate, import, and export normally.

Risk

This intentionally removes a formerly supported feature. Legacy database columns remain only until users delete their inert records; their payloads no longer cross the API boundary.

Summary by CodeRabbit

  • New Features
    • Added a Legacy Extension Cleanup section under Settings > Addons, allowing retired records to be removed.
  • Bug Fixes
    • Retired extensions can no longer run or be installed, updated, imported, or exported.
    • Extension creation and update requests now return “410 Gone.”
    • Custom theme styling is limited to installed theme names in Settings > Addons.
    • Tightened script security by blocking blob-based script sources.
  • Documentation
    • Removed extension authoring and usage guides and updated related instructions to reflect retired extension support.

🔄 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/3952 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/22/2026 **Status:** ✅ Merged **Merged:** 7/22/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `agent/remove-extensions-security` --- ### 📝 Commits (3) - [`7b04545`](https://github.com/Pasta-Devs/Marinara-Engine/commit/7b0454565e31bfa274c67d4b4002892da399d755) Remove unsafe extension system - [`f276878`](https://github.com/Pasta-Devs/Marinara-Engine/commit/f27687870bf46d1dfba0d12e6075b942cdba2732) Merge branch 'staging' into agent/remove-extensions-security - [`a0986be`](https://github.com/Pasta-Devs/Marinara-Engine/commit/a0986be9b990668ef200c845abc1182973b848a7) docs: clarify retired extension cleanup surface ### 📊 Changes **45 files changed** (+407 additions, -2376 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+2 -1) 📝 `README.md` (+0 -2) 📝 `docs/CONFIGURATION.md` (+1 -1) 📝 `docs/REMOTE_ACCESS.md` (+1 -1) 📝 `docs/appearance/chat-backgrounds.md` (+1 -1) 📝 `docs/appearance/custom-css-themes.md` (+6 -9) 📝 `docs/appearance/fonts.md` (+1 -1) 📝 `docs/characters/sprites.md` (+1 -1) 📝 `docs/data/importing-from-sillytavern.md` (+1 -1) 📝 `docs/development/architecture-map.md` (+2 -2) 📝 `docs/development/code-cleanup-audit.md` (+1 -1) 📝 `docs/development/frontend.md` (+5 -5) 📝 `docs/development/optional-agent-packages.md` (+1 -1) ➖ `docs/development/writing-extensions.md` (+0 -292) ➖ `docs/examples/extensions/minimal/extension.css` (+0 -4) ➖ `docs/examples/extensions/minimal/extension.js` (+0 -7) ➖ `docs/examples/extensions/minimal/manifest.json` (+0 -12) ➖ `docs/extending/extensions.md` (+0 -128) 📝 `docs/settings/settings-overview.md` (+2 -2) 📝 `e2e/core-flows.e2e.ts` (+104 -107) _...and 25 more files_ </details> ### 📄 Description ## Why The retired extension model allowed same-origin browser code and Node-hosted server code without a security boundary strong enough for untrusted third-party payloads. Partial blocking still left unnecessary authoring, storage, and UI surfaces, so this removes the feature instead of attempting to classify individual packages as safe. No linked issue. This is a maintainer-directed emergency security change from a direct report. ## What changed - Remove CSS, browser JavaScript, and server JavaScript extension execution. - Remove extension import, enable, update, download, export, package parsing, authoring schemas, and per-extension storage APIs. - Return `410 Gone` for create/update requests. - Force-disable every retained legacy record at startup. - Return metadata-only cleanup records and keep deletion as the sole supported action. - Replace Settings > Addons controls with deletion-only legacy cleanup while preserving Custom Themes. - Delete extension guides/examples and remove the feature from Professor Mari's workspace knowledge. - Add a dedicated security regression and focused Playwright boundary coverage. ## Validation - `pnpm check` passed independently on this branch. - `pnpm regression:extensions-security` passed. - Focused Playwright extension tests: 3 passed, 1 intentional shared-loader mobile skip. - `git diff --check` passed. ## Manual verification - [ ] Manually verify Settings > Addons contains no extension import, enable, update, download, or export action. - [ ] Manually verify an upgraded installation lists old records as disabled and permits deletion only. - [ ] Manually verify Custom Themes still create, activate, import, and export normally. ## Risk This intentionally removes a formerly supported feature. Legacy database columns remain only until users delete their inert records; their payloads no longer cross the API boundary. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added a Legacy Extension Cleanup section under Settings > Addons, allowing retired records to be removed. * **Bug Fixes** * Retired extensions can no longer run or be installed, updated, imported, or exported. * Extension creation and update requests now return “410 Gone.” * Custom theme styling is limited to installed theme names in Settings > Addons. * Tightened script security by blocking blob-based script sources. * **Documentation** * Removed extension authoring and usage guides and updated related instructions to reflect retired extension support. <!-- 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:07:48 +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#6174
No description provided.