From f0bda8cc44dbb9c561ce4e528bb8fe60f5e0876d Mon Sep 17 00:00:00 2001 From: Vyntral Date: Fri, 21 Nov 2025 16:06:07 +0100 Subject: [PATCH] fix: AI bug fixes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix confidence always showing 0% (use coordinator confidence) - Simplify AI report prompt to prevent hallucinated subdomain names - Update slogan to reflect AI-powered capabilities 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- cmd/god-eye/main.go | 4 ++-- internal/ai/agents/orchestrator.go | 3 +++ internal/ai/ollama.go | 24 ++++++------------------ internal/output/print.go | 2 +- 4 files changed, 12 insertions(+), 21 deletions(-) diff --git a/cmd/god-eye/main.go b/cmd/god-eye/main.go index 70bd675..0cddfc9 100644 --- a/cmd/god-eye/main.go +++ b/cmd/god-eye/main.go @@ -18,8 +18,8 @@ func main() { rootCmd := &cobra.Command{ Use: "god-eye -d [flags]", - Short: "Ultra-fast subdomain enumeration tool", - Long: `God's Eye - Ultra-fast subdomain enumeration & reconnaissance tool written in Go + Short: "AI-powered attack surface discovery & security analysis", + Long: `God's Eye - AI-powered attack surface discovery & security analysis tool written in Go Examples: god-eye -d example.com Basic scan with all features diff --git a/internal/ai/agents/orchestrator.go b/internal/ai/agents/orchestrator.go index b184c7d..a8777ea 100644 --- a/internal/ai/agents/orchestrator.go +++ b/internal/ai/agents/orchestrator.go @@ -148,6 +148,9 @@ func (ao *AgentOrchestrator) Analyze(ctx context.Context, finding Finding) (*Age result.Duration = time.Since(start) result.Reasoning = reasoning + // Always use coordinator confidence (fast classification is more reliable than LLM output parsing) + result.Confidence = confidence + // Update stats ao.updateStats(agentType, result.Confidence, result.Duration) diff --git a/internal/ai/ollama.go b/internal/ai/ollama.go index 015b8d9..a472cff 100644 --- a/internal/ai/ollama.go +++ b/internal/ai/ollama.go @@ -227,27 +227,15 @@ Format: SEVERITY: finding`, truncate(summary, 4000)) // GenerateReport creates executive summary and recommendations func (c *OllamaClient) GenerateReport(findings string, stats map[string]int) (string, error) { - prompt := fmt.Sprintf(`You are a security analyst. Create a brief security report from the scan data below. + prompt := fmt.Sprintf(`Security scan report. Stats: %d total, %d active, %d vulns, %d takeovers. -STATISTICS: %d subdomains scanned, %d active, %d vulnerabilities, %d takeovers - -SCAN FINDINGS: +DATA: %s -RULES: -- Use ONLY the subdomain names shown in SCAN FINDINGS above -- Do NOT invent or make up any subdomain names -- If no vulnerabilities found, say "No critical issues identified" - -FORMAT: -## Summary -(2 sentences about what was found) - -## Issues -(List each real subdomain with its actual issues, or "None" if clean) - -## Actions -(1-3 specific recommendations)`, +Write a 3-line summary: +1. What was scanned (copy exact subdomain names from DATA) +2. Main security issues found (or "clean" if none) +3. Top recommendation`, stats["total"], stats["active"], stats["vulns"], stats["takeovers"], truncate(findings, 3000)) response, err := c.query(c.DeepModel, prompt, 45*time.Second) diff --git a/internal/output/print.go b/internal/output/print.go index 4645498..8834742 100644 --- a/internal/output/print.go +++ b/internal/output/print.go @@ -50,7 +50,7 @@ func PrintBanner() { fmt.Println(BoldWhite(" ╚██████╔╝╚██████╔╝██████╔╝") + BoldGreen("███████║") + BoldWhite(" ███████╗ ██║ ███████╗")) fmt.Println(BoldWhite(" ╚═════╝ ╚═════╝ ╚═════╝ ") + BoldGreen("╚══════╝") + BoldWhite(" ╚══════╝ ╚═╝ ╚══════╝")) fmt.Println() - fmt.Printf(" %s %s\n", BoldGreen("⚡"), Dim("Ultra-fast subdomain enumeration & reconnaissance")) + fmt.Printf(" %s %s\n", BoldGreen("⚡"), Dim("AI-powered attack surface discovery & security analysis")) fmt.Printf(" %s %s %s %s %s %s\n", Dim("Version:"), BoldGreen("0.1"), Dim("By:"), White("github.com/Vyntral"),