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

stacklok / toolhive / 24410505212
66%

Build:
DEFAULT BRANCH: main
Ran 14 Apr 2026 04:28PM UTC
Jobs 1
Files 618
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

14 Apr 2026 04:23PM UTC coverage: 65.646% (+0.05%) from 65.594%
24410505212

push

github

web-flow
Add --remote-auth-scope-param-name for non-standard OAuth scope parameters (#4712)

* Add --remote-auth-scope-param-name flag for non-standard OAuth scope parameters

Some OAuth providers use non-standard query parameter names for scopes
in the authorization URL. For example, Slack's OAuth v2 requires
user-token scopes in "user_scope" instead of the standard "scope"
parameter. This causes ToolHive's OAuth flow to fail with invalid_scope
errors when connecting to providers like Slack's MCP server.

Add a new --remote-auth-scope-param-name flag that allows users to
override the query parameter name used for scopes. When set, scopes are
sent under the specified parameter name and the standard "scope"
parameter is cleared. The oauth2Config.Scopes field is preserved so
token refresh requests continue to work correctly.

Signed-off-by: Gustavo Gomez <gmogmz@indeed.com>

* Address review feedback: fix empty scope= and OIDC fallback path

- Replace SetAuthURLParam("scope", "") with temporarily nil-ing
  oauth2Config.Scopes before AuthCodeURL, then restoring via defer.
  This omits the scope parameter entirely instead of producing an
  invalid empty scope= (RFC 6749 §3.3).
- Propagate ScopeParamName on the OIDC discovery fallback path in
  createOAuthConfig, so --remote-auth-scope-param-name works with
  --remote-auth-issuer as well.
- Strengthen test assertion to verify scope parameter is truly absent,
  not just empty-valued.

Signed-off-by: Gustavo Gomez <gmogmz@indeed.com>

* Fix missing swagger docs for scope_param_name field

Signed-off-by: Gustavo Gomez <gmogmz@indeed.com>

---------

Signed-off-by: Gustavo Gomez <gmogmz@indeed.com>

24 of 59 new or added lines in 7 files covered. (40.68%)

5 existing lines in 2 files now uncovered.

57134 of 87034 relevant lines covered (65.65%)

63.12 hits per line

Uncovered Changes

Lines Coverage ∆ File
18
9.23
-0.06% cmd/thv/app/proxy.go
11
37.59
-0.13% pkg/auth/remote/handler.go
3
31.82
-0.16% cmd/thv/app/run_flags.go
3
77.04
-0.31% pkg/auth/discovery/discovery.go

Coverage Regressions

Lines Coverage ∆ File
3
71.85
-1.11% pkg/ignore/processor.go
2
82.29
-0.21% pkg/vmcp/composer/workflow_engine.go
Jobs
ID Job ID Ran Files Coverage
1 24410505212.1 14 Apr 2026 04:28PM UTC 618
65.65
GitHub Action Run
Source Files on build 24410505212
  • Tree
  • List 618
  • Changed 18
  • Source Changed 9
  • Coverage Changed 18
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24410505212
  • b250b906 on github
  • Prev Build on main (#24408864584)
  • Next Build on main (#24410776958)
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