go/pkg/io/local
Snider 418e9dfef3
feat(io): Migrate pkg/mcp to use Medium abstraction (#289)
* feat(io): Migrate pkg/mcp to use Medium abstraction

- Replaced custom path validation in `pkg/mcp` with `local.Medium` sandboxing.
- Updated `mcp.Service` to use `io.Medium` for all file operations.
- Enhanced `local.Medium` security by implementing robust symlink escape detection in `validatePath`.
- Simplified `fileExists` handler to use `IsFile` and `IsDir` methods.
- Removed redundant Issue 103 comments.
- Updated tests to verify symlink blocking.

This change ensures consistent path security across the codebase and simplifies the MCP server implementation.

* feat(io): Migrate pkg/mcp to use Medium abstraction and enhance security

- Replaced custom path validation in `pkg/mcp` with `local.Medium` sandboxing.
- Updated `mcp.Service` to use `io.Medium` interface for all file operations.
- Enhanced `local.Medium` security by implementing robust symlink escape detection in `validatePath`.
- Simplified `fileExists` handler to use `IsFile` and `IsDir` methods.
- Removed redundant Issue 103 comments.
- Updated tests to verify symlink blocking and type compatibility.

This change ensures consistent path security across the codebase and simplifies the MCP server implementation.

* feat(io): Migrate pkg/mcp to use Medium abstraction and enhance security

- Replaced custom path validation in `pkg/mcp` with `local.Medium` sandboxing.
- Updated `mcp.Service` to use `io.Medium` interface for all file operations.
- Enhanced `local.Medium` security by implementing robust symlink escape detection in `validatePath`.
- Simplified `fileExists` handler to use `IsFile` and `IsDir` methods.
- Removed redundant Issue 103 comments.
- Updated tests to verify symlink blocking and type compatibility.

Confirmed that CI failure `org-gate` is administrative and requires manual label. Local tests pass.

* feat(io): Migrate pkg/mcp to use Medium abstraction and enhance security

- Replaced custom path validation in `pkg/mcp` with `local.Medium` sandboxing.
- Updated `mcp.Service` to use `io.Medium` interface for all file operations.
- Enhanced `local.Medium` security by implementing robust symlink escape detection in `validatePath`.
- Optimized `fileExists` handler to use a single `Stat` call for improved efficiency.
- Cleaned up outdated comments and removed legacy validation logic.
- Updated tests to verify symlink blocking and correct sandboxing of absolute paths.

This change ensures consistent path security across the codebase and simplifies the MCP server implementation.
2026-02-04 15:02:47 +00:00
..
client.go feat(io): Migrate pkg/mcp to use Medium abstraction (#289) 2026-02-04 15:02:47 +00:00
client_test.go feat(io): Migrate pkg/mcp to use Medium abstraction (#289) 2026-02-04 15:02:47 +00:00