feat: Add LLM analysis workflow and ruff linter fixes

LLM Analysis Workflow:
- Add llm_analyzer module for AI-powered code security analysis
- Add llm_analysis workflow with SARIF output support
- Mount AI module in Python worker for A2A wrapper access
- Add a2a-sdk dependency to Python worker requirements
- Fix workflow parameter ordering in Temporal manager

Ruff Linter Fixes:
- Fix bare except clauses (E722) across AI and CLI modules
- Add noqa comments for intentional late imports (E402)
- Replace undefined get_ai_status_async with TODO placeholder
- Remove unused imports and variables
- Remove container diagnostics display from exception handler

MCP Configuration:
- Reactivate FUZZFORGE_MCP_URL with default value
- Set default MCP URL to http://localhost:8010/mcp in init
This commit is contained in:
tduhamel42
2025-10-14 16:43:14 +02:00
parent 71fbe879df
commit ff00146f20
23 changed files with 882 additions and 74 deletions
+1
View File
@@ -1,3 +1,4 @@
# ruff: noqa: E402 # Imports delayed for environment/logging setup
"""
FuzzForge A2A Server
Run this to expose FuzzForge as an A2A-compatible agent
+1 -1
View File
@@ -15,7 +15,7 @@ Programmatic interface to send tasks to A2A agents with custom model/prompt/cont
from __future__ import annotations
from typing import Optional, Dict, Any
from typing import Optional, Any
from uuid import uuid4
import httpx
+5 -4
View File
@@ -1,3 +1,4 @@
# ruff: noqa: E402 # Imports delayed for environment/logging setup
"""FuzzForge Agent Executor - orchestrates workflows and delegation."""
# Copyright (c) 2025 FuzzingLabs
#
@@ -173,7 +174,7 @@ class FuzzForgeExecutor:
else:
# Run now if no loop is running
loop.run_until_complete(self._register_agent_async(url, name))
except:
except Exception:
# Ignore auto-registration failures
pass
except Exception as e:
@@ -451,11 +452,11 @@ class FuzzForgeExecutor:
try:
user = await get_user(user_email)
logger.info(f"Using existing user: {user_email}")
except:
except Exception:
try:
user = await create_user(user_email, user_tenant)
logger.info(f"Created new user: {user_email}")
except:
except Exception:
user = None
if user:
@@ -1704,7 +1705,7 @@ Be concise and intelligent in your responses."""
if self.agentops_trace:
try:
agentops.end_trace()
except:
except Exception:
pass
# Cancel background monitors
+2 -1
View File
@@ -1,3 +1,4 @@
# ruff: noqa: E402 # Imports delayed for environment/logging setup
#!/usr/bin/env python3
# Copyright (c) 2025 FuzzingLabs
#
@@ -428,7 +429,7 @@ class FuzzForgeCLI:
text = data['parts'][0].get('text', '')[:150]
role = data.get('role', 'unknown')
console.print(f"{i}. [{role}]: {text}...")
except:
except Exception:
console.print(f"{i}. {content[:150]}...")
else:
console.print("[yellow]No matches found in SQLite either[/yellow]")
+1 -1
View File
@@ -156,7 +156,7 @@ class CogneeService:
self._user = await get_user(fallback_email)
logger.info(f"Using existing user: {fallback_email}")
return
except:
except Exception:
# User doesn't exist, try to create fallback
pass
+1 -1
View File
@@ -37,7 +37,7 @@ class RemoteAgentConnection:
response.raise_for_status()
self.agent_card = response.json()
return self.agent_card
except:
except Exception:
# Try old path for compatibility
try:
response = await self.client.get(f"{self.url}/.well-known/agent.json")