Files
flan aaed22785b
Build and Package / Build Binaries (push) Has been cancelled
Add read-only mode and unconditional secret redaction
Upstream is unsafe to point at a NAS that hosts anything of consequence:

- system_reboot is registered with an empty input schema and a handler that
  calls system.reboot immediately, so a model can take the host down in one
  unconfirmed tool call. The README's claim of dry-run on 'all write
  operations' is not accurate: dry-run is opt-in per call, and
  ExecuteWithDryRun() falls through to real execution when the argument is
  omitted.
- get_app_config returns app.config verbatim, putting database passwords,
  encryption keys and API tokens into the model's context and into any
  transcript that persists it.

-read-only is a fail-closed allowlist: 31 non-mutating tools are served, the
other 21 are refused, and anything not explicitly reviewed -- including tools
upstream adds later -- is refused by default. A denylist would silently admit
the next system_reboot. Refused tools are hidden from tools/list and rejected
at dispatch.

Redaction is unconditional, read-write mode included. A credential has no
business reaching the model, and relying on the operator to field-filter is
not a control.

Tests assert the mutating-tool list against the live registry, so an upstream
rename breaks the build instead of quietly widening the boundary.
2026-07-12 21:45:32 +00:00

24 lines
876 B
Plaintext

truenas-mcp (fork)
==================
This is a fork of truenas/truenas-mcp (https://github.com/truenas/truenas-mcp),
copyright iXsystems, Inc. and contributors, licensed under GPL-3.0. The upstream
license applies unchanged to this fork; see LICENSE.
Upstream authorship is preserved in the git history. The fork's own changes are
confined to:
tools/readonly.go read-only mode (fail-closed tool allowlist)
tools/redact.go unconditional secret redaction
tools/readonly_test.go tests for both
tools/registry.go gating hooked into ListTools / CallTool
cmd/truenas-mcp/main.go -read-only flag
README.md, CHANGELOG.md fork documentation
AI disclosure
-------------
The fork's changes listed above were written with Claude Code, and reviewed
before commit. Upstream code is unmodified apart from the registry and main
hooks noted above.