**feat(git-ops): enhance MCP server with Git provider updates and SSRF protection**
- Added `mcp-git-ops` service to `docker-compose.dev.yml` with health checks and configurations. - Integrated SSRF protection in repository URL validation for enhanced security. - Expanded `pyproject.toml` mypy settings and adjusted code to meet stricter type checking. - Improved workspace management and GitWrapper operations with error handling refinements. - Updated input validation, branching, and repository operations to align with new error structure. - Shut down thread pool executor gracefully during server cleanup.
This commit is contained in:
@@ -73,7 +73,7 @@ class GitOpsError(Exception):
|
||||
|
||||
def to_dict(self) -> dict[str, Any]:
|
||||
"""Convert to dictionary for MCP response."""
|
||||
result = {
|
||||
result: dict[str, Any] = {
|
||||
"error": self.message,
|
||||
"code": self.code.value,
|
||||
}
|
||||
@@ -325,9 +325,7 @@ class PRNotFoundError(PRError):
|
||||
class APIError(ProviderError):
|
||||
"""Provider API error."""
|
||||
|
||||
def __init__(
|
||||
self, provider: str, status_code: int, message: str
|
||||
) -> None:
|
||||
def __init__(self, provider: str, status_code: int, message: str) -> None:
|
||||
super().__init__(
|
||||
f"{provider} API error ({status_code}): {message}",
|
||||
ErrorCode.API_ERROR,
|
||||
|
||||
Reference in New Issue
Block a user