Description
os.environ.copy() at python/packages/jumpstarter/jumpstarter/exporter/hooks.py:81 passes the full process environment to hook subprocesses, including JMP_TOKEN, Kubernetes ServiceAccount tokens, and cloud credentials.
Combined with JMP_DRIVERS_ALLOW: "UNSAFE", hooks operate with maximum privilege and zero audit persistence.
Suggested Fix
- Construct a minimal environment for hook subprocesses
- Explicitly allowlist safe environment variables
- Strip sensitive variables (tokens, keys, cloud credentials)