[GH-ISSUE #1855] Refactor security follow-up from main CodeQL backlog #900

Closed
opened 2026-10-21 05:23:10 +07:00 by bsakaguchi · 2 comments
Owner

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

Originally assigned to: @SpicyMarinara, @TheLonelyDevil9 on GitHub.

Professor Marinara Says: We are using the current main-branch CodeQL backlog as a friendly refactor hardening checklist. This issue is intentionally public-safe: it names broad risk areas and next actions, but does not include request recipes or exploit details.

Goal

Track refactor-only security follow-up before release. Normal code changes should land on refactor. Any main security hotfix exception needs an owner/admin call.

Refactor Audit Lanes

  • Outbound URL fetching: confirm user-influenced remote asset fetches only allow expected HTTPS hosts, image responses, bounded response sizes, and safe redirects.
  • Game asset paths: confirm managed asset reads, writes, renames, moves, deletes, and absolute path helpers stay inside the game-assets root.
  • Import/export/profile paths: confirm folder tokens, configured import roots, home-directory browsing, zip/profile assets, and legacy asset normalization stay within intended roots.
  • Hostable runtime: confirm auth, CSRF/origin checks, rate limits, and privileged behavior stay equivalent to the protected server surface.

Owner/Admin Follow-Ups

  • Decide whether to enable Dependabot alerts/updates.
  • Decide whether to enable secret scanning and push protection.
  • Add or confirm a SECURITY.md reporting policy.
  • Decide whether any main hotfix exception is needed while refactor release prep continues.

Done When

  • Each audit lane has either a short review note or a small focused PR on refactor.
  • Any safety fix has targeted tests.
  • Admin-only settings have an owner decision recorded.
Originally created by @cha1latte on GitHub (Jun 1, 2026). Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/1855 Originally assigned to: @SpicyMarinara, @TheLonelyDevil9 on GitHub. Professor Marinara Says: We are using the current main-branch CodeQL backlog as a friendly refactor hardening checklist. This issue is intentionally public-safe: it names broad risk areas and next actions, but does not include request recipes or exploit details. ## Goal Track refactor-only security follow-up before release. Normal code changes should land on `refactor`. Any `main` security hotfix exception needs an owner/admin call. ## Refactor Audit Lanes - Outbound URL fetching: confirm user-influenced remote asset fetches only allow expected HTTPS hosts, image responses, bounded response sizes, and safe redirects. - Game asset paths: confirm managed asset reads, writes, renames, moves, deletes, and absolute path helpers stay inside the game-assets root. - Import/export/profile paths: confirm folder tokens, configured import roots, home-directory browsing, zip/profile assets, and legacy asset normalization stay within intended roots. - Hostable runtime: confirm auth, CSRF/origin checks, rate limits, and privileged behavior stay equivalent to the protected server surface. ## Owner/Admin Follow-Ups - Decide whether to enable Dependabot alerts/updates. - Decide whether to enable secret scanning and push protection. - Add or confirm a `SECURITY.md` reporting policy. - Decide whether any `main` hotfix exception is needed while refactor release prep continues. ## Done When - Each audit lane has either a short review note or a small focused PR on `refactor`. - Any safety fix has targeted tests. - Admin-only settings have an owner decision recorded.
Author
Owner

@Xelvanis commented on GitHub (Jun 2, 2026):

Concrete hostable-runtime follow-up found during #1904 target 3 remote runtime parity scan: #1920.

Short version: current refactor /api/invoke has global hostable runtime checks for IP/auth/CSRF, but high-risk remote commands do not yet have the legacy-equivalent Admin Access / ADMIN_SECRET boundary. Static evidence only; no destructive runtime call was made.

This maps to the existing #1855 lane: "Hostable runtime: confirm auth, CSRF/origin checks, rate limits, and privileged behavior stay equivalent to the protected server surface."

<!-- gh-comment-id:4600965628 --> @Xelvanis commented on GitHub (Jun 2, 2026): Concrete hostable-runtime follow-up found during #1904 target 3 remote runtime parity scan: #1920. Short version: current refactor `/api/invoke` has global hostable runtime checks for IP/auth/CSRF, but high-risk remote commands do not yet have the legacy-equivalent Admin Access / `ADMIN_SECRET` boundary. Static evidence only; no destructive runtime call was made. This maps to the existing #1855 lane: "Hostable runtime: confirm auth, CSRF/origin checks, rate limits, and privileged behavior stay equivalent to the protected server surface."
Author
Owner

@SpicyMarinara commented on GitHub (Jun 2, 2026):

Closed after the refactor security pass. a4ba3c90 fixes the concrete hostable-runtime Admin Access gap (#1920), adds a privileged ST bulk import SSE route (#1922), and makes remote-runtime haptics explicitly embedded-only (#1921). Upstream refactor commit 87e1c322 also hardened the bot-browser remote-image lane. Remaining Dependabot, secret scanning, push protection, and SECURITY.md items are repository owner policy decisions rather than code regressions in this tracker.

<!-- gh-comment-id:4601639298 --> @SpicyMarinara commented on GitHub (Jun 2, 2026): Closed after the refactor security pass. a4ba3c90 fixes the concrete hostable-runtime Admin Access gap (#1920), adds a privileged ST bulk import SSE route (#1922), and makes remote-runtime haptics explicitly embedded-only (#1921). Upstream refactor commit 87e1c322 also hardened the bot-browser remote-image lane. Remaining Dependabot, secret scanning, push protection, and SECURITY.md items are repository owner policy decisions rather than code regressions in this tracker.
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#900
No description provided.