suggest_next_steps
Analyze penetration testing scan results to identify and recommend appropriate next steps in the security assessment workflow.
Instructions
Analyze current findings and suggest next steps
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scan_results | Yes | Previous scan results in JSON format |
Input Schema (JSON Schema)
{
"properties": {
"scan_results": {
"description": "Previous scan results in JSON format",
"type": "string"
}
},
"required": [
"scan_results"
],
"type": "object"
}
Implementation Reference
- src/engines/workflow.ts:124-177 (handler)Core handler function that parses scan results, analyzes reconnaissance, vulnerabilities, and exploits to generate prioritized next step recommendations.async suggestNextSteps(scanResults: string): Promise<ScanResult> { try { const results = JSON.parse(scanResults); const recommendations: NextStepsRecommendation[] = []; // Analyze reconnaissance results if (results.reconnaissance) { recommendations.push(...this.analyzeReconResults(results.reconnaissance)); } // Analyze vulnerability results if (results.vulnerabilities) { recommendations.push(...this.analyzeVulnResults(results.vulnerabilities)); } // Analyze exploitation results if (results.exploits) { recommendations.push(...this.analyzeExploitResults(results.exploits)); } // Sort recommendations by priority and risk recommendations.sort((a, b) => { const priorityOrder = { high: 3, medium: 2, low: 1 }; const riskOrder = { critical: 4, high: 3, medium: 2, low: 1 }; const aScore = priorityOrder[a.priority] + riskOrder[a.risk_level]; const bScore = priorityOrder[b.priority] + riskOrder[b.risk_level]; return bScore - aScore; }); return { target: 'analysis', timestamp: new Date().toISOString(), tool: 'suggest_next_steps', results: { recommendations: recommendations.slice(0, 10), // Top 10 recommendations total_recommendations: recommendations.length, analysis_summary: this.generateAnalysisSummary(results) }, status: 'success' }; } catch (error) { return { target: 'analysis', timestamp: new Date().toISOString(), tool: 'suggest_next_steps', results: {}, status: 'error', error: error instanceof Error ? error.message : String(error) }; } }
- src/index.ts:225-234 (schema)Input schema definition for the 'suggest_next_steps' tool, specifying the required 'scan_results' parameter.name: "suggest_next_steps", description: "Analyze current findings and suggest next steps", inputSchema: { type: "object", properties: { scan_results: { type: "string", description: "Previous scan results in JSON format" } }, required: ["scan_results"] } },
- src/index.ts:538-539 (registration)Registration and dispatching of tool calls to the workflow engine's suggestNextSteps method.case "suggest_next_steps": return respond(await this.workflowEngine.suggestNextSteps(args.scan_results));
- src/engines/workflow.ts:39-46 (schema)Type definition for the recommendation objects returned by the tool.export interface NextStepsRecommendation { priority: 'high' | 'medium' | 'low'; action: string; tool: string; reason: string; estimated_time: string; risk_level: 'low' | 'medium' | 'high' | 'critical'; }