[PR #4293] [MERGED] Require consent for imported webhook tools #6323

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

📋 Pull Request Information

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

Base: staging ← Head: security/consent-imported-webhooks


📝 Commits (1)

  • 79fa562 security: require consent for imported webhooks

📊 Changes

7 files changed (+443 additions, -67 deletions)

View changed files

📝 CHANGELOG.md (+4 -0)
📝 docs/extending/custom-tools.md (+2 -0)
📝 package.json (+2 -1)
📝 packages/client/src/components/panels/PresetsPanel.tsx (+234 -53)
📝 packages/client/src/lib/custom-tool-transfer.ts (+71 -13)
📝 packages/client/src/localization/locales/en.json (+19 -0)
➕ scripts/regressions/custom-tool-import-security.regression.ts (+111 -0)

📄 Description

Linked issue

Closes #4287

Why this change

An import file is data, not authorization. Restoring an enabled webhook or hidden-context sharing from that file can initiate external requests or disclose private prompt context without a fresh, local consent decision.

What changed

  • Force imported webhook tools to start disabled with includeHiddenContext=false.
  • Preserve existing static and script tool import behavior.
  • Add an import-review summary that shows the normalized webhook origin and separately discloses requested enabled/hidden-context states.
  • Avoid displaying URL credentials, paths, or query strings in the review.
  • Add semantic English localization keys and focused transfer regressions.
  • Update custom-tool documentation and the changelog.
  • Track translated documentation separately in #4289.

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

Automated proof completed before publication:

  • pnpm regression:custom-tool-import-security
  • pnpm localization:check
  • pnpm check
  • pnpm version:check
  • git diff --check staging...security/consent-imported-webhooks

pnpm smoke:ui was attempted but stopped after unrelated accent-color assertions failed in the message-deletion, connection-discard, and favorite-star scenarios. No webhook-import failure was reported before that interruption.

Manual verification notes

  • Manually import enabled and disabled webhook exports and confirm every imported webhook starts disabled.
  • Manually verify hidden-context sharing starts off and requires a separate opt-in.
  • Manually verify the review summary in light/dark themes and narrow/mobile layouts.
  • Manually verify credential-bearing URLs reveal only their normalized origin.
  • No browser screenshot or full manual walkthrough was completed in this agent run.

Docs and release impact

  • No docs changes needed
  • Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed
  • Translated docs on the docs-i18n branch updated to match, or a [docs-i18n] follow-up issue opened (see CONTRIBUTING.md § Translated documentation)
  • Version/release files updated (only if this PR includes a version bump)

English documentation and CHANGELOG.md are updated. Translation follow-up: #4289.

UI evidence (if applicable)

Manual visual evidence remains to be captured during maintainer verification.


🔄 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/4293 **Author:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Created:** 7/30/2026 **Status:** ✅ Merged **Merged:** 7/30/2026 **Merged by:** [@SpicyMarinara](https://github.com/SpicyMarinara) **Base:** `staging` ← **Head:** `security/consent-imported-webhooks` --- ### 📝 Commits (1) - [`79fa562`](https://github.com/Pasta-Devs/Marinara-Engine/commit/79fa562896aaad745c3e20d21737ac55811eca87) security: require consent for imported webhooks ### 📊 Changes **7 files changed** (+443 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+4 -0) 📝 `docs/extending/custom-tools.md` (+2 -0) 📝 `package.json` (+2 -1) 📝 `packages/client/src/components/panels/PresetsPanel.tsx` (+234 -53) 📝 `packages/client/src/lib/custom-tool-transfer.ts` (+71 -13) 📝 `packages/client/src/localization/locales/en.json` (+19 -0) ➕ `scripts/regressions/custom-tool-import-security.regression.ts` (+111 -0) </details> ### 📄 Description ## Linked issue Closes #4287 ## Why this change An import file is data, not authorization. Restoring an enabled webhook or hidden-context sharing from that file can initiate external requests or disclose private prompt context without a fresh, local consent decision. ## What changed - Force imported webhook tools to start disabled with `includeHiddenContext=false`. - Preserve existing static and script tool import behavior. - Add an import-review summary that shows the normalized webhook origin and separately discloses requested enabled/hidden-context states. - Avoid displaying URL credentials, paths, or query strings in the review. - Add semantic English localization keys and focused transfer regressions. - Update custom-tool documentation and the changelog. - Track translated documentation separately in #4289. ## 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` Automated proof completed before publication: - `pnpm regression:custom-tool-import-security` - `pnpm localization:check` - `pnpm check` - `pnpm version:check` - `git diff --check staging...security/consent-imported-webhooks` `pnpm smoke:ui` was attempted but stopped after unrelated accent-color assertions failed in the message-deletion, connection-discard, and favorite-star scenarios. No webhook-import failure was reported before that interruption. ### Manual verification notes - Manually import enabled and disabled webhook exports and confirm every imported webhook starts disabled. - Manually verify hidden-context sharing starts off and requires a separate opt-in. - Manually verify the review summary in light/dark themes and narrow/mobile layouts. - Manually verify credential-bearing URLs reveal only their normalized origin. - No browser screenshot or full manual walkthrough was completed in this agent run. ## Docs and release impact - [ ] No docs changes needed - [ ] Updated docs (README / CONTRIBUTING / android/README / CHANGELOG) as needed - [ ] Translated docs on the `docs-i18n` branch updated to match, or a `[docs-i18n]` follow-up issue opened (see CONTRIBUTING.md § Translated documentation) - [ ] Version/release files updated (only if this PR includes a version bump) English documentation and `CHANGELOG.md` are updated. Translation follow-up: #4289. ## UI evidence (if applicable) Manual visual evidence remains to be captured during maintainer verification. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-23 04:09:20 +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#6323
No description provided.