You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
safeFile named the resolved/attempted path in security-sensitive error messages #610
main at 645239b..c17deec (#607); found while merging #602 onto main and running its MCP test suite.
Minimal reproduction
packages/core/src/config.ts's safeFile (used by functionFile for every function/middleware source reference) names the referenced path in its three error messages (Referenced project file is missing: "…", File reference escapes project: "…", Reference must point to a file: "…"), added as part of #607's authoring-error improvements. A pre-existing test, test/mcp.test.ts ('MCP fails closed on project source traversal without revealing source details'), asserts the opposite: a route declaring function: {source: '../private-credential.mjs'} must fail validation without the attempted path appearing in the MCP response text. Before #607, the message was bare (no path). After #607, the resolved/attempted path is included, so MCP's validate (whose text-only response includes it verbatim, since #582/#602 made MCP surface the CLI's real error) can be turned into a limited oracle for what exists outside the project directory.
Relevant output
node --conditions=development --test test/mcp.test.ts failed this test after merging #602 (which surfaces real errors over MCP, #582) onto post-#607 main; it passed on main and on #602's own pre-merge branch independently, only failing in combination — because #602 is what makes MCP's response include the raw message text at all.
Suggested fix
Fixed while merging #602 (#602): safeFile now only names the reference when it doesn't contain a .. path segment (an escape attempt); a plain in-project typo like functions/missing.mjs is still named (matches #607's own test/authoring-errors.test.ts expectation), but nothing shaped like a traversal attempt is. The structured file detail field is unchanged (CLI-only, never reaches an MCP text response). Flagging as a separate issue since the underlying message change shipped in #607, independent of #602's merge; the fix will land on main via #602.
Activity
fix: reconcile #607's richer errors with #582's MCP path-disclosure g…
jimhoyd commentedon Sep 24, 2026
Fixed in #602 (#602), already on main:
safeFileonly names the reference when it doesn't contain a..segment. Verified present onorigin/main.Asset reference diagnostics, local agent bootstrap, SPA and headless-…