更新: 421 个文件 - 2026-03-17 18:30:02

这个提交包含在:
hao
2026-03-17 18:30:02 -07:00
父节点 29c3faaa28
当前提交 a3edc88834
修改 421 个文件,包含 12474 行新增5845 行删除

查看文件

@@ -4,6 +4,7 @@ import subprocess
from pathlib import Path
from typing import Any, Dict, List
from lab.runners.dispatcher import run_attack as run_runner_attack
from lab.utils import write_json
@@ -37,6 +38,9 @@ def _render_args(step: Dict[str, Any], profile: Dict[str, Any], advisory: Dict[s
def run_attack(profile: Dict[str, Any], advisory: Dict[str, Any], run_dir: Path, dry_run: bool = False) -> Dict[str, Any]:
if profile.get("runner_id") and not dry_run:
return run_runner_attack(profile, advisory, run_dir)
steps: List[Dict[str, Any]] = []
for step in profile.get("attack_actions", []):
tool_name = step.get("tool")
@@ -60,6 +64,8 @@ def run_attack(profile: Dict[str, Any], advisory: Dict[str, Any], run_dir: Path,
"result_path": str(output_path),
}
)
elif step.get("kind") == "note" and not dry_run:
record["status"] = "completed"
steps.append(record)
payload = {"steps": steps}
write_json(run_dir / "logs" / "attack.json", payload)