Skip to content

fix(proxy): remove unauthenticated _proxy_debug disclosure endpoint - #882

Merged
blove merged 1 commit into
mainfrom
blove/remove-proxy-debug-endpoint
Aug 31, 2026
Merged

fix(proxy): remove unauthenticated _proxy_debug disclosure endpoint#882
blove merged 1 commit into
mainfrom
blove/remove-proxy-debug-endpoint

Conversation

@blove

@blove blove commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

/api/_proxy_debug answered any unauthenticated caller on both examples.threadplane.ai and demo.threadplane.ai with:

  • apiKeyPrefix — the first 10 characters of LANGSMITH_API_KEY
  • backendUrl / targetUrl — the upstream LangGraph Cloud deployment hostname
  • hasDatabaseUrl, rateLimitConfigured, instanceId, and the request referer

Verified live on both domains before this change.

Why it was reachable. The branch returned before the rate-limit and body-size gates, and the origin allowlist above it only rejects when an Origin header is present — a plain curl (or any server-to-server call) skipped the 403 and fell through to a wildcard CORS header.

Severity. Not a credential compromise: lsv2_pt_ is LangSmith's standard token prefix, so only two of the ten disclosed characters carry secret entropy — I don't think this alone warrants rotating the key. The more meaningful exposure is the upstream deployment URL, which bypasses this proxy's origin allowlist and rate limiting, plus confirmation of environment layout.

Blast radius of removal. Nothing in CI, tests, or any runbook referenced it — the only mentions are historical plan docs from the original deploy work. The path now proxies upstream like any other (404s from the backend).

Adds a regression test that asserts the path is forwarded rather than short-circuited and that no proxy-authored response body carries the key or its prefix. Mutation-verified: it fails against the removed code and passes against this fix.

🤖 Generated with Claude Code

/api/_proxy_debug answered any caller with a 10-char prefix of
LANGSMITH_API_KEY, the upstream LangGraph deployment URL, and
environment facts (hasDatabaseUrl, instanceId). It returned before the
rate-limit and body-size gates, and the origin allowlist above it only
rejects when an Origin header is present — so a plain curl reached it on
both examples.threadplane.ai and demo.threadplane.ai.

Nothing in CI, tests, or runbooks used it; the only references are
historical plan docs. The path now proxies upstream like any other.

Adds a regression test, mutation-verified to fail against the removed code.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
threadplane Ready Ready Preview Aug 31, 2026 1:48am

Request Review

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Automated approval: this PR received an intelligent (AI) code review. See the review comments on this PR.

@blove
blove enabled auto-merge (squash) August 31, 2026 01:46
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Claude finished @blove's task in 0s —— View job


I'll analyze this and get back to you.

@blove
blove merged commit 95cf5e5 into main Aug 31, 2026
22 checks passed
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