-
Notifications
You must be signed in to change notification settings - Fork 2k
Adds scan resumption capability to Strix, allowing users to resume interrupted scans from automatic checkpoints. Fixes #29 #219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
…techniques - Add route enumeration section with __BUILD_MANIFEST.sortedPages technique - Add environment variable leakage detection (NEXT_PUBLIC_ prefix) - Add data fetching over-exposure section for __NEXT_DATA__ inspection - Add API route path normalization bypass techniques
Greptile Summary
Important Files Changed
Confidence score: 4/5
Sequence DiagramsequenceDiagram
participant User
participant CLI as "CLI/TUI"
participant Checkpoint as "Checkpoint"
participant StrixAgent as "StrixAgent"
participant BaseAgent as "BaseAgent"
participant LLM as "LLM"
participant Tools as "Tools"
participant Tracer as "Tracer"
User->>CLI: "strix --target example.com --resume"
CLI->>Checkpoint: "can_resume(run_dir, scan_config)"
Checkpoint-->>CLI: "true"
CLI->>Checkpoint: "load_checkpoint(run_dir)"
Checkpoint-->>CLI: "checkpoint_data"
CLI->>StrixAgent: "new StrixAgent(config + restored_state)"
CLI->>StrixAgent: "execute_scan(scan_config)"
StrixAgent->>BaseAgent: "agent_loop(task)"
loop Each Iteration
BaseAgent->>LLM: "generate(conversation_history)"
LLM-->>BaseAgent: "response"
BaseAgent->>Tools: "process_tool_invocations(actions)"
Tools-->>BaseAgent: "should_agent_finish"
BaseAgent->>Tracer: "update agent status"
BaseAgent->>Checkpoint: "save_checkpoint(run_dir, state, config)"
Checkpoint-->>BaseAgent: "checkpoint saved"
end
BaseAgent-->>StrixAgent: "final_result"
StrixAgent-->>CLI: "scan_result"
CLI->>Tracer: "cleanup()"
Tracer->>Checkpoint: "delete_checkpoint(run_dir)"
CLI-->>User: "scan complete"
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Additional Comments (5)
-
strix/agents/base_agent.py, line 210-212 (link)style: imports are inside the try block, potentially causing performance overhead on every iteration
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
-
strix/agents/base_agent.py, line 215 (link)style:
hasattr(self, "state")check is unnecessary since BaseAgent always has a state attribute initialized in__init__Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
-
strix/interface/cli.py, line 131 (link)logic: Redundant condition check -
getattr(args, "resume", False)is already evaluated in the parent if statement on line 99 -
strix/interface/tui.py, line 342-347 (link)style: redundant condition check - getattr(args, "resume", False) is already checked on line 314
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
-
strix/telemetry/checkpoint.py, line 161-167 (link)logic: Target validation only checks count, not content. Users could resume with different targets if counts match.
Should target validation compare actual URLs/content instead of just count?
8 files reviewed, 5 comments
Summary
Adds scan resumption capability to Strix, allowing users to resume interrupted scans from automatic checkpoints.
Key Features
--resumeflag to continue from saved stateScreenshots
Interrupt Scan:
Resume Indicator:
Continued Execution:
Implementation
Core Changes
New Checkpoint Module (
strix/telemetry/checkpoint.py, 186 lines)Agent State Persistence (
strix/agents/base_agent.py:208)Resume Logic (
strix/interface/cli.py:88-144,tui.py:304-347)--resumeflag detectedTUI Enhancements (
strix/interface/tui.py:153-161)Automatic Cleanup (
strix/telemetry/tracer.py:211-219)Technical Details
Checkpoint File Structure:
{ "version": 1, "created_at": "2026-01-01T03:34:40+00:00", "scan_config": { "targets": [...], "run_name": "...", ... }, "agent_state": { "iteration": 33, "max_iterations": 300, "messages": [...], "sandbox_id": "...", ... } }State Preservation:
messages)sandbox_id,sandbox_token)Validation & Safety:
Error Handling:
Usage
Edge Cases Handled
✓ Corrupted checkpoint files → starts fresh with warning
✓ Schema version mismatch → starts fresh
✓ Target mismatch → refuses resume with error
✓ Already completed scan → starts fresh
✓ Missing checkpoint → starts fresh with warning
✓ Checkpoint save failure → continues without checkpointing
✓ Pydantic validation errors → starts fresh with warning