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

stacklok / toolhive / 22755245212
64%

Build:
DEFAULT BRANCH: main
Ran 06 Mar 2026 08:32AM UTC
Jobs 1
Files 537
Run time 1min
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

06 Mar 2026 08:22AM UTC coverage: 63.875% (+0.03%) from 63.843%
22755245212

push

github

web-flow
Implement HMAC-SHA256 token binding for session security (#3964)

* Add session token binding to vMCP server

Bind MCP sessions to the bearer token used at creation time to
prevent session hijacking via stolen session IDs.

At session creation, SHA256(bearerToken) is stored in session
metadata. Each subsequent request recomputes the hash of the
presented token and compares it against the stored value. On
mismatch, the session is immediately terminated and HTTP 401 is
returned to the client.

Anonymous sessions (no token at creation) store an empty-string
sentinel and reject any follow-up request that suddenly presents
a token. Sessions predating this change (no hash in metadata)
pass through for backward compatibility.

The feature is active whenever SessionManagementV2 is enabled and
covers both the V1 and V2 session paths.

Closes: #3867

* Move token binding from middleware to session-level validation

Refactor session security to validate caller identity at the session
method level rather than via HTTP middleware, making the security
contract explicit in the API.

* move algorithm to the one matching the rfc

* changes from review

---------

Co-authored-by: taskbot <taskbot@users.noreply.github.com>

193 of 270 new or added lines in 8 files covered. (71.48%)

4 existing lines in 2 files now uncovered.

47067 of 73686 relevant lines covered (63.88%)

74.47 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
2
85.71
pkg/vmcp/session/security/security.go
3
90.09
-0.58% pkg/vmcp/server/sessionmanager/session_manager.go
4
98.24
-1.76% pkg/vmcp/session/factory.go
6
91.3
pkg/vmcp/session/hijack_prevention_decorator.go
14
78.41
-1.43% pkg/vmcp/server/telemetry.go
48
0.0
0.0% cmd/vmcp/app/commands.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
71.43
-1.68% pkg/vmcp/k8s/manager.go
2
51.71
-0.19% pkg/workloads/manager.go
Jobs
ID Job ID Ran Files Coverage
1 22755245212.1 06 Mar 2026 08:32AM UTC 537
63.88
GitHub Action Run
Source Files on build 22755245212
  • Tree
  • List 537
  • Changed 9
  • Source Changed 5
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #22755245212
  • 27e8d572 on github
  • Prev Build on main (#22754487908)
  • Next Build on main (#22757984620)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc