fix(security): resolve inventory validator input from repo root
All checks were successful
CD Pipeline / workflow-shape (push) Successful in 0s
CD Pipeline / cancel-stale-cd (push) Has been skipped
CD Pipeline / tests (push) Successful in 19s
CD Pipeline / build-and-deploy (push) Successful in 7m2s
CD Pipeline / post-deploy-checks (push) Successful in 56s

This commit is contained in:
Your Name
2026-06-29 16:00:42 +08:00
parent 0ff377af6f
commit ce411e2040

View File

@@ -14,7 +14,13 @@ def run_validator(path: Path | None = None) -> dict:
command = [sys.executable, str(SCRIPT)]
if path:
command.extend(["--input", str(path)])
result = subprocess.run(command, text=True, capture_output=True, check=True)
result = subprocess.run(
command,
cwd=ROOT / "apps/api",
text=True,
capture_output=True,
check=True,
)
return json.loads(result.stdout)