From 3180dd6c7ccf0d91c821632cf69df4a1b32ced99 Mon Sep 17 00:00:00 2001 From: "Dylan M. Taylor" Date: Sat, 14 Nov 2026 14:20:25 -0500 Subject: [PATCH] Do not pass the launcher's GitHub token to child processes Every program the launcher starts inherited its environment, including ARTCRAFT_LAUNCHER_GITHUB_TOKEN. Installed apps, including approved community apps, could read the launcher's own API credential. Command construction now removes it, so apps and helpers never receive it. --- crates/native/src/process.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/native/src/process.rs b/crates/native/src/process.rs index 23dab930..706047ba 100644 --- a/crates/native/src/process.rs +++ b/crates/native/src/process.rs @@ -11,6 +11,9 @@ use std::time::{Duration, Instant}; pub fn command(program: impl AsRef) -> Command { #[allow(unused_mut)] let mut cmd = Command::new(program); + // The launcher's GitHub token is its own credential. Installed apps, including approved + // community apps, have no business with it (audit: launcher #2). + cmd.env_remove("ARTCRAFT_LAUNCHER_GITHUB_TOKEN"); #[cfg(windows)] { use std::os::windows::process::CommandExt;