manage_false_positives
Suppress, remove, or list false positive security findings to improve audit accuracy and reduce noise in compliance validation.
Instructions
Manage false positive suppressions
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| findingId | No | Finding ID to suppress | |
| reason | No | Reason for suppression |
Implementation Reference
- src/core/server.ts:554-604 (handler)The handler function that executes the manage_false_positives tool logic. It destructures args for action, findingId, and reason, then switches on action to add, remove, list, or filter false positives using the FalsePositiveFilter instance.private async handleManageFalsePositives(args: any): Promise<any> { const { action, findingId, reason } = args; switch (action) { case 'add': if (!findingId || !reason) { throw new McpError(ErrorCode.InvalidRequest, 'Finding ID and reason required for add action'); } await this.falsePositiveFilter.addRule({ findingType: 'manual', pattern: findingId, reason, }); return { status: 'success', message: `Added false positive rule for ${findingId}`, }; case 'remove': if (!findingId) { throw new McpError(ErrorCode.InvalidRequest, 'Finding ID required for remove action'); } const removed = await this.falsePositiveFilter.removeRule(findingId); return { status: removed ? 'success' : 'not_found', message: removed ? `Removed rule ${findingId}` : `Rule ${findingId} not found`, }; case 'list': await this.falsePositiveFilter.loadRules(); return { status: 'success', rules: [], // Would need to expose rules from filter }; case 'filter': // This would be used internally during scans return { status: 'success', message: 'False positive filtering is applied automatically during scans', }; default: throw new McpError(ErrorCode.InvalidRequest, `Unknown action: ${action}`); } }
- src/core/server.ts:172-188 (registration)Registers the manage_false_positives tool in the ListToolsRequestSchema handler, including its name, description, and input schema definition.{ name: 'manage_false_positives', description: 'Manage false positive suppressions', inputSchema: { type: 'object', properties: { action: { type: 'string', enum: ['add', 'remove', 'list', 'filter'], description: 'Action to perform' }, findingId: { type: 'string', description: 'Finding ID to suppress' }, reason: { type: 'string', description: 'Reason for suppression' }, }, required: ['action'], }, },
- src/core/server.ts:175-187 (schema)Defines the input schema for the manage_false_positives tool, specifying properties for action, findingId, and reason.inputSchema: { type: 'object', properties: { action: { type: 'string', enum: ['add', 'remove', 'list', 'filter'], description: 'Action to perform' }, findingId: { type: 'string', description: 'Finding ID to suppress' }, reason: { type: 'string', description: 'Reason for suppression' }, }, required: ['action'], },