From 05464b264e357f69053aa9e8e60a7d2f057b1b5b Mon Sep 17 00:00:00 2001 From: Codex Date: Sun, 29 Nov 2026 21:45:52 +0100 Subject: [PATCH] Authenticate the RPM smoke control connection --- .github/scripts/release-rpm-smoke.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/scripts/release-rpm-smoke.py b/.github/scripts/release-rpm-smoke.py index f82b70675a..73dc871f1d 100644 --- a/.github/scripts/release-rpm-smoke.py +++ b/.github/scripts/release-rpm-smoke.py @@ -3,6 +3,7 @@ import json import os from pathlib import Path +import secrets import socket import subprocess import time @@ -26,7 +27,9 @@ fixture = results / "original-smoke.svg" fixture.write_text('' '' '') -env = dict(os.environ, VECTORCRAFT_NO_PREFS="1", XDG_RUNTIME_DIR="/tmp/vectorcraft-runtime") +token = secrets.token_hex(32) +env = dict(os.environ, VECTORCRAFT_NO_PREFS="1", XDG_RUNTIME_DIR="/tmp/vectorcraft-runtime", + VECTORCRAFT_CONTROL_TOKEN=token) Path(env["XDG_RUNTIME_DIR"]).mkdir(mode=0o700, exist_ok=True) with (results / "gui.log").open("w") as log: app = subprocess.Popen([ @@ -48,6 +51,7 @@ with (results / "gui.log").open("w") as log: channel.settimeout(30) with channel, channel.makefile("rwb") as stream: for request_id, method, params in ( + (0, "auth", {"token": token}), (1, "ui.inspect", {}), ): stream.write((json.dumps(dict(id=request_id, method=method, params=params)) + "\n").encode())