mirror of
https://github.com/usestrix/strix.git
synced 2026-08-21 18:52:47 +02:00
feat: Expose Caido proxy port to host for human-in-the-loop interaction
Users can now access the Caido web UI from their browser to inspect traffic, replay requests, and perform manual testing alongside the automated scan. - Map Caido port (48080) to a random host port in DockerRuntime - Add caido_port to SandboxInfo and track across container lifecycle - Display Caido URL in TUI sidebar stats panel with selectable text - Bind Caido to 0.0.0.0 in entrypoint (requires image rebuild) - Bump sandbox image to 0.1.12 - Restore discord link in exit screen
This commit is contained in:
@@ -77,12 +77,21 @@ Toast.-information .toast--title {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
#stats_display {
|
||||
#stats_scroll {
|
||||
height: auto;
|
||||
max-height: 15;
|
||||
background: transparent;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
border: round #333333;
|
||||
scrollbar-size: 0 0;
|
||||
}
|
||||
|
||||
#stats_display {
|
||||
height: auto;
|
||||
background: transparent;
|
||||
padding: 0 1;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#vulnerabilities_panel {
|
||||
|
||||
@@ -462,7 +462,7 @@ def display_completion_message(args: argparse.Namespace, results_path: Path) ->
|
||||
console.print("\n")
|
||||
console.print(panel)
|
||||
console.print()
|
||||
console.print("[#60a5fa]models.strix.ai[/]")
|
||||
console.print("[#60a5fa]models.strix.ai[/] [dim]·[/] [#60a5fa]discord.gg/strix-ai[/]")
|
||||
console.print()
|
||||
|
||||
|
||||
|
||||
+6
-11
@@ -829,11 +829,11 @@ class StrixTUIApp(App): # type: ignore[misc]
|
||||
agents_tree.guide_style = "dashed"
|
||||
|
||||
stats_display = Static("", id="stats_display")
|
||||
stats_display.ALLOW_SELECT = False
|
||||
stats_scroll = VerticalScroll(stats_display, id="stats_scroll")
|
||||
|
||||
vulnerabilities_panel = VulnerabilitiesPanel(id="vulnerabilities_panel")
|
||||
|
||||
sidebar = Vertical(agents_tree, vulnerabilities_panel, stats_display, id="sidebar")
|
||||
sidebar = Vertical(agents_tree, vulnerabilities_panel, stats_scroll, id="sidebar")
|
||||
|
||||
content_container.mount(chat_area_container)
|
||||
content_container.mount(sidebar)
|
||||
@@ -1272,6 +1272,9 @@ class StrixTUIApp(App): # type: ignore[misc]
|
||||
if not self._is_widget_safe(stats_display):
|
||||
return
|
||||
|
||||
if self.screen.selections:
|
||||
return
|
||||
|
||||
stats_content = Text()
|
||||
|
||||
stats_text = build_tui_stats_text(self.tracer, self.agent_config)
|
||||
@@ -1281,15 +1284,7 @@ class StrixTUIApp(App): # type: ignore[misc]
|
||||
version = get_package_version()
|
||||
stats_content.append(f"\nv{version}", style="white")
|
||||
|
||||
from rich.panel import Panel
|
||||
|
||||
stats_panel = Panel(
|
||||
stats_content,
|
||||
border_style="#333333",
|
||||
padding=(0, 1),
|
||||
)
|
||||
|
||||
self._safe_widget_operation(stats_display.update, stats_panel)
|
||||
self._safe_widget_operation(stats_display.update, stats_content)
|
||||
|
||||
def _update_vulnerabilities_panel(self) -> None:
|
||||
"""Update the vulnerabilities panel with current vulnerability data."""
|
||||
|
||||
@@ -390,6 +390,12 @@ def build_tui_stats_text(tracer: Any, agent_config: dict[str, Any] | None = None
|
||||
stats_text.append(" · ", style="white")
|
||||
stats_text.append(f"${total_stats['cost']:.2f}", style="white")
|
||||
|
||||
caido_url = getattr(tracer, "caido_url", None)
|
||||
if caido_url:
|
||||
stats_text.append("\n")
|
||||
stats_text.append("Caido: ", style="bold white")
|
||||
stats_text.append(caido_url, style="white")
|
||||
|
||||
return stats_text
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user