fix(ops): harden provenance gate path and command parsing

Co-authored-by: genichin <4282227+genichin@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-09-13 16:12:55 +09:00
committed by Hermes Agent
co-authored by genichin
parent f3a6b2c410
commit 8d9d627b1c
3 changed files with 44 additions and 7 deletions
+2 -1
View File
@@ -4,6 +4,7 @@ from __future__ import annotations
import argparse
import json
import shlex
from datetime import UTC, datetime
from pathlib import Path
@@ -26,7 +27,7 @@ def _parse_capture_command(raw: str) -> tuple[str, list[str]]:
raise ValueError("capture command must be KEY=command")
key, command = raw.split("=", 1)
key = key.strip()
parts = [x for x in command.strip().split(" ") if x]
parts = shlex.split(command.strip())
if not key or not parts:
raise ValueError("capture command must be KEY=command")
return key, parts