fix(security): remove rawResponse field from analyze error response - #874
Open
Esc1200 wants to merge 1 commit into
Open
fix(security): remove rawResponse field from analyze error response#874Esc1200 wants to merge 1 commit into
Esc1200 wants to merge 1 commit into
Conversation
The /api/analyze error handler included rawResponse: textContent.text.slice(0, 500) in the 502 error response, leaking the first 500 characters of the raw Claude API response to the client. This is an information disclosure vulnerability (MEDIUM) that could expose internal prompt content, API response structure, or other sensitive data returned by the upstream LLM service. The raw response is still logged server-side for debugging (log.error) but is no longer sent to the client.
ifeoluwaaj
pushed a commit
to ifeoluwaaj/vibeship-spawner-ui
that referenced
this pull request
Jun 27, 2026
Consolidates a same-author path-redaction series: - Remove tracePath from creator mission GET response (vibeforge1111#877) - Remove server path from mission active POST response (vibeforge1111#876) - Remove rawResponse field from analyze error response (vibeforge1111#874) - Remove x-spark-preview-root header leaking server path (vibeforge1111#873) - Use trusted x-real-ip / last x-forwarded-for entry for the rate-limiter client key (vibeforge1111#875) Surviving-line indentation normalized back to file style (the patches bundled an over-indentation reflow of untouched lines). Co-authored-by: Esc1200 <Esc1200@users.noreply.github.com> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Bug: Error response in
/api/analyzeleaks raw Claude API response textSeverity: MEDIUM
File:
src/routes/api/analyze/+server.ts(line 269)Problem:
When the Claude API response fails to parse, the error handler includes
rawResponse: textContent.text.slice(0, 500)in the 502 response body. This leaks the first 500 characters of the raw LLM output to the client, which may contain:Fix:
Removed the
rawResponsefield from the error response JSON. The raw response text is still logged server-side vialog.error()for debugging, but is no longer exposed to clients.Testing: