fix : prevent bun response headers from leaking into transaction telemetry#19811
fix : prevent bun response headers from leaking into transaction telemetry#19811naaa760 wants to merge 1 commit intogetsentry:developfrom
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
| if (response?.status) { | ||
| setHttpStatus(span, response.status); | ||
| isolationScope.setContext('response', { | ||
| headers: response.headers.toJSON(), |
There was a problem hiding this comment.
Missing regression test for the header leak fix
Low Severity
This fix PR removes response headers from the isolation scope context but does not include a regression test verifying that the response context set via isolationScope.setContext contains only status_code and no headers. A test asserting the absence of headers in the response context would prevent this leak from being reintroduced. The review rules require fix PRs to include at least one test that covers the regression being fixed.
Triggered by project rule: PR Review Guidelines for Cursor Bot
|
Hey @naaa760 thanks for opening this PR! I thought about this a bit and while I think removing the unconditional |


What: Stop storing Bun response headers on the isolation scope.
Why: Response headers (including Set-Cookie) could leak into transaction telemetry.
How: Only keep status_code in the Bun response context, no headers.
fix : #19790