Skip to content

fix(webapp,redis-worker): stop logging raw metadata, alert payloads, and job items - #4403

Open
carderne wants to merge 5 commits into
mainfrom
fix/redact-run-metadata-alert-worker-logs-sec-395
Open

fix(webapp,redis-worker): stop logging raw metadata, alert payloads, and job items#4403
carderne wants to merge 5 commits into
mainfrom
fix/redact-run-metadata-alert-worker-logs-sec-395

Conversation

@carderne

@carderne carderne commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

Debug logging around run metadata writes previously included the full,
unfiltered metadata object on every flush, so credentials and other
sensitive customer-controlled data could end up in application logs. It now
logs key/operation counts and byte sizes instead, and skips the log
entirely when there is nothing buffered. The webapp logger's redaction list
also now covers metadata and seedMetadata as a backstop.

Alert webhook delivery failures no longer log the outgoing request body or
the (useless, non-serializable) HMAC signature; they log the response
status, the webhook URL host, and the relevant ids instead.

The redis-worker's failure, retry, and dead-letter logs no longer include
the raw job item. The item is still retrievable by id when needed, and the
default worker logger now filters the item key as a backstop.

Design

Each call site was already computing everything needed to reproduce or
triage a failure without the raw payload (ids, counts, sizes, statuses), so
this trades verbose-by-default logging for those cheaper, non-sensitive
signals.

Performance

Improves hot path performance relative to baseline.

…and job items

Debug logging around run metadata writes previously included the full,
unfiltered metadata object on every flush. It now logs key/operation counts
and byte sizes instead, and skips the log entirely when there is nothing
buffered. The webapp logger's redaction list also now covers `metadata` and
`seedMetadata` as a backstop.

Alert webhook delivery failures no longer log the outgoing request body or
the (useless, non-serializable) HMAC signature; they log the response
status, the webhook URL host, and the relevant ids instead.

The redis-worker's failure, retry, and dead-letter logs no longer include
the raw job item. The item is still retrievable by id when needed, and the
default worker logger now filters the `item` key as a backstop.
@changeset-bot

changeset-bot Bot commented Jul 28, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: c9e570a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 26 packages
Name Type
@trigger.dev/redis-worker Patch
@internal/run-engine Patch
@internal/schedule-engine Patch
@trigger.dev/build Patch
@trigger.dev/core Patch
@trigger.dev/python Patch
@trigger.dev/react-hooks Patch
@trigger.dev/rsc Patch
@trigger.dev/schema-to-json Patch
@trigger.dev/sdk Patch
@trigger.dev/database Patch
@trigger.dev/otlp-importer Patch
@trigger.dev/rbac Patch
@trigger.dev/sso Patch
trigger.dev Patch
@internal/dashboard-agent Patch
@internal/cache Patch
@internal/clickhouse Patch
@internal/llm-model-catalog Patch
@internal/redis Patch
@internal/replication Patch
@internal/run-store Patch
@internal/testcontainers Patch
@internal/tracing Patch
@internal/tsql Patch
@internal/sdk-compat-tests Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 28, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ddef512d-4506-46ec-98e1-d922ab0d51e7

📥 Commits

Reviewing files that changed from the base of the PR and between c9e570a and 8652947.

📒 Files selected for processing (1)
  • apps/webapp/app/services/metadata/updateMetadata.server.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • apps/webapp/app/services/metadata/updateMetadata.server.ts

Walkthrough

Logging configuration now includes metadata fields. Metadata packet handling exposes byte lengths, and metadata update logs use aggregate counts and byte sizes instead of raw objects. Webhook delivery logs include webhook/run identifiers and a sanitized URL host while excluding request payloads and signatures. Redis worker error and retry logs use job identifiers without emitting raw queue items or payloads.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description covers summary and design, but it omits most required template sections and the issue reference. Add the Closes #issue line, checklist, testing steps, changelog, and screenshots sections required by the template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: reducing raw sensitive logging in webapp and redis-worker.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/redact-run-metadata-alert-worker-logs-sec-395

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]

This comment was marked as resolved.

@carderne
carderne marked this pull request as ready for review July 28, 2026 09:59
devin-ai-integration[bot]

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant