René's URL Explorer Experiment


Title: fix(cli): stop logging project env var values in the "started attempt" debug log by enderyildirim · Pull Request #4457 · triggerdotdev/trigger.dev · GitHub

Open Graph Title: fix(cli): stop logging project env var values in the "started attempt" debug log by enderyildirim · Pull Request #4457 · triggerdotdev/trigger.dev

X Title: fix(cli): stop logging project env var values in the "started attempt" debug log by enderyildirim · Pull Request #4457 · triggerdotdev/trigger.dev

Description: Fixes the remaining leak site from #3566. What I observed On a self-hosted v4 install, each runner container writes the whole startRunAttempt response body to stdout at the start of every attempt. WorkerApiRunAttemptStartResponseBody is StartRunAttemptResult & { envVars: z.record(z.string()) }, so that object contains the full project environment variable map. Redacted excerpt of a real runner log: {"timestamp":"...","message":"started attempt","$name":"managed-run-logger","$level":"log", "start":{"envVars":{ "DATABASE_URL":"postgresql://user:REAL_PASSWORD_WAS_HERE@db:5432/app", "SOME_PROVIDER_API_KEY":"REAL_KEY_WAS_HERE", "APP_SIGNING_SECRET":"REAL_SECRET_WAS_HERE" }, ...}} Those values landed in every runner container's json log file, one entry per attempt. Why the existing redaction doesn't catch it SimpleStructuredLogger passes each line through redact() from packages/core/src/logger.ts, but filterKeys matches on the whole lowercased key name: if (keys.has(key.toLowerCase())) { ... } envVars isn't in DEFAULT_FILTERED_KEYS, so it's recursed into, and the user-defined names inside it (DATABASE_URL, SUPABASE_SERVICE_ROLE_KEY, …) match nothing in the list either. That leaves only SECRET_VALUE_PATTERN, which catches tr_*, sk-* and Bearer * — so a Postgres URL, a JWT-shaped service key, or a hex master key all pass through verbatim. The payload and metadata fields on the same object are filtered, which is why this is easy to miss. ManagedRunLogger.sendDebugLog also forwards the same properties to the webapp debug-log endpoint via flattenAttributes, with no redaction on that path. It's gated behind TRIGGER_SEND_RUN_DEBUG_LOGS (default false), so it only leaks for operators who turned that on — but when they do, unredacted. Why it matters for self-hosters Runner stdout goes to whatever collects container logs (Loki, CloudWatch, Datadog, plain docker json files). Those pipelines are usually treated as low-sensitivity and are broadly readable, retained for weeks, and often shipped off-box. A task that needs any credential to do its job ends up publishing that credential there on every single attempt. LOG_LEVEL / DEBUG don't suppress it: sendDebugLog uses SimpleStructuredLogger.log, which is LogLevel.log = 0, the lowest value in the enum, so the if (this.level < LogLevel.log) return guard can never fire. What I changed execution.ts now logs an explicit projection instead of the raw response body — new executionLogging.ts, mirroring the buildWorkerLogging.ts split added in #4420 so the payload is unit-testable: this.sendDebugLog("started attempt", startedAttemptLogProperties(start.data)); which yields run/snapshot identifiers, attempt number, task, queue, machine preset, and envVarKeys — the environment variable names only. Two deliberate choices: Redact rather than remove. The entry is a useful "the attempt started, here is what it started with" marker, and the names answer the common question of whether a variable actually reached the runner. Only the values are dropped. Allow-list, not deny-list. envVars keys are user-defined, so no name-based deny-list can classify them — hence values are dropped wholesale rather than filtered. For the rest of the body an allow-list means a new field on the API response can't silently reintroduce a leak. This matches #4336, which fixed the equivalent leak in taskRunProcess.ts by logging Object.keys(fullEnv). Since both sinks share one properties object, this fixes the stdout and webapp-endpoint halves together. Scope The other two sites named in #3566 are already handled on main, so this PR leaves them alone: taskRunProcess.ts — fixed by #4336 (released in 4.5.7); logs envKeys now. controller.ts — ...env.raw became ...env.rawForLogging, which redacts TRIGGER_DEPLOYMENT_ID. The rest is the bounded RunnerEnv zod schema, so no project secrets reach it. One thing I noticed but did not touch, to keep this to a single issue: the debug-log HTTP sink in ManagedRunLogger.sendDebugLog flattens the raw mergedProperties, so it doesn't get the redact() pass that the stdout sink gets from SimpleStructuredLogger. Any other sendDebugLog caller that passes something sensitive is therefore protected on stdout but not on the wire. Happy to open a follow-up if you'd like that sink to redact too. How I tested Added packages/cli-v3/src/entryPoints/managed/executionLogging.test.ts (4 tests, passing): asserts the serialized properties contain neither an env var value nor the run payload, that the env var names survive, the exact field set, and the envVars-absent case. Confirmed the test fails if the projection regresses — adding the raw body back to the returned object turns 2 of the 4 red. oxlint and oxfmt --check clean on the touched files. tsc -p tsconfig.src.json --noEmit reports the same 7 errors with and without this change (all from workspace packages I hadn't built), so no new type errors. I could not run snapshot.test.ts / taskRunProcess.test.ts in the same package: they need a built @trigger.dev/core, and building it needs Node 24, which I don't have locally. They fail identically on a clean checkout of main, so this change doesn't affect them, but I have not run the full cli-v3 suite.

Open Graph Description: Fixes the remaining leak site from #3566. What I observed On a self-hosted v4 install, each runner container writes the whole startRunAttempt response body to stdout at the start of every attempt. ...

X Description: Fixes the remaining leak site from #3566. What I observed On a self-hosted v4 install, each runner container writes the whole startRunAttempt response body to stdout at the start of every attempt. ...

Opengraph URL: https://github.com/triggerdotdev/trigger.dev/pull/4457

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:39ed3376-8cf7-898b-2cf6-cb6a3b2724bf
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idE1CE:42EA3:3343FA7:48BB2CF:6AFAF73B
html-safe-noncef66d60e86e777828a35183be5bb582063a21c74023ff74ecd09d5929643b1f56
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMUNFOjQyRUEzOjMzNDNGQTc6NDhCQjJDRjo2QUZBRjczQiIsInZpc2l0b3JfaWQiOiI4OTM3MDExMDI5ODMzNjExMDY3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb2515943b5769e279e7c4495e8d5465e3e40734950b0b2f24cf1584c59b07bbe
hovercard-subject-tagpull_request:4185714311
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/triggerdotdev/trigger.dev/pull/4457/files
twitter:imagehttps://avatars.githubusercontent.com/u/16105744?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/16105744?s=400&v=4
og:image:altFixes the remaining leak site from #3566. What I observed On a self-hosted v4 install, each runner container writes the whole startRunAttempt response body to stdout at the start of every attempt. ...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None0178036d8230524a18422872393ab7e708443ae4c2047f758560a2db870c1913
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/triggerdotdev/trigger.dev git https://github.com/triggerdotdev/trigger.dev.git
octolytics-dimension-user_id95297378
octolytics-dimension-user_logintriggerdotdev
octolytics-dimension-repository_id572570113
octolytics-dimension-repository_nwotriggerdotdev/trigger.dev
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id572570113
octolytics-dimension-repository_network_root_nwotriggerdotdev/trigger.dev
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea85e96a83bed7871993e6b1ffda24105928eee17
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/triggerdotdev/trigger.dev/pull/4457/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4457%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Ftriggerdotdev%2Ftrigger.dev%2Fpull%2F4457%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=triggerdotdev%2Ftrigger.dev
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4457/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4457/files
Reloadhttps://github.com/triggerdotdev/trigger.dev/pull/4457/files
triggerdotdevhttps://github.com/triggerdotdev
trigger.devhttps://github.com/triggerdotdev/trigger.dev
Codehttps://github.com/triggerdotdev/trigger.dev
Issues203 (203)https://github.com/triggerdotdev/trigger.dev/issues
Pull requests67 (67)https://github.com/triggerdotdev/trigger.dev/pulls
Discussionshttps://github.com/triggerdotdev/trigger.dev/discussions
Actionshttps://github.com/triggerdotdev/trigger.dev/actions
Projectshttps://github.com/triggerdotdev/trigger.dev/projects
Security and quality39 (39)https://github.com/triggerdotdev/trigger.dev/security
Insightshttps://github.com/triggerdotdev/trigger.dev/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Ftriggerdotdev%2Ftrigger.dev%2Fissues%2Fnew%2Fchoose
enderyildirimhttps://github.com/enderyildirim
triggerdotdev:mainhttps://github.com/triggerdotdev/trigger.dev/tree/main
enderyildirim:fix/redact-started-attempt-env-varshttps://github.com/enderyildirim/trigger.dev/tree/fix/redact-started-attempt-env-vars
Conversation 5 https://github.com/triggerdotdev/trigger.dev/pull/4457
Commits 1 https://github.com/triggerdotdev/trigger.dev/pull/4457/commits
Checks 2 https://github.com/triggerdotdev/trigger.dev/pull/4457/checks
Files changed https://github.com/triggerdotdev/trigger.dev/pull/4457/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4457/files
fix(cli): stop logging project env var values in the "started attempt" debug log https://github.com/triggerdotdev/trigger.dev/pull/4457/files#top
Show all changes 1 commit https://github.com/triggerdotdev/trigger.dev/pull/4457/files
5c98043 fix(cli): stop logging project env var values in "started attempt" de… enderyildirim Aug 1, 2026 https://github.com/triggerdotdev/trigger.dev/pull/4457/commits/5c980436b6665a817ebce7f8b0801f1882c03fce
Clear filters https://github.com/triggerdotdev/trigger.dev/pull/4457/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4457/files
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4457/files
redact-started-attempt-debug-log.md https://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-abecc699e74a7710462712889a6d788d8f161199af07b922b51fc718137392d4
execution.ts https://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-fd09e5be9c6024f887d9c86bad758d66df933478d302ba98e754b61f1ddd1713
executionLogging.test.ts https://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-712ac943bcc7296a9e085eded4c1346ef7a93b945e3c4872739bcdc6b13ac612
executionLogging.ts https://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-b9964b45d89506359c10e58ce874308f56c93402da59bce90b866f0be3648fd7
.changeset/redact-started-attempt-debug-log.mdhttps://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-abecc699e74a7710462712889a6d788d8f161199af07b922b51fc718137392d4
View file https://github.com/enderyildirim/trigger.dev/blob/5c980436b6665a817ebce7f8b0801f1882c03fce/.changeset/redact-started-attempt-debug-log.md
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4457/{{ revealButtonHref }}
packages/cli-v3/src/entryPoints/managed/execution.tshttps://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-fd09e5be9c6024f887d9c86bad758d66df933478d302ba98e754b61f1ddd1713
View file https://github.com/enderyildirim/trigger.dev/blob/5c980436b6665a817ebce7f8b0801f1882c03fce/packages/cli-v3/src/entryPoints/managed/execution.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4457/{{ revealButtonHref }}
https://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-fd09e5be9c6024f887d9c86bad758d66df933478d302ba98e754b61f1ddd1713
https://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-fd09e5be9c6024f887d9c86bad758d66df933478d302ba98e754b61f1ddd1713
https://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-fd09e5be9c6024f887d9c86bad758d66df933478d302ba98e754b61f1ddd1713
https://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-fd09e5be9c6024f887d9c86bad758d66df933478d302ba98e754b61f1ddd1713
packages/cli-v3/src/entryPoints/managed/executionLogging.test.tshttps://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-712ac943bcc7296a9e085eded4c1346ef7a93b945e3c4872739bcdc6b13ac612
View file https://github.com/enderyildirim/trigger.dev/blob/5c980436b6665a817ebce7f8b0801f1882c03fce/packages/cli-v3/src/entryPoints/managed/executionLogging.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4457/{{ revealButtonHref }}
packages/cli-v3/src/entryPoints/managed/executionLogging.tshttps://github.com/triggerdotdev/trigger.dev/pull/4457/files#diff-b9964b45d89506359c10e58ce874308f56c93402da59bce90b866f0be3648fd7
View file https://github.com/enderyildirim/trigger.dev/blob/5c980436b6665a817ebce7f8b0801f1882c03fce/packages/cli-v3/src/entryPoints/managed/executionLogging.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/triggerdotdev/trigger.dev/pull/4457/{{ revealButtonHref }}
devin-ai-integrationhttps://github.com/apps/devin-ai-integration
Aug 1, 2026https://github.com/triggerdotdev/trigger.dev/pull/4457/files#r3696801383
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://app.devin.ai/review/triggerdotdev/trigger.dev/pull/4457
Please reload this pagehttps://github.com/triggerdotdev/trigger.dev/pull/4457/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.