mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #2065] [Issue]: Admin Access loopback hardening flag is missing in refactor remote runtime #1012
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#1012
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 @Promansis on GitHub (Jun 3, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/2065
Originally assigned to: @cha1latte on GitHub.
Summary
Refactor Remote Runtime always exempts loopback clients from per-command Admin Access checks, but legacy
mainhadMARINARA_REQUIRE_ADMIN_SECRET_ON_LOOPBACKto let operators requireADMIN_SECRETeven for loopback privileged APIs.Expected behavior
If the legacy hardening knob is still part of the remote-runtime security contract, refactor should preserve an equivalent setting for privileged loopback calls, or document the unconditional loopback exemption as an intentional divergence.
Actual behavior
Static parity tracing found the refactor Admin Access guard returns success for loopback before checking
ADMIN_SECRET. No refactor equivalent ofMARINARA_REQUIRE_ADMIN_SECRET_ON_LOOPBACKwas found during this slice.Evidence:
src-tauri/src/http_server.rsskips Admin Access for privileged commands whenis_loopback(ip)is true.src-tauri/src/http_server.rschecksADMIN_SECRETonly after the loopback exemption.packages/server/src/middleware/privileged-gate.tsskipped Admin Access on loopback only whenisAdminSecretRequiredOnLoopback()was false.packages/server/src/config/runtime-config.tsexposedMARINARA_REQUIRE_ADMIN_SECRET_ON_LOOPBACK.Steps to reproduce
ADMIN_SECRETon the runtime.backup_create,backup_delete,profile_import,admin_clear_all_command, orimport_st_bulk_runfrom loopback withoutX-Admin-Secret.mainwhenMARINARA_REQUIRE_ADMIN_SECRET_ON_LOOPBACK=true, where loopback privileged APIs still required the Admin Access secret.Impact area
Environment
refactor, Target 3 security parity scan on 2026-06-04Logs, screenshots, or video
No destructive runtime call was made. Static evidence only:
src-tauri/src/http_server.rs:require_admin_access_for_commandreturns early for loopback.packages/server/src/middleware/privileged-gate.ts: loopback bypass depends onisAdminSecretRequiredOnLoopback().packages/server/src/config/runtime-config.ts:MARINARA_REQUIRE_ADMIN_SECRET_ON_LOOPBACK.Regression notes
Legacy
mainsupported an explicit loopback-hardening mode for privileged APIs. Refactor preserves Admin Access for non-loopback privileged commands but appears to drop that opt-in loopback requirement.Related tracker: #2050.
Additional context
This is lower priority than missing Admin Access on remote
import_st_bulk_scan, because loopback is normally trusted. It still matters for users who run browser shells, local reverse proxies, containers, or shared workstations and deliberately enabled the legacy hardening flag.Suggested fix: add a refactor env flag equivalent to
MARINARA_REQUIRE_ADMIN_SECRET_ON_LOOPBACKand cover one privileged loopback command with both bypass-default and require-secret-enabled tests.Template check
Please uncheck the box below before submitting so we know you read the template. It is intentionally pre-checked: