Skip to content

feat(helm): set tool approval on the muster MCPServer - #264

Merged
Rotfuks merged 12 commits into
mainfrom
tool-approval
Nov 30, 2026
Merged

Rotfuks merged 12 commits into
mainfrom
tool-approval

Conversation

@Rotfuks

@Rotfuks Rotfuks commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Milestones 1 to 3 are on this branch. Milestones 2 and 3 added two commits here (87eee6d, the values comment, schema description and README link the concept page; 9197572, chart tests: test names that contain a colon are quoted so the suite parses); agent settings, grants and the 3.x migration live in agent-manager and the agent chart (linked below). The last commit, 793070e, only condenses the docs (shorter values comments, schema descriptions and README rows; no behaviour change).

Part of giantswarm/giantswarm#38902. The review record is the first comment on this PR.

What does this PR do?

muster now decides Allow, Ask or Block for every tool call (giantswarm/muster, linked below). A connector without settings is "not reviewed" and runs unasked. This PR makes VM Manager's chart say it explicitly: muster.mcpServer.approval renders spec.approval on the muster MCPServer with rule: Allow and one entry per tool (20 tools, all Allow, the same effect as today). 20 tools, all Allow, rule Allow. go.mod: go.yaml.in/yaml/v3 moves from indirect to direct (the drift test reads the chart's YAML).

  • The value is validated by values.schema.json (rule and tools: Allow, Ask, Block; at most 512 tools); a rule of Block hides tools added later until someone sets them.
  • muster.mcpServer.approval: null clears the default and renders no spec.approval. {} does not: Helm merges an empty map into the default (README says so).
  • On a governed platform the agent-platform chart's safe list for this server makes agents asked before every tool that is not a read, whatever these defaults say.

Commits: f5377e2, c6081c7 (the value, template, schema, chart tests), 7d0952c, 5de2701, c58494f (Block rule, README, tests), 7c3d461 (tip); 87eee6d (milestones 2 and 3: the values comment, schema description and README link the tool approval concept page as optional further reading); 9197572 (chart tests: quote test names that contain a colon so the suite parses); 793070e (docs condensed).

One commit is unrelated to tool approval and harmless: fix(proc): build seccomp support on Linux only (7c3d461) adds the missing //go:build linux tag to internal/runtime/proc/seccomp.go, so go test ./internal/api (and with it the drift test) builds on macOS. Linux builds are unchanged.

What is the effect of this change to users?

None by itself: every tool stays Allow. The settings become visible and editable in the portal's connector Tools tab once muster carries tool approval.

How does it look like?

Not a visual change. Rendered MCPServer:

spec:
  approval:
    rule: Allow
    tools:
      <tool name>: Allow

Changes from the plan

Where this PR differs from the design in the epic (giantswarm/giantswarm#38902):

  • rule: Block. The chart value and schema accept Block as the rule for tools without their own entry, in addition to Allow and Ask.
  • Governed platforms. Where a platform is governed, muster asks agents before every tool of this server that is not on the platform's safe list for it, whatever these defaults say, instead of asking only for an exact list of tool names.
  • Delivery. One pull request per repository carries all three milestones, instead of one pull request per slice.

Any background context you can provide?

  • Epic giantswarm/giantswarm#38902, PRD slice 7 (every chart that ships an MCPServer sets its approval explicitly).
  • Needs muster's CRD with spec.approval. An older CRD prunes the field (the API server warns) and a later muster upgrade does not re-apply it: after the CRD upgrade run flux reconcile helmrelease <name> -n <ns> --force. Until then muster treats the connector as not reviewed (Allow). muster refuses server tool calls while its served CRD lacks the field.
  • Merge after the muster release; the agent-platform PR names the safe list and governance.

Related pull requests (milestones 1 to 3)

Repository PR Role
muster giantswarm/muster#1912 enforcement, approval page, governance, agent settings and grants
backstage giantswarm/backstage#3655 portal: connector and agent tool settings, session prompt, inline approval card
klaus-gateway giantswarm/klaus-gateway#618 Slack prompt and return
agent-platform giantswarm/agent-platform#1495 governance value, safe lists, wiring, agent chart 3.x guard and migrate preflight, the portal's own client and trusted-client wiring
agent-manager giantswarm/agent-manager#483 chart default, per-agent approval settings and grants, migrate 2.x to 3.x
model-manager giantswarm/model-manager#462 chart default
cluster-manager giantswarm/cluster-manager#359 chart default
workspace-manager giantswarm/workspace-manager#229 chart default
toolchain-manager giantswarm/toolchain-manager#100 chart default
skill-manager giantswarm/skill-manager#48 chart default
agent-platform-mcps giantswarm/agent-platform-mcps#108 chart defaults for the families
agent giantswarm/agent#143 agent chart 3.0: tools and default, requireApproval removed
agent-skills giantswarm/agent-skills#90 agent management skill
agent-platform-operator giantswarm/agent-platform-operator#74 organization chart source follows the configuration
giantswarm-platform-manager giantswarm/giantswarm-platform-manager#1053 governance as a typed input, second-person review
agentlab giantswarm/agentlab#1355 lab: governed mode docs, the portal's Dex client, the portal's workload token

What is needed from the reviewers?

  • Read the review record first.
  • Confirm that Allow all is the intended default for this management server on a trusted platform (the PRD says it is).

Do the docs need to be updated?

Done: README row for muster.mcpServer.approval and the values comment (governed default, Block, null versus {}).

Testing

Check Result
helm lint ok
helm template default, approval=null, rule=Block, rule=Deny, tools.bogus=maybe map rendered; none rendered; Block renders; the others refused by the schema, naming the path
Names in the map versus the server's registered tools identical sets (20 of 20)
Chart unit tests in helm/vm-manager/tests/ updated; helm unittest not run (plugin not installed on the reviewers' machine), cases reproduced with helm template
Go drift test internal/api/helm_approval_test.go (c58494f) compares the chart's approval map with the server's registered tool names. It passed in the agentlab re-test on c58494f, cross-compiled for Linux and run in a Linux container (it did not build on macOS before 7c3d461). CI runs it.

Helm v4.3.2. Not exercised in the first agentlab run (its agent-manager was pinned to 3.4.0 and did not use this chart's defaults). The agentlab re-test (2026-11-25, lab-tests/m1-retest.md) passed with no blocking defects; it ran this repo's drift test (see above). The milestone 2 and 3 lab runs (2026-11-26, lab-tests/m2-integration.md, m3-integration.md) ran the platform with tool approval per agent and the agent chart 3.x move; they did not exercise this chart's defaults.

Render spec.approval on the chart's MCPServer from muster.mcpServer.approval,
with the "Allow all" preset: rule Allow and every tool of this release named
Allow. These are the platform's own management servers, called by the Dev Portal
as the signed-in person; agent callers are asked by muster's floors and the
governance mode. An installation tightens a tool in its values (Ask or Block).
Helm merges an empty map into the chart's default, so only null renders no spec.approval.
@circleci-architect

circleci-architect Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Published Helm chart vm-manager

0.29.17-r27740a5ft20261130162044h242ea98
Chart vm-manager
Version 0.29.17-r27740a5ft20261130162044h242ea98
OCI reference oci://gsoci.azurecr.io/charts/giantswarm/vm-manager:0.29.17-r27740a5ft20261130162044h242ea98
Digest sha256:b59f1c5a8e760a7bfad80c8924ececa9908fa1b272fe9de3327a8b3ebf427318
Registry public — gsoci.azurecr.io
Git catalog giantswarm-test-catalog (index)
Pull this chart
helm pull oci://gsoci.azurecr.io/charts/giantswarm/vm-manager --version 0.29.17-r27740a5ft20261130162044h242ea98

Posted by architect-orb · build 5513 · commit 242ea98 · updated in place on every push

@Rotfuks

Rotfuks commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Review record

Part of giantswarm/giantswarm#38902 (tool approval, milestone 1). Purpose: this record says what was reviewed on this branch (the chart's per-tool approval defaults for its MCPServer registered with muster: muster.mcpServer.approval), by whom and with which outcome, so that reviewers can skip what is covered. Branch tool-approval is 8 commits on 659f32b, tip 9197572. Hashes are those of the pushed tool-approval branch.

Read this first

  • One independent chart review of this repository and an independent re-check of the fix round. 2 findings here, all closed; the re-check verified all but one partial (a test that does not build on macOS, see below).
  • The Allow-on-write findings are closed by the governed mode in the agent-platform chart (safe lists, floors in muster), not by changing this chart's defaults: on trusted the defaults stay Allow, by design.
  • The last docs-only commit (87eee6d, a comment linking the concept page as optional further reading) was read in a delta review of the component charts (Sonnet): no finding. 7c3d461 (builds the seccomp support on Linux only) was read too. Not run by anyone: helm unittest, helm-docs (README row checked by presence), a cluster: how an API server treats a field an old CRD lacks was reasoned, not observed.

Review rounds

# Round Scope Reviewer Kind Result
1 Chart review 659f32b..c6081c7 (2 commits: f5377e2, c6081c7) Claude Sonnet, independent of the implementer, implementer's notes not read code 2 findings
2 Fix round 7d0952c, 5de2701, c58494f implementer fix findings closed, plus the Block rule (rule: Block accepted by schema and template)
3 Re-check of the fix round tool-approval clean tree, commits as listed; helm lint, helm template (default, rule=Block, rule=Deny, approval=null); drift test run Claude Sonnet 5.5, independent re-check 1 verified, 1 partial
4 Lab retest the chart-drift Go test; no cluster rendering of this chart tester lab pass
5 OSS-neutrality audit added lines read-only audit audit 1 docs finding (a vendor docs link in a values comment); fixed in 87eee6d
6 Fix 7c3d461 implementer fix the package builds on Linux only (seccomp support) so the drift test can run on macOS; found by the lab retest
7 Fix 9197572 implementer fix quote test names that contain a colon so the suite parses (chart tests only)
8 Delta review, charts and portal after the earlier re-check: 87eee6d, 9197572, 7c3d461; all added lines read Claude Sonnet 5.5, independent code no finding; the non-Linux stub of 7c3d461 returns an error that proc.go turns into a refused start

What was checked

Check Result
Names in the map versus the tools registered (git grep over the Go source and the schema) identical sets (20 of 20); no missing, stale or mistyped name
Default render has the map rule: Allow and every tool Allow (20 tools)
approval: null none rendered
approval: {} in a values file defaults stay (documented: null, not {}, clears)
Invalid values (rule=Deny, tools.bogus=maybe, approval.extra=1) rejected by the schema, naming the path. The templates do not validate; the CRD's CEL refuses an invalid value that skips the schema
rule: Block renders (schema and template accept it)
helm lint, YAML validity of the default render ok
Conventions conventional commits, no !, no attribution; CHANGELOG.md and the chart version untouched; README row present

go.mod: go.yaml.in/yaml/v3 moves from indirect to direct (the drift test reads the chart's YAML). The drift test package did not build on macOS (Linux-only internal/runtime/proc/seccomp.go without a build tag); 7c3d461 builds it on Linux only. The lab retest ran the test as a cross-compiled GOOS=linux binary in a Linux container: pass. The re-check also saw unix.Fallocate in internal/storage fail on macOS; that was not re-examined after 7c3d461.

Findings

ID Severity Title Outcome Re-check
M1-vm-manager-01 major exec_vm, create_vm, delete_vm, forward_port are Allow: an agent can run commands in any VM it reaches obsolete: on governed, exec_vm, create_vm, delete_vm, forward_port and delete_network ask agents (not on the safe list; get_vm_console left off too); trusted stays Allow by design verified
M1-vm-manager-02 nit no drift test fixed in c58494f (Go test) partial: compiles for linux and the 20 names equal the 20 ToolNames() constants by hand; did not build on macOS

Drift test: c58494f compares the chart's map with the tools the server registers. Run result: pass in a Linux container (lab retest); not executable on macOS before 7c3d461, fix not re-run on macOS.

Lab verification

This chart was not rendered in the agentlab runs: they used the released component charts (agent-manager is the exception, see its record). Rendering, schema and the per-tool map are covered by the checks above. The governed behaviour for this server (safe list, floors) is a property of the platform chart and muster, which were exercised in the lab; this server itself did not run there.

Open items

Findings still open or partly fixed: none; every finding of this repository is closed. Remaining notes:

Item What remains Why it is acceptable now
Old CRD A chart applied before muster's CRD upgrade needs a forced reconcile (flux reconcile helmrelease --force) Documented in the README and the platform chart's UPGRADE.md; muster refuses all server tools while the CRD lacks the field
Trusted mode Allow all stays the default on trusted By design; owner decision
macOS test build 7c3d461 was not re-run on macOS; a second Linux-only file (unix.Fallocate in internal/storage) was seen failing there CI runs on Linux

Never run:

  • helm unittest locally (the chart tests were reproduced with helm template) and helm-docs (the README row was checked by presence).
  • A cluster: how an API server treats a field an old CRD lacks was reasoned, not observed; the chart was not rendered in any agentlab run, so its defaults were never exercised there.
  • A real Slack, a browser, a remote-target cluster and Flux remediation: not applicable to this chart.

@QuentinBisson

Copy link
Copy Markdown
Contributor

Review supplement for giantswarm/giantswarm#38902

Reviewed head: 86fbf602cd7e07002afe6e857355f66040a47186 (rechecked unchanged). Compared the epic, linked PRD and subsequent design decisions with the implementation and existing local review record. Focus: MCPServer approval defaults, template, values schema/documentation and regression assertions; Linux seccomp build constraints and fail-closed non-Linux stub. This supplements those reviews; it does not claim to rerun their tests or independently verify every generated fixture/test assertion.

Spec

The platform-management connector intentionally ships explicit Allow entries plus an Allow fallback. Governed safe lists and built-in muster floors remain additional restrictions; destructive Allow entries alone are not a spec violation. Install only after muster's CRD supports spec.approval.

This is a scoped contract assessment, not an exhaustive numbered acceptance score. Independent focused specification cross-checks covered the core enforcement/client contracts and platform/manager integration. Declared follow-ups and accepted design changes are not counted as new defects.

Blocking

No new blocking code finding established in this pass.

Non-blocking

None newly established.

Suggestions

None beyond the existing review follow-ups.

Deep verification

Aspect Status Evidence / limit
Problem confirmed on base n/a: feature slice The diff introduces the approval-related contract reviewed here; no claim of a locally reproduced base failure.
Fix addresses named root cause covers inspected scope Relevant changed paths traced against the scoped requirement.
Spec criteria met qualitative; no exhaustive score See Spec above.
Tests pin the contract static evidence Default/override/removal and enum regression assertions inspected; no local render or test execution.
Correct (edge cases) no additional defect established Inspected changed contracts and cross-repository dependencies; not a proof of all interleavings.
Standard mechanism existing patterns used MCPServer spec.approval, Helm toYaml/values schema and PRD Allow/Ask/Block terms.
Standard names sourced MCP/Kubernetes identifiers and PRD terminology; no new naming finding.
Security boundaries static review only Policy is enforced by muster, not annotations; chart changes add no workload privilege.
Simplest fix retain approach Small declarative chart change; no alternate implementation needed.
Reuse check no new duplication finding Existing surrounding helpers/patterns inspected within the stated scope.
CI checks green reported checks / skips See CI note below.
Pipeline gates unverified locally PR code execution prohibited in this session.
Findings 0 blocking / 0 non-blocking / 0 suggestions Findings above supplement the existing review record.
Merge danger two-way door this connector's default tool policy.

Reported checks passed or were skipped; no failed/cancelled check to triage. A skipped job is not evidence that its gate ran.

Unverified locally: applicable builds, tests (including race/integration/envtest), vet, formatting/lint/pre-commit, generators, Makefile verification targets, Helm rendering/schema/unit checks, and browser/live-cluster flows. No PR code was executed. GitHub-reported CI provides supporting evidence, not a local reproduction.

Recommendation: merge as-is within this review's scope, subject to existing release-order/rollout prerequisites and previously documented open items.

Team context: none.

@Rotfuks
Rotfuks marked this pull request as ready for review November 30, 2026 08:36
@Rotfuks
Rotfuks requested a review from a team as a code owner November 30, 2026 08:36
go.mod: main's dependency versions, go.yaml.in/yaml/v3 kept direct as
go mod tidy has it.

Drop the non-Linux seccomp stub (seccomp_other.go) and the Linux build
tags this branch added: main's sandbox replaced startDenyingIOUring and
made the proc package Linux-only, so the stub was dead code.
@Rotfuks

Rotfuks commented Nov 30, 2026

Copy link
Copy Markdown
Contributor Author

Review record — merge round

Part of giantswarm/giantswarm#38902. Reviewer: Claude Fable 5.2, independent of the implementing and merging model, read-only, verdicts formed from the code. Full review: reviews/final/merge-round-2-review.md in the epic's workspace.

Covers the merge of main b2d0bfe (conflict in go.mod; non-Linux seccomp stub and Linux build tags removed). Result: no findings.

  • Against main the tip differs only in go.mod (one line), the chart's approval settings and internal/api/helm_approval_test.go. internal/runtime is byte-identical to main.
  • The removed stub (seccomp_other.go) was dead: nothing references startDenyingIOUring or errNoIOUringDeny, and main made the package Linux-only.
  • go mod tidy -diff is clean; go.yaml.in/yaml/v3 is direct because the approval test imports it; go.sum equals main's.

Run: GOOS=linux go build ./... and go vet on internal/runtime and internal/api (pass). Tests not run locally (Linux only); CI at the tip passes.

@Rotfuks
Rotfuks merged commit a02e258 into main Nov 30, 2026
20 checks passed
@Rotfuks
Rotfuks deleted the tool-approval branch November 30, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants