ci: document fixed policy verifier subprocess
Build and Test Quality Gate / Contract Web typecheck and build (pull_request) Successful in 3m17s
Build and Test Quality Gate / Python tests and Contract API migration (pull_request) Successful in 18m53s
Security Quality Gate / npm audit, Bandit, pip-audit, detect-secrets (pull_request) Successful in 5m47s

This commit is contained in:
2026-08-12 22:00:35 +08:00
parent c69e0633c5
commit 41e5a85567
@@ -3,7 +3,8 @@ from __future__ import annotations
import hashlib
import json
import re
import subprocess
# The verifier runs via a fixed Python interpreter and never invokes a shell.
import subprocess # nosec B404
import sys
from datetime import UTC, datetime
from pathlib import Path
@@ -602,7 +603,8 @@ def _run_policy_verifier(*, policy_dir: Path, approval_file: Path, keyring_file:
script = next((candidate for candidate in candidates if candidate.is_file()), None)
if script is None:
raise PublicPolicyError("Policy verifier is unavailable.")
completed = subprocess.run(
# The executable and script are fixed; evidence paths remain plain argv values.
completed = subprocess.run( # nosec B603
[sys.executable, str(script), "verify", "--approval-file", str(approval_file), "--keyring-file", str(keyring_file), "--policy-dir", str(policy_dir), "--checked-at", _as_utc(checked_at).isoformat()],
check=False, capture_output=True, text=True, timeout=20,
)