[GH-ISSUE #2058] [Issue]: remote bulk import scan is not protected by Admin Access #1007

Closed
opened 2026-10-21 05:25:04 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @Promansis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2058

Originally assigned to: @cha1latte on GitHub.

Summary

Remote Runtime exposes import_st_bulk_scan, but the command is not included in the refactor Admin Access privileged-command sets. Legacy guarded both SillyTavern bulk scan and bulk run with privileged access.

Expected behavior

Off-loopback or otherwise privileged Remote Runtime calls to import_st_bulk_scan should require the same Admin Access guard as import_st_bulk_run.

Actual behavior

Static parity tracing for Target 3 found import_st_bulk_scan is remote-callable through the shared allowlist and Rust dispatcher, while only import_st_bulk_run is listed in the client/server privileged remote command sets.

Evidence:

  • Refactor src/shared/api/remote-runtime.ts allowlists import_st_bulk_scan.
  • Refactor src-tauri/src/http_dispatch.rs dispatches import_st_bulk_scan.
  • Refactor src/shared/api/remote-runtime.ts and src-tauri/src/http_server.rs include import_st_bulk_run in privileged sets but omit import_st_bulk_scan.
  • Legacy packages/server/src/routes/import.routes.ts guarded both /st-bulk/scan and /st-bulk/run with privileged access.

Steps to reproduce

  1. Run the hostable Remote Runtime on an address reachable from a non-loopback client.
  2. Call /api/invoke with command import_st_bulk_scan without an Admin Access secret.
  3. Compare with import_st_bulk_run, which is already treated as privileged.

Impact area

  • App shell, navigation, startup, or providers
  • Catalog resources
  • Chat mode
  • Roleplay mode
  • Game mode
  • Shared mode UI
  • Runtime systems: generation, world-state, visuals, tracker, or haptics
  • Professor Mari or shell tools
  • React-free engine behavior, contracts, agents, or capability ports
  • Shared API wrapper or remote runtime routing
  • Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime
  • Docs, contributor workflow, or templates

Environment

  • Branch or commit: refactor, Target 3 rescan on 2026-06-04
  • Run mode: remote runtime
  • OS + version: not captured
  • Node + pnpm versions: not relevant
  • Rust version, if relevant: not captured
  • Remote Runtime URL configured? yes
  • Provider, model, or integration, if relevant: SillyTavern bulk import

Logs, screenshots, or video

No runtime screenshot attached. Static Target 3 parity evidence is recorded in #2050.

Regression notes

Legacy main protected both bulk scan and run. This is a confirmed remote-runtime parity regression from the legacy server contract.

Additional context

Suggested fix: add import_st_bulk_scan to both privileged remote command sets and add an off-loopback denied scan test plus an allowed-with-secret scan test.

Related tracker: #1904 target 3 and #2050.

Template check

Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked:

  • I DID NOT read this template and provide the requested details.
Originally created by @Promansis on GitHub (Jun 3, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2058 Originally assigned to: @cha1latte on GitHub. ## Summary Remote Runtime exposes `import_st_bulk_scan`, but the command is not included in the refactor Admin Access privileged-command sets. Legacy guarded both SillyTavern bulk scan and bulk run with privileged access. ## Expected behavior Off-loopback or otherwise privileged Remote Runtime calls to `import_st_bulk_scan` should require the same Admin Access guard as `import_st_bulk_run`. ## Actual behavior Static parity tracing for Target 3 found `import_st_bulk_scan` is remote-callable through the shared allowlist and Rust dispatcher, while only `import_st_bulk_run` is listed in the client/server privileged remote command sets. Evidence: - Refactor `src/shared/api/remote-runtime.ts` allowlists `import_st_bulk_scan`. - Refactor `src-tauri/src/http_dispatch.rs` dispatches `import_st_bulk_scan`. - Refactor `src/shared/api/remote-runtime.ts` and `src-tauri/src/http_server.rs` include `import_st_bulk_run` in privileged sets but omit `import_st_bulk_scan`. - Legacy `packages/server/src/routes/import.routes.ts` guarded both `/st-bulk/scan` and `/st-bulk/run` with privileged access. ## Steps to reproduce 1. Run the hostable Remote Runtime on an address reachable from a non-loopback client. 2. Call `/api/invoke` with command `import_st_bulk_scan` without an Admin Access secret. 3. Compare with `import_st_bulk_run`, which is already treated as privileged. ## Impact area - [ ] App shell, navigation, startup, or providers - [ ] Catalog resources - [ ] Chat mode - [ ] Roleplay mode - [ ] Game mode - [ ] Shared mode UI - [ ] Runtime systems: generation, world-state, visuals, tracker, or haptics - [ ] Professor Mari or shell tools - [ ] React-free engine behavior, contracts, agents, or capability ports - [x] Shared API wrapper or remote runtime routing - [x] Tauri/Rust storage, assets, LLM, integrations, security, imports, or HTTP runtime - [ ] Docs, contributor workflow, or templates ## Environment - Branch or commit: `refactor`, Target 3 rescan on 2026-06-04 - Run mode: remote runtime - OS + version: not captured - Node + pnpm versions: not relevant - Rust version, if relevant: not captured - Remote Runtime URL configured? yes - Provider, model, or integration, if relevant: SillyTavern bulk import ## Logs, screenshots, or video No runtime screenshot attached. Static Target 3 parity evidence is recorded in #2050. ## Regression notes Legacy `main` protected both bulk scan and run. This is a confirmed remote-runtime parity regression from the legacy server contract. ## Additional context Suggested fix: add `import_st_bulk_scan` to both privileged remote command sets and add an off-loopback denied scan test plus an allowed-with-secret scan test. Related tracker: #1904 target 3 and #2050. ## Template check Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: - [ ] I DID NOT read this template and provide the requested details.
bsakaguchi 2026-10-21 05:25:04 +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#1007
No description provided.