Join our community: https://t.me/+DOylgFv1jyJlNzM0
Why this matters
sandboxMiddleware only skips sandbox detection when config.enabled is false, but there is no test asserting that a malicious client cannot flip req.sandbox to true by sending X-Sandbox-Mode when SANDBOX_MODE_ENABLED is unset.
Acceptance criteria
Files to touch
backend/src/middleware/sandbox.middleware.ts
backend/src/config/sandbox.ts
Out of scope
Does not change the middleware's behavior, test-only unless a gap is found.
Why this matters
sandboxMiddleware only skips sandbox detection when config.enabled is false, but there is no test asserting that a malicious client cannot flip req.sandbox to true by sending X-Sandbox-Mode when SANDBOX_MODE_ENABLED is unset.
Acceptance criteria
Files to touch
backend/src/middleware/sandbox.middleware.tsbackend/src/config/sandbox.tsOut of scope
Does not change the middleware's behavior, test-only unless a gap is found.