Skip to content

Commit 472d91b

Browse files
remyluslosiusclaude
andcommitted
refactor(backend): Update services and remove old route files
Update backend services to use new modular routes and remove deprecated flat route files. Deleted Route Files (replaced by modular packages): - routes/hosts.py -> routes/hosts/ - routes/host_discovery.py -> routes/hosts/discovery.py - routes/host_compliance_discovery.py -> routes/hosts/discovery.py - routes/host_network_discovery.py -> routes/hosts/discovery.py - routes/host_security_discovery.py -> routes/hosts/discovery.py - routes/host_groups.py -> routes/host_groups/ - routes/group_compliance.py -> routes/host_groups/ - routes/scans.py -> routes/scans/ - routes/scans_api.py -> routes/scans/ Updated Services: - bulk_scan_orchestrator.py: Updated import paths - error_classification.py: Updated error handling, removed unused import - rule_service.py: Updated rule query logic - models/error_models.py: Updated error model definitions Updated Tasks: - compliance_tasks.py: Updated task implementations - scan_tasks.py: Updated scan execution tasks Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 259e1a3 commit 472d91b

15 files changed

Lines changed: 555 additions & 8449 deletions

backend/app/models/error_models.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ class ErrorSeverity(str, Enum):
3333
INFO = "info"
3434

3535

36+
class AutomatedFixInternal(BaseModel):
37+
"""Internal automated fix with full technical details (server-side only)"""
38+
39+
fix_id: str
40+
description: str
41+
requires_sudo: bool = False
42+
estimated_time: int = Field(default=30, description="Estimated time in seconds")
43+
command: Optional[str] = None
44+
is_safe: bool = True
45+
rollback_command: Optional[str] = None
46+
47+
3648
class AutomatedFixResponse(BaseModel):
3749
"""Sanitized automated fix response for users"""
3850

@@ -53,7 +65,7 @@ class ScanErrorInternal(BaseModel):
5365
message: str
5466
technical_details: Dict[str, Any] = Field(default_factory=dict)
5567
user_guidance: str
56-
automated_fixes: List[Dict[str, Any]] = Field(default_factory=list)
68+
automated_fixes: List[AutomatedFixInternal] = Field(default_factory=list)
5769
can_retry: bool = False
5870
retry_after: Optional[int] = Field(default=None, description="Retry after seconds")
5971
documentation_url: str = ""

0 commit comments

Comments
 (0)