Closes three repo-review findings on the read-only truenas-mcp fork:
31b71cdf3ed2tools/registry.go — handleQueryPools embedded the raw pool.query response in a parse-error string, bypassing the RedactJSON choke point (handler errors return unredacted). Now redacted.
29004c292008tools/redact.go — a secret inside an opaque string blob (a custom app's compose YAML from get_app_config) passed through unmasked. redactValue now scans the interior of string values for secret-keyed key: value / key=value lines; non-secret lines and prose are untouched. The redact_gaps test that documented the gap is flipped to assert it's closed.
a1fde5826854tasks/poller.go — MaxPollAttempts was declared ("0 = unlimited") but never read, reading as a safety cap that wasn't enforced. Now honored (0 stays unlimited, so default behavior is unchanged).
go build, go vet, and go test ./tools/... ./tasks/... all pass.
Closes three repo-review findings on the read-only truenas-mcp fork:
- **`31b71cdf3ed2`** `tools/registry.go` — `handleQueryPools` embedded the raw `pool.query` response in a parse-error string, bypassing the `RedactJSON` choke point (handler errors return unredacted). Now redacted.
- **`29004c292008`** `tools/redact.go` — a secret inside an opaque string blob (a custom app's compose YAML from `get_app_config`) passed through unmasked. `redactValue` now scans the interior of string values for secret-keyed `key: value` / `key=value` lines; non-secret lines and prose are untouched. The `redact_gaps` test that documented the gap is flipped to assert it's closed.
- **`a1fde5826854`** `tasks/poller.go` — `MaxPollAttempts` was declared ("0 = unlimited") but never read, reading as a safety cap that wasn't enforced. Now honored (0 stays unlimited, so default behavior is unchanged).
`go build`, `go vet`, and `go test ./tools/... ./tasks/...` all pass.
- redact.go: scan the interior of string values for secret-keyed
key:value / key=value assignments, so a POSTGRES_PASSWORD embedded in a
custom app's compose YAML (returned by get_app_config as one blob) is
masked instead of reaching the model context. Non-secret lines and
ordinary prose are left byte-for-byte unchanged.
- registry.go: run the raw pool.query response through RedactJSON before
embedding it in handleQueryPools' parse-error string; handler errors are
returned unredacted, bypassing the normal choke point.
- poller.go/types.go: honor PollerConfig.MaxPollAttempts. It was declared
("0 = unlimited") but never read, so it read as a safety cap that wasn't
enforced. A task now fails once it exhausts the cap; 0 stays unlimited,
so default behavior is unchanged.
Flips the redact_gaps compose-blob test from asserting the gap to
asserting it is closed.
flan
merged commit b3632375af into main2026-07-19 16:07:34 -04:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes three repo-review findings on the read-only truenas-mcp fork:
31b71cdf3ed2tools/registry.go—handleQueryPoolsembedded the rawpool.queryresponse in a parse-error string, bypassing theRedactJSONchoke point (handler errors return unredacted). Now redacted.29004c292008tools/redact.go— a secret inside an opaque string blob (a custom app's compose YAML fromget_app_config) passed through unmasked.redactValuenow scans the interior of string values for secret-keyedkey: value/key=valuelines; non-secret lines and prose are untouched. Theredact_gapstest that documented the gap is flipped to assert it's closed.a1fde5826854tasks/poller.go—MaxPollAttemptswas declared ("0 = unlimited") but never read, reading as a safety cap that wasn't enforced. Now honored (0 stays unlimited, so default behavior is unchanged).go build,go vet, andgo test ./tools/... ./tasks/...all pass.- redact.go: scan the interior of string values for secret-keyed key:value / key=value assignments, so a POSTGRES_PASSWORD embedded in a custom app's compose YAML (returned by get_app_config as one blob) is masked instead of reaching the model context. Non-secret lines and ordinary prose are left byte-for-byte unchanged. - registry.go: run the raw pool.query response through RedactJSON before embedding it in handleQueryPools' parse-error string; handler errors are returned unredacted, bypassing the normal choke point. - poller.go/types.go: honor PollerConfig.MaxPollAttempts. It was declared ("0 = unlimited") but never read, so it read as a safety cap that wasn't enforced. A task now fails once it exhausts the cap; 0 stays unlimited, so default behavior is unchanged. Flips the redact_gaps compose-blob test from asserting the gap to asserting it is closed.