mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[PR #3967] [MERGED] Block DNS rebinding and require Agent update consent #6177
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#6177
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?
📋 Pull Request Information
Original PR: https://github.com/Pasta-Devs/Marinara-Engine/pull/3967
Author: @SpicyMarinara
Created: 7/23/2026
Status: ✅ Merged
Merged: 7/23/2026
Merged by: @SpicyMarinara
Base:
staging← Head:security/dns-rebinding-agent-update-consent📝 Commits (2)
5844af0Harden request hosts and require Agent update consent6072097Apply CodeRabbit review fixes for host and consent hardening📊 Changes
25 files changed (+827 additions, -82 deletions)
View changed files
📝
.env.example(+4 -0)📝
CHANGELOG.md(+6 -0)📝
README.md(+1 -1)📝
docs/CONFIGURATION.md(+5 -2)📝
docs/FAQ.md(+1 -1)📝
docs/REMOTE_ACCESS.md(+8 -0)📝
docs/TROUBLESHOOTING.md(+3 -2)📝
e2e/core-flows.e2e.ts(+133 -0)📝
package.json(+2 -1)📝
packages/client/src/App.tsx(+16 -1)📝
packages/client/src/components/agents/AgentCatalogView.tsx(+3 -2)➕
packages/client/src/components/agents/AgentUpdatePrompter.tsx(+61 -0)📝
packages/client/src/components/modals/WhatsNewModal.tsx(+21 -7)📝
packages/client/src/hooks/use-capability-packages.ts(+30 -1)📝
packages/server/src/app.ts(+8 -29)📝
packages/server/src/config/cors-config.ts(+2 -1)📝
packages/server/src/config/runtime-config.ts(+4 -0)➕
packages/server/src/middleware/host-validation.ts(+148 -0)📝
packages/server/src/middleware/privileged-gate.ts(+9 -0)📝
packages/server/src/routes/capability-packages.routes.ts(+43 -13)...and 5 more files
📄 Description
Linked issue
None. This is maintainer-requested security hardening; a public issue was intentionally not opened before the fixes were ready for review.
Why this change
Two trust boundaries needed correction:
The hardcoded
X-Marinara-CSRF: 1value is deliberately retained as a public presence marker. A randomized browser-bundled value would not be a secret and would not stop DNS rebinding.What changed
.local,.home.arpa, and single-label local hostnames.TRUSTED_HOSTSsupport for intentional public and reverse-proxy hostnames, while accepting existing trusted Origin configuration for compatibility.Security and compatibility impact
TRUSTED_HOSTSchanges.TRUSTED_HOSTS=chat.example.com; existing matchingCSRF_TRUSTED_ORIGINSandCORS_ORIGINSentries remain compatible.Automated validation evidence
pnpm checkpnpm version:checkpnpm regression:request-securitygit diff --checkThe broad UI smoke run completed 81 tests with 52 intentional viewport skips and one unrelated Tracker reload flake. That Tracker test and the new Agent consent test both passed on an isolated rerun. The existing unrelated
HomeProfessorMariChat.tsxlint warning remains unchanged.Human test plan
TRUSTED_HOSTS./api/chatsand/api/backup/export-profileand confirm HTTP 421.Summary by CodeRabbit
TRUSTED_HOSTSsupport for public and reverse-proxy hostnames.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.