• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

stacklok / toolhive / 34208465701
71%

Build:
DEFAULT BRANCH: main
Ran 08 Sep 2026 09:17AM UTC
Jobs 1
Files 912
Run time 4min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

08 Sep 2026 09:09AM UTC coverage: 70.164% (-0.003%) from 70.167%
34208465701

push

github

web-flow
Merge commit from fork

MCPPinger and StatelessMCPPinger construct a bare http.Client{Timeout:
timeout}, which follows Go's default redirect policy: any host, up to
10 hops. The pinger's target can be a remote MCP endpoint outside our
control, so a malicious or later-compromised remote can respond with a
3xx pointing the pinger at a loopback, private, or other host-reachable
address, and the client follows it without question -- a blind SSRF
(CWE-918). Remote health-checking is opt-in via
TOOLHIVE_REMOTE_HEALTHCHECKS, so this only reaches deployments that
enabled it, but nothing in the pinger's own code enforces that scoping.

Install networking.SameHostRedirectPolicy() as CheckRedirect on both
clients. It refuses any redirect to a different host and any
HTTPS-to-HTTP downgrade, matching the same-host-only guard the package's
data-plane forwarder (followRedirects, in transparent_proxy.go) already
applies to actual MCP traffic -- the two are meant to stay in sync, per
SameHostRedirectPolicy's own doc comment. The forwarder implements its
own redirect loop instead of using this hook because it must preserve
POST method and body across every redirect code for JSON-RPC
correctness; the pingers have no such requirement (MCPPinger only sends
GET, and StatelessMCPPinger's ping payload is not something a
same-host redirect target needs verbatim), so the standard http.Client
hook is the right fit here.

Add regression coverage for both pinger types: a same-host redirect
must still be followed (the common trailing-slash/canonicalization
case), and a cross-host redirect must fail the ping without the
redirect target ever being contacted -- asserted directly on the target
server, not just on the returned error, since a pinger that returned an
error after connecting would still have completed the SSRF.

The redirect policy's own behavior (cross-host, HTTPS downgrade,
max-chain-length) is already exhaustively unit-tested in isolation at
pkg/networking/http_client_t... (continued)

4 of 4 new or added lines in 1 file covered. (100.0%)

7 existing lines in 2 files now uncovered.

79135 of 112785 relevant lines covered (70.16%)

92.35 hits per line

Coverage Regressions

Lines Coverage ∆ File
6
72.34
-6.38% pkg/secrets/keyring/keyctl_linux.go
1
96.77
-3.23% pkg/foreach/foreach.go
Jobs
ID Job ID Ran Files Coverage
1 34208465701.1 08 Sep 2026 09:17AM UTC 912
70.16
GitHub Action Run
Source Files on build 34208465701
  • Tree
  • List 912
  • Changed 5
  • Source Changed 1
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34208465701
  • 4a41d71a on github
  • Prev Build on main (#34208407303)
  • Next Build on main (#34211100349)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc