You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support --allowed-rules filtering with MCP server (#358)
* Initial plan
* Implement --allowed-rules filtering support for MCP server
- Apply global allowedRules setting to MCP server default config
- Add allowed_rules parameter to all MCP tool definitions
- Update all handler functions to parse and apply allowed_rules parameter
- Ensure consistent behavior between CLI and MCP server for rule filtering
Co-authored-by: fproulx-boostsecurity <[email protected]>
* Add comprehensive tests for --allowed-rules filtering in MCP server
- Add test cases for analyze_manifest with allowed_rules parameter
- Verify filtering works correctly with single rule, multiple rules, and non-existent rules
- Confirm both global flag and per-request parameter functionality
- All tests pass demonstrating successful implementation
Co-authored-by: fproulx-boostsecurity <[email protected]>
* Fix linting issues: gofmt formatting and testifylint violations
- Remove trailing whitespace in cmd/handle_analyze_manifest_test.go and cmd/mcp_server.go
- Replace assert.Len(t, ..., 0, ...) with assert.Empty(t, ...) for testifylint compliance
- All tests still pass and functionality remains intact
Co-authored-by: fproulx-boostsecurity <[email protected]>
* Fix global --allowed-rules flag not being honored by MCP server handlers
- Modify startMCPServer to create mcpDefaultConfig with global allowedRules applied
- Update all handler functions to accept and use the mcpDefaultConfig instead of global config
- Add comprehensive test to verify global allowed rules are properly inherited
- Handlers now properly inherit global --allowed-rules setting when no per-request rules specified
- CLI and MCP server behavior now consistent for global rule filtering
Co-authored-by: fproulx-boostsecurity <[email protected]>
---------
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: fproulx-boostsecurity <[email protected]>
0 commit comments