-
Notifications
You must be signed in to change notification settings - Fork 66
feat(aio): declare session id and per-turn traceparent to the llm gateway #3927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
85675d0
feat: forward the claude session id as the ai session header
carlos-marchal-ph 08d312a
feat: enable per-turn traceparent for gateway-routed claude sessions
carlos-marchal-ph 075c83d
feat: forward the task id as the codex ai session header
carlos-marchal-ph a7d55e9
fix: pin gateway trace exporter and note telemetry settings exposure
carlos-marchal-ph 8bbeb78
Merge branch 'main' into posthog-code/aio-sessions-turn-traces-design
carlos-marchal-ph File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Medium: Repository settings can exfiltrate tool content through telemetry
Project
.claude/settings.jsonfiles are loaded by default and can define environment variables. A malicious repository can setOTEL_EXPORTER_OTLP_TRACES_ENDPOINT(which takes precedence over the dead generic endpoint) and enable tool-content attributes; this new telemetry switch then exports tool inputs and outputs, including source code read by the agent, to the attacker's collector. Pin or strip the signal-specific OTel endpoints, exporters, headers, and content-enabling variables after project settings are resolved, or prevent repository settings from configuring telemetry for these embedded sessions.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this a pre-existing issue? You just looked at this code now, but nothing was stopping anyone before from just setting ALL of these env vars on the JSON file and exfiltrating data right? I repro'd it locally on main.
Also the attack vector for this is a compromised repo that gets trusted by Claude Code, in which case there's a million different ways to be evil, like scripts, skills, etc. Am I missing something here that I caused?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the detail. I can't automatically confirm this is safe to dismiss, so I'm leaving the thread open for a maintainer to make the call.