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

stacklok / toolhive / 30261133808
70%

Build:
DEFAULT BRANCH: main
Ran 27 Jul 2026 11:20AM UTC
Jobs 1
Files 840
Run time 2min
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

27 Jul 2026 11:13AM UTC coverage: 69.602% (+0.1%) from 69.493%
30261133808

push

github

web-flow
Audit authentication failures and webhook denials (#5874)

* Audit authentication failures and webhook denials

The audit middleware ran inside auth, the webhooks, and rate limiting,
so their rejections never produced audit events: authentication
failures (401), webhook policy denials (403), and rate-limit
rejections were invisible to the audit trail. The point of audit is to
record every request outcome, especially rejections.

Audit could not simply move outward because it reads the identity and
parsed MCP request from context values that auth and the parser create
for downstream handlers only. Extend the mutable-carrier pattern the
audit package already uses for BackendInfo: audit injects an
auth.IdentityHolder and an mcp.ParsedRequestHolder before calling the
inner chain; auth.WithIdentity (the single point every auth middleware
goes through) and the MCP parser fill them; audit reads them back
after the chain returns.

Move audit to directly inside the body-size limit on both runner
chain-builder paths, and outside the auth middleware on the vMCP Serve
path. Body-limit (413) and origin-validation (403) rejections remain
outside audit by design: body-limit must reject oversized bodies
before audit buffers request data, and origin validation is a pre-auth
DNS-rebind guard.

Stream-open events (SSE / streamable GET) are now logged on the first
response write instead of on arrival, so they carry the real outcome —
including denied stream attempts, previously invisible — and the
authenticated identity.

Fixes #5873

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017attizo5HSwpLcPoimd6Xi

* Clarify audit outcome mapping for rate-limit rejections

The comment implied rate-limit rejections were among the "denied"
outcomes; they are audited but map to outcome "failure" (429 falls in
the generic 4xx bucket; only 401/403 map to "denied"). State the
mapping explicitly.

Co-Authored-By: Claude Fable 5 <nor... (continued)

124 of 144 new or added lines in 6 files covered. (86.11%)

8 existing lines in 4 files now uncovered.

80276 of 115335 relevant lines covered (69.6%)

83.64 hits per line

Uncovered Changes

Lines Coverage ∆ File
18
91.85
5.93% pkg/audit/auditor.go
2
84.24
0.0% pkg/runner/middleware.go

Coverage Regressions

Lines Coverage ∆ File
2
93.94
-6.06% pkg/foreach/foreach.go
2
71.43
-2.86% pkg/state/runconfig.go
2
88.24
-5.88% pkg/vmcp/backendregistry/registry.go
2
94.77
-1.31% pkg/vmcp/composer/dag_executor.go
Jobs
ID Job ID Ran Files Coverage
1 30261133808.1 27 Jul 2026 11:20AM UTC 840
69.6
GitHub Action Run
Source Files on build 30261133808
  • Tree
  • List 840
  • Changed 16
  • Source Changed 6
  • Coverage Changed 16
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #30261133808
  • a6a0d4c4 on github
  • Prev Build on main (#30260076908)
  • Next Build on main (#30264573849)
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