Skip to content

fix(plugin): harden Windows path boundaries#55

Open
Mineru98 wants to merge 1 commit into
Q00:release/bootstrapfrom
Mineru98:fix/windows-path-boundaries
Open

fix(plugin): harden Windows path boundaries#55
Mineru98 wants to merge 1 commit into
Q00:release/bootstrapfrom
Mineru98:fix/windows-path-boundaries

Conversation

@Mineru98

@Mineru98 Mineru98 commented Jul 7, 2026

Copy link
Copy Markdown

Problem

Windows path forms can be normalized differently from Unix paths. Without consistent handling, plugin and config paths can look valid while still pointing outside the intended boundary.

Proposed change

  • Normalize Windows-style paths before path boundary checks.
  • Keep plugin entrypoints and config paths inside their expected directories.
  • Update tests to cover portable path behavior across Windows and Unix-style inputs.

Acceptance criteria

  • Windows drive, separator, and traversal cases are handled consistently.
  • Plugin path validation rejects paths that escape the plugin boundary.
  • Existing config and transport tests continue to pass.

Verification

  • git diff --check
  • mix format --check-formatted on changed Elixir files
  • mix test test/ourocode/config/raw_loader_test.exs test/ourocode/plugin/path_policy_test.exs test/ourocode/command/registry/skill_loader_test.exs test/ourocode/mcp/transport/stdio_test.exs test/ourocode/mcp/transport/stdio_cleanup_test.exs test/ourocode/terminal/interview_panel/text_test.exs -> 42 passed

Closes #50

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Normalize Windows paths without weakening plugin path boundaries

1 participant