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

stacklok / toolhive / 24560432784
66%

Build:
DEFAULT BRANCH: main
Ran 17 Apr 2026 10:32AM UTC
Jobs 1
Files 637
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 Apr 2026 10:26AM UTC coverage: 66.13% (-0.03%) from 66.159%
24560432784

push

github

web-flow
Add name attribute alias on Resource entities (#4907)

The enterprise Cedar schema (platform-authz branch, 02-cedar-compilation.md
§ entity types) declares "name" as a required String attribute on all three
entity kinds — Tool, Prompt, and Resource. Tool and Prompt entities already
had "name" populated by CreateResourceEntity, but authorizeResourceRead
built its own attributes map with only "uri", so Resource entities lacked
the attribute and would fail schema validation when the enterprise
controller compiles policies.

Add "name": resourceURI alongside the existing "uri": resourceURI in
authorizeResourceRead so Resource entities satisfy the schema.

In CreateResourceEntity, default "name" to resourceID only when the
caller has not already provided one — authorizeResourceRead sets name
to the original unsanitized URI before passing the sanitized form as
resourceID, and the caller's value must survive.

Preserving the caller-provided name also exposes the original URI to
policies, so authors can match on the form they actually know (e.g.
resource.name == "file:///...") rather than the Cedar-sanitized entity
ID.

E2E tested in a Kind cluster with real Entra ID tokens:

  permit(principal in THVGroup::"mcp-admin",
         action == Action::"call_tool",
         resource in MCP::"entra-role-test")
    when { resource.name == "echo" };

  Entra JWT: { "roles": ["mcp-admin", "developer"] }

  call_tool "echo" -> 200 (resource.name matches)
  call_tool "nonexistent_tool" -> 403 (name mismatch)

Fixes #4766

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>

7 of 7 new or added lines in 2 files covered. (100.0%)

46 existing lines in 7 files now uncovered.

57529 of 86994 relevant lines covered (66.13%)

62.91 hits per line

Coverage Regressions

Lines Coverage ∆ File
14
74.44
-5.19% pkg/client/config.go
11
69.23
-14.1% pkg/client/discovery.go
8
23.56
0.57% pkg/client/manager.go
6
76.15
-5.5% pkg/secrets/keyring/keyctl_linux.go
3
71.85
-1.11% pkg/ignore/processor.go
2
73.63
-0.64% pkg/runner/config.go
2
82.29
-0.21% pkg/vmcp/composer/workflow_engine.go
Jobs
ID Job ID Ran Files Coverage
1 24560432784.1 17 Apr 2026 10:32AM UTC 637
66.13
GitHub Action Run
Source Files on build 24560432784
  • Tree
  • List 637
  • Changed 12
  • Source Changed 2
  • Coverage Changed 12
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #24560432784
  • cfd835cd on github
  • Prev Build on main (#24552699987)
  • Next Build on main (#24565531309)
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