Skip to content

Commit d9cb477

Browse files
committed
fix(cli): redact task run env values from debug log
The "initializing task run process" debug log serialized the full worker environment (fullEnv), including TRIGGER_SECRET_KEY, TRIGGER_JWT, and any customer secret env vars. Log only the env var names instead of the values.
1 parent 7a14188 commit d9cb477

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"trigger.dev": patch
3+
---
4+
5+
Stop logging task run environment variable values at debug level. The `initializing task run process` debug log previously serialized the full worker environment, which includes `TRIGGER_SECRET_KEY`, `TRIGGER_JWT`, and any secret env vars set for the run. It now logs only the env var names, so secrets no longer appear in run logs when debug logging is enabled.

packages/cli-v3/src/executions/taskRunProcess.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ export class TaskRunProcess {
150150
TRIGGERDOTDEV: "1",
151151
};
152152

153+
// Only log env var names, never values: fullEnv contains secrets
154+
// (TRIGGER_SECRET_KEY, TRIGGER_JWT, and arbitrary customer secret env vars).
153155
logger.debug(`initializing task run process`, {
154-
env: fullEnv,
156+
envKeys: Object.keys(fullEnv),
155157
path: workerManifest.workerEntryPoint,
156158
cwd,
157159
});

0 commit comments

Comments
 (0)