Fix McpApiController namespace and security issues#47
Conversation
…ntroller - Corrected namespace from Mod\Api\Controllers to Core\Mcp\Controllers - Added workspace quota enforcement via McpQuotaService - Implemented rate limiting using RateLimiter facade (60 calls/min) - Hardened artisan command execution in proc_open to prevent injection - Added strict regex validation for server and tool input parameters - Improved input sanitization and added necessary imports (RateLimiter, Str)
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
QA Pipeline Results
Artifacts
Generated by core php qa pipeline |
…Controller - Corrected namespace from Mod\Api\Controllers to Core\Mcp\Controllers in McpApiController - Corrected namespaces in AgentToolRegistry and AgentSessionService to Core\Mcp\Services - Fixed numerous internal references from Mod\Mcp to Core\Mcp across the package - Implemented workspace quota enforcement via McpQuotaService in McpApiController - Implemented rate limiting using RateLimiter facade (60 calls/min) - Hardened artisan command execution in proc_open to prevent injection - Added strict regex validation for server and tool input parameters - Improved input sanitization and added necessary imports (RateLimiter, Str)
…Controller - Corrected namespace from Mod\Api\Controllers to Core\Mcp\Controllers in McpApiController - Standardized namespaces across the package to Core\Mcp and Core\Website\Mcp - Fixed inconsistent internal references from Mod\Mcp to Core\Mcp - Updated external references (Agentic, Uptelligence, Api, Tenant) to use Core\ prefix - Implemented workspace quota enforcement via McpQuotaService in McpApiController - Implemented rate limiting using RateLimiter facade (60 calls/min) - Hardened artisan command execution in proc_open to prevent injection - Added strict regex validation for server and tool input parameters - Improved input sanitization and added necessary imports (RateLimiter, Str) - Resolved Mockery use statement warning in tests
…Controller - Corrected namespace from Mod\Api\Controllers to Core\Mcp\Controllers in McpApiController - Standardized namespaces across the package to Core\Mcp and Core\Website\Mcp - Fixed inconsistent internal and external references from Mod\ to Core\Mod\ or Core\ - Implemented workspace quota enforcement via McpQuotaService in McpApiController - Implemented rate limiting using RateLimiter facade (60 calls/min) for tool calls - Hardened artisan command execution in proc_open to prevent injection - Added strict regex validation for server and tool input parameters - Improved input sanitization and added necessary imports (RateLimiter, Str) - Cleaned up redundant Mockery use statement in tests - Verified syntax across all modified files
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
This submission fixes a critical namespace mismatch in the McpApiController and addresses several security vulnerabilities:
Mod\Api\ControllerstoCore\Mcp\Controllersto align with the package's PSR-4 structure.McpQuotaServiceto check workspace quotas before tool execution.proc_opento use an array of arguments, preventing shell command injection.serverandtoolparameters to ensure they follow expected formats.RateLimiterandStrimports and verified syntax withphp -l.Fixes #11
PR created automatically by Jules for task 17974347744158043436 started by @Snider