mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2039] [Issue]: Remote backup listing exposes local backup paths without Admin Access #999
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#999
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Xelvanis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2039
Originally assigned to: @cha1latte on GitHub.
Summary
Remote Runtime exposes
backup_listthrough/api/invoke, but it is not in the privileged remote command set. The command returns each managed backup's local filesystempath, so a non-loopback remote client that passes the general runtime auth layer can enumerate server backup paths without Admin Access.Expected behavior
Backup listing should match legacy exposure and remote privilege expectations:
backup_listshould either require the same Admin Access gate as backup create/delete/download, or return only non-sensitive metadata.backup_listas a negative control.Actual behavior
src/shared/api/remote-runtime.tsincludesbackup_listinREMOTE_COMMANDS.backup_listis missing fromPRIVILEGED_REMOTE_COMMANDSand fromsrc-tauri/src/http_server.rs::is_privileged_remote_command.src-tauri/src/commands/storage/backup.rs::backup_entryreturns{ name, createdAt, path }.packages/server/src/routes/backup.routes.tslisted backups as{ name, createdAt }and did not return the server path.Steps to reproduce
POST /api/invokewith{ "command": "backup_list", "args": {} }using normal runtime access but withoutX-Admin-Secret.pathvalues.Impact area
Environment
origin/refactorat86c9b8c9Logs, screenshots, or video
Focused proof from the storage parity scan:
cargo test --manifest-path src-tauri/Cargo.toml backup::tests -- --nocapture-> 2 passed.cargo test --manifest-path src-tauri/Cargo.toml http_dispatch::tests::remote_runtime_command_surfaces_match_desktop_minus_documented_non_remote_commands -- --nocapture-> 1 passed, confirming the current allowlist shape includesbackup_list.cargo test --manifest-path src-tauri/Cargo.toml http_server::tests::hostable_security_ -- --nocapture-> 10 passed for the general remote auth/CSRF layer, but there is no focused negative test forbackup_listrequiring Admin Access.Static comparison:
backup_entryincludespathin list responses.nameandcreatedAt.Regression notes
Legacy backup listing did not expose the server-local backup path. The refactor adds
pathto the list payload and exposes the command remotely without the Admin Access privilege tier.Additional context
Suggested fix:
backup_listto both privileged command sets, or removepathfrom the public/list response and keep local filesystem paths only for embedded/internal flows.backup_listbeside the existing privileged-command guard tests.Related tracker: #2028 Target 2 storage parity, cross-target handoff scan.
Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: