Skip to content

fix(agent): redact MCP credentials from session logs - #4046

Merged
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/redact-mcp-auth-from-session-logs
Jul 31, 2026
Merged

fix(agent): redact MCP credentials from session logs#4046
trunk-io[bot] merged 1 commit into
mainfrom
posthog-code/redact-mcp-auth-from-session-logs

Conversation

@tatoalo

@tatoalo tatoalo commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Problem

MCP configuration can include authorization credentials. Protocol messages containing that configuration are persisted in task session logs, where the credentials are unnecessary

Generated-By: PostHog Code
Task-Id: 7ec72017-19cb-4e77-aef0-ec6cd850eaa2
@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit e77dad8.

@tatoalo tatoalo added the Stamphog This will request an autostamp by stamphog on small changes label Jul 31, 2026
@PostHog PostHog deleted a comment from trunk-io Bot Jul 31, 2026
@tatoalo
tatoalo marked this pull request as ready for review July 31, 2026 13:16
@greptile-apps

greptile-apps Bot commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "fix(agent): redact MCP credentials from ..." | Re-trigger Greptile

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small, well-tested fix that redacts Authorization header values before session logs are persisted — it reduces credential exposure rather than introducing risk, doesn't touch auth flows/data models/APIs, and has a positive Greptile review signal (👍 reaction, no concerns raised) on the current head.

  • Author wrote 0% of the modified lines and has 107 merged PRs in these paths (familiarity MODERATE).
  • 👍 on the PR from greptile-apps[bot].
Gate mechanics and policy version
Gate Result
prerequisites all clear
deny-list no deny categories matched
size 29L, 1F substantive, 68L/2F incl. docs/generated/snapshots — within ceiling
tier T1-agent / T1b-small (68L, 2F, single-area, fix)
stamphog 2.0.0b3 .stamphog/policy.yml @ 1fac094 · reviewed head e77dad8

@tatoalo
tatoalo requested a review from a team July 31, 2026 13:20
@tatoalo
tatoalo enabled auto-merge (squash) July 31, 2026 13:23
@tatoalo

tatoalo commented Jul 31, 2026

Copy link
Copy Markdown
Contributor Author

/trunk merge

@trunk-io
trunk-io Bot merged commit 0ed50b9 into main Jul 31, 2026
42 checks passed
@trunk-io
trunk-io Bot deleted the posthog-code/redact-mcp-auth-from-session-logs branch July 31, 2026 15:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants