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

stacklok / toolhive / 21248927371
60%

Build:
DEFAULT BRANCH: main
Ran 22 Jan 2026 12:52PM UTC
Jobs 1
Files 454
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

22 Jan 2026 12:44PM UTC coverage: 59.43% (+0.04%) from 59.39%
21248927371

push

github

web-flow
Skip token injection when token exchange active (#3385)

When token exchange middleware is configured, it handles its own
Authorization header injection. The oauth-token-injection middleware
was being added anyway, potentially overwriting the exchanged token
with the original OAuth token.

Add hasTokenExchangeMiddleware() to detect when token exchange is
present and skip adding the redundant token injection middleware.
Also fix the middleware name in proxy.go to use the MiddlewareType
constant for consistent detection.

In practical terms what this enables is easier testing with:
```
  thv run \
    --token-exchange-audience 'backend' \
    --token-exchange-client-id blablabla \
    --token-exchange-client-secret foobar \
    --token-exchange-scopes 'backend-api:read' \
    --token-exchange-url https://blah \
    --remote-auth-bearer-token-file $(pwd)/token.auth \
```

What the fix enables is to read the token using the remote-auth

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

13 existing lines in 4 files now uncovered.

36252 of 61000 relevant lines covered (59.43%)

80.59 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
8.55
0.0% cmd/thv/app/proxy.go
3
14.93
2.32% pkg/transport/http.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
71.43
-1.68% pkg/vmcp/k8s/manager.go
2
53.6
-0.2% pkg/workloads/manager.go
3
71.85
-1.11% pkg/ignore/processor.go
6
75.47
-5.66% pkg/secrets/keyring/keyctl_linux.go
Jobs
ID Job ID Ran Files Coverage
1 21248927371.1 22 Jan 2026 12:52PM UTC 454
59.43
GitHub Action Run
Source Files on build 21248927371
  • Tree
  • List 454
  • Changed 10
  • Source Changed 2
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #21248927371
  • aa15633e on github
  • Prev Build on main (#21244924182)
  • Next Build on main (#21249247788)
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