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

stacklok / toolhive / 34207786236
71%

Build:
DEFAULT BRANCH: main
Ran 08 Sep 2026 09:11AM UTC
Jobs 1
Files 912
Run time 3min
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:02AM UTC coverage: 70.18% (+0.03%) from 70.147%
34207786236

push

github

web-flow
Merge commit from fork

ToolHive's tool allowlist (--tools CLI flag, or spec.toolsFilter under the
Kubernetes operator's MCPToolConfig CRD) could be bypassed in both
directions by prefixing an MCP JSON-RPC message with a three-byte UTF-8
BOM. Go's encoding/json treats a leading BOM as a syntax error rather than
whitespace, while WHATWG-decoding consumers (the MCP TypeScript SDK,
browsers, Node) strip it silently before parsing, so the filter failed to
parse the message and forwarded it unfiltered.

In the response direction, only one of the three tools/list response
handling branches stripped the BOM; the other two did not, and a
terminal parse failure wrote the buffered body through unfiltered rather
than blocking it. In the request direction, an unmarshal failure on a
BOM-prefixed tools/call left the middleware unable to make a filtering
decision at all, forwarding the request verbatim to the backend.

Strip the BOM once, before dispatch, on both paths: in drainBuffer before
the response media-type switch, and in the tool-call middleware before
parsing, rewriting the forwarded request body (not just a parse-time
copy) so the filter and the backend can never disagree about what bytes
are being acted on. The same normalization is applied in the shared MCP
request parser, so authorization, audit, telemetry, and rate limiting all
decide on the same bytes the backend will execute.

Fixes GHSA-9v4w-3mqh-6vmm.

Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com>

6 of 6 new or added lines in 2 files covered. (100.0%)

17 existing lines in 6 files now uncovered.

79070 of 112668 relevant lines covered (70.18%)

91.73 hits per line

Coverage Regressions

Lines Coverage ∆ File
4
78.26
-1.16% pkg/transport/proxy/httpsse/http_proxy.go
4
63.89
4.27% pkg/workloads/manager.go
3
82.62
-0.24% pkg/authserver/storage/redis.go
3
61.43
-4.29% pkg/state/runconfig.go
2
56.52
-4.35% pkg/transport/session/sse_session.go
1
94.82
0.0% pkg/authserver/storage/memory.go
Jobs
ID Job ID Ran Files Coverage
1 34207786236.1 08 Sep 2026 09:11AM UTC 912
70.18
GitHub Action Run
Source Files on build 34207786236
  • Tree
  • List 912
  • Changed 13
  • Source Changed 3
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #34207786236
  • 71b05768 on github
  • Prev Build on main (#34207271580)
  • Next Build on main (#34208036424)
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