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

stacklok / toolhive / 32059902390
70%

Build:
DEFAULT BRANCH: main
Ran 17 Aug 2026 07:29PM UTC
Jobs 1
Files 876
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

17 Aug 2026 07:21PM UTC coverage: 70.413% (+0.03%) from 70.379%
32059902390

push

github

web-flow
fix(auth): require audience when introspecting via Google tokeninfo (#6236)

* fix(auth): require audience when introspecting via Google tokeninfo

Google's tokeninfo response carries no iss claim; the GoogleProvider
synthesises iss locally, so a configured-issuer check against it is
self-satisfying and proves nothing about which OAuth client the token
was minted for. The only real binding to the deployment is the audience
check - which is skipped when audience is empty. A deployment pointed
at https://oauth2.googleapis.com/tokeninfo with no audience accepted
ANY valid Google access token, including one minted for an unrelated
attacker-controlled OAuth client.

NewTokenValidator now refuses that combination at startup instead of
silently accepting cross-client tokens at runtime.

* Fix gocyclo lint failure and address review nits

Extract JWKS-discovery resolution and the Google tokeninfo audience
check into their own functions so NewTokenValidator's cyclomatic
complexity drops back under the gocyclo threshold, which CI was
failing on. Also apply the two open review nits: trim whitespace on
the audience check and make the new test table-driven.

---------

Co-authored-by: Jakub Hrozek <jakub@stacklok.com>

30 of 30 new or added lines in 1 file covered. (100.0%)

299 existing lines in 15 files now uncovered.

85357 of 121224 relevant lines covered (70.41%)

97.91 hits per line

Coverage Regressions

Lines Coverage ∆ File
58
85.32
-0.05% pkg/auth/discovery/discovery.go
53
61.92
-0.42% pkg/auth/remote/handler.go
46
87.31
-0.83% pkg/auth/oauth/flow.go
45
87.46
0.39% pkg/auth/dcr/resolver.go
33
14.29
4.65% cmd/thv/app/proxy.go
23
90.11
-0.97% pkg/auth/tokensource/tokensource.go
20
91.03
-0.37% pkg/networking/utilities.go
6
57.89
-31.58% pkg/oauthproto/useragent.go
3
95.38
-3.0% pkg/auth/oauth/non_caching_refresher.go
3
76.7
-2.91% pkg/state/local.go
2
95.92
-4.08% pkg/auth/remote/persisting_token_source.go
2
96.27
0.0% pkg/authserver/storage/memory.go
2
93.94
-6.06% pkg/foreach/foreach.go
2
71.43
-2.86% pkg/state/runconfig.go
1
94.12
-5.88% pkg/auth/oauth/resource_token_source.go
Jobs
ID Job ID Ran Files Coverage
1 32059902390.1 17 Aug 2026 07:29PM UTC 876
70.41
GitHub Action Run
Source Files on build 32059902390
  • Tree
  • List 876
  • Changed 22
  • Source Changed 12
  • Coverage Changed 22
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #32059902390
  • 55feedf7 on github
  • Prev Build on main (#32058323050)
  • Next Build on main (#32118623127)
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