Skip to content

Comments

add SSRF protection and security documentation for MCP client#323

Merged
bug-ops merged 2 commits intomainfrom
feat/m14/mcp-security
Feb 15, 2026
Merged

add SSRF protection and security documentation for MCP client#323
bug-ops merged 2 commits intomainfrom
feat/m14/mcp-security

Conversation

@bug-ops
Copy link
Owner

@bug-ops bug-ops commented Feb 15, 2026

Summary

  • Add SSRF validation in McpClient::connect_url blocking private/reserved IP ranges (loopback, RFC 1918, link-local) with DNS resolution check
  • Add SsrfBlocked and InvalidUrl error variants to McpError
  • Add docs/src/security/mcp.md covering safe MCP server configuration, SSRF risks, command allowlists, and secrets management
  • Add 9 unit tests for SSRF IP blocking

Closes #309

Test plan

  • All 60 zeph-mcp tests pass including 9 new SSRF tests
  • Clippy clean with -D warnings
  • CI gate passes

@github-actions github-actions bot added documentation Improvements or additions to documentation rust dependencies size/L labels Feb 15, 2026
@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 88.75000% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
crates/zeph-mcp/src/client.rs 88.15% 9 Missing ⚠️

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #323      +/-   ##
==========================================
+ Coverage   79.96%   80.01%   +0.05%     
==========================================
  Files          98       98              
  Lines       23964    24005      +41     
==========================================
+ Hits        19163    19208      +45     
+ Misses       4801     4797       -4     
Files with missing lines Coverage Δ
crates/zeph-mcp/src/error.rs 100.00% <ø> (ø)
crates/zeph-mcp/src/manager.rs 84.47% <100.00%> (+0.16%) ⬆️
crates/zeph-mcp/src/client.rs 47.56% <88.15%> (+21.87%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@bug-ops bug-ops merged commit a4a882c into main Feb 15, 2026
20 checks passed
@bug-ops bug-ops deleted the feat/m14/mcp-security branch February 15, 2026 12:55
@bug-ops bug-ops mentioned this pull request Feb 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies documentation Improvements or additions to documentation rust size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add MCP client command validation and security documentation

2 participants