mirror of
https://github.com/usestrix/strix.git
synced 2026-08-20 18:38:57 +02:00
feat(runtime): mount local targets instead of copying them in (#958)
Co-authored-by: Ahmed Allam <ahmed39652003@gmail.com>
This commit is contained in:
co-authored by
Ahmed Allam
parent
b6cf156e95
commit
dbc427d816
@@ -21,6 +21,7 @@ from strix.runtime import session_manager
|
||||
from .utils import (
|
||||
build_live_stats_text,
|
||||
format_vulnerability_report,
|
||||
has_model_response,
|
||||
)
|
||||
|
||||
|
||||
@@ -135,11 +136,17 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
|
||||
|
||||
set_global_report_state(report_state)
|
||||
|
||||
startup_phase: list[str] = ["Starting up"]
|
||||
|
||||
def create_live_status() -> Panel:
|
||||
status_text = Text()
|
||||
status_text.append("Penetration test in progress", style="bold #22c55e")
|
||||
status_text.append("\n\n")
|
||||
|
||||
if not has_model_response(report_state):
|
||||
status_text.append(f"{startup_phase[0]}...", style="dim")
|
||||
status_text.append("\n\n")
|
||||
|
||||
stats_text = build_live_stats_text(report_state)
|
||||
if stats_text:
|
||||
status_text.append(stats_text)
|
||||
@@ -152,6 +159,9 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
|
||||
padding=(1, 2),
|
||||
)
|
||||
|
||||
def _note_startup_phase(phase: str) -> None:
|
||||
startup_phase[:] = [phase]
|
||||
|
||||
try:
|
||||
console.print()
|
||||
|
||||
@@ -186,6 +196,7 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
|
||||
interactive=bool(getattr(args, "interactive", False)),
|
||||
max_budget_usd=getattr(args, "max_budget_usd", None),
|
||||
max_turns=getattr(args, "max_turns", DEFAULT_MAX_TURNS),
|
||||
status_sink=_note_startup_phase,
|
||||
)
|
||||
finally:
|
||||
stop_updates.set()
|
||||
|
||||
Reference in New Issue
Block a user