Drop build fingerprint from proxy /health response - #6280
Merged
Conversation
The proxy /health endpoint must stay unauthenticated so Kubernetes
liveness and readiness probes can reach it, but it returned a full build
fingerprint — version, commit, build date, Go runtime version, and
GOOS/GOARCH — with no flag and no redaction. ToolHive already made the
opposite call in the vMCP server (returns only {"status":"ok"}) and the
v1 API (204 No Content), both with security comments about not disclosing
version information on an unauthenticated path. The proxies did not follow
that decision.
Remove the Version field from HealthResponse so the unauthenticated body
carries no build fingerprint, aligning the proxies with vMCP and the v1
API. Status, transport, and MCP backend status remain so probes keep the
degraded-state signal.
Part of #6271
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6280 +/- ##
==========================================
+ Coverage 72.75% 72.77% +0.01%
==========================================
Files 742 742
Lines 77325 77324 -1
==========================================
+ Hits 56258 56270 +12
+ Misses 17107 17076 -31
- Partials 3960 3978 +18 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
rdimitrov
approved these changes
Aug 10, 2026
10 tasks
11 tasks
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.
Summary
The proxy
/healthendpoint (pkg/healthcheck/healthcheck.go) setVersion: versions.GetVersionInfo()on its response unconditionally — no flag, no redaction — exposing version, commit, build date,runtime.Version(), andGOOS/GOARCH. The endpoint must stay unauthenticated so Kubernetes liveness/readiness probes can reach it, so the fix is not "put/healthbehind auth" — it is to stop disclosing the build fingerprint.ToolHive already made this call twice, and the proxies simply did not follow it:
pkg/vmcp/server/server.goreturns only{"status":"ok"}, with a security comment that it exposes no version information to prevent disclosure.pkg/api/v1/healthcheck.goreturns204 No Content.This is Finding F of #6271.
Versionfield fromHealthResponseand stop callingversions.GetVersionInfo(), so the unauthenticated body carries no version, commit, build date, Go version, or platform.status,transport, and MCP backend status so probes retain the degraded-state signal (/healthstill returns 503 when unhealthy).Part of #6271
Type of change
Test plan
task test)task lint-fix)Updated
pkg/healthcheck/healthcheck_test.go: dropped theVersionassertions and addedassertNoFingerprint, which asserts the serialized/healthbody contains none ofversion,commit,build_date,go_version,platform.API Compatibility
v1beta1API, OR theapi-break-allowedlabel is applied and the migration guidance is described above.Does this introduce a user-facing change?
Yes. The proxy
/healthJSON response no longer includes aversionobject (version/commit/build date/Go version/platform). Anyone parsing that field from/healthshould read version information from an authenticated source instead.Generated with Claude Code