mirror of
https://github.com/usestrix/strix.git
synced 2026-08-21 02:45:31 +02:00
feat: add --scan-mode CLI option with quick/standard/deep modes
Introduces scan mode selection to control testing depth and methodology: - quick: optimized for CI/CD, focuses on recent changes and high-impact vulns - standard: balanced coverage with systematic methodology - deep: exhaustive testing with hierarchical agent swarm (now default) Each mode has dedicated prompt modules with detailed pentesting guidelines covering reconnaissance, mapping, business logic analysis, exploitation, and vulnerability chaining strategies. Closes #152
This commit is contained in:
@@ -66,6 +66,8 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
|
||||
console.print(startup_panel)
|
||||
console.print()
|
||||
|
||||
scan_mode = getattr(args, "scan_mode", "deep")
|
||||
|
||||
scan_config = {
|
||||
"scan_id": args.run_name,
|
||||
"targets": args.targets_info,
|
||||
@@ -73,7 +75,7 @@ async def run_cli(args: Any) -> None: # noqa: PLR0915
|
||||
"run_name": args.run_name,
|
||||
}
|
||||
|
||||
llm_config = LLMConfig()
|
||||
llm_config = LLMConfig(scan_mode=scan_mode)
|
||||
agent_config = {
|
||||
"llm_config": llm_config,
|
||||
"max_iterations": 300,
|
||||
|
||||
@@ -312,6 +312,21 @@ Examples:
|
||||
),
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"-m",
|
||||
"--scan-mode",
|
||||
type=str,
|
||||
choices=["quick", "standard", "deep"],
|
||||
default="deep",
|
||||
help=(
|
||||
"Scan mode: "
|
||||
"'quick' for fast CI/CD checks, "
|
||||
"'standard' for routine testing, "
|
||||
"'deep' for thorough security reviews (default). "
|
||||
"Default: deep."
|
||||
),
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
if args.instruction and args.instruction_file:
|
||||
|
||||
@@ -319,7 +319,8 @@ class StrixTUIApp(App): # type: ignore[misc]
|
||||
}
|
||||
|
||||
def _build_agent_config(self, args: argparse.Namespace) -> dict[str, Any]:
|
||||
llm_config = LLMConfig()
|
||||
scan_mode = getattr(args, "scan_mode", "deep")
|
||||
llm_config = LLMConfig(scan_mode=scan_mode)
|
||||
|
||||
config = {
|
||||
"llm_config": llm_config,
|
||||
|
||||
Reference in New Issue
Block a user