You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Command guard refuses harmless searches for "halt" or "poweroff" -- mcp-server/src/utils/ssh-api.ts:21. The pattern /\b(shutdown\s+-h|halt|poweroff)\b/i is tested against the whole command, including user search text that homelab_logSearch puts in the command (logSearch.ts:45). homelab_logSearch {pattern: "poweroff"} returns UnsafeCommandError. Fix: only match these words in command position (start of command, or after ;, &&, ||, |, sudo), and add a test that a logSearch for "poweroff" is allowed.
homelab_certRenew with domain always forces renewal -- mcp-server/src/tools/certRenew.ts:44 runs certbot renew --cert-name <domain> --force-renewal. An agent that retries reissues the certificate each time and can hit Let's Encrypt's duplicate-certificate limit (5 per week). Fix: drop --force-renewal by default and add an explicit force boolean (default false) with the rate-limit warning in its description.
homelab_inventorySync ignores per-node HOMELAB_ANSIBLE_INVENTORY -- mcp-server/src/tools/inventorySync.ts:22 reads process.env directly, while every other setting goes through nodeSetting() so HOMELAB_NODES env overrides apply (Per-service config ignores the node param; sshTest reports the wrong host #106). Fix: setting(args.node, "HOMELAB_ANSIBLE_INVENTORY", "/etc/ansible/hosts").
Acceptance criteria
Each item fixed with a unit test.
Getting started
Relevant files: listed per item
How to run tests: cd mcp-server && npm install && npm test
Filed by repo-audit/full-audit at a59395f. Severity: low. Effort: S. audit-key: bug|mcp-server/src/tools|small-tool-bugs-a59395f
Fixed in e7e2db1. logSearch now sends the pattern base64-encoded and decodes it on the node, so searches for "poweroff"/"halt" pass the guard (guard unchanged); certRenew only adds --force-renewal with the new force: true; inventorySync reads HOMELAB_ANSIBLE_INVENTORY via nodeSetting(). Each has a unit test (417 passing), and the base64/grep transport was checked in a shell with quote, leading-dash and $(...) patterns.
Activity
TMHSDigital commentedon Nov 18, 2026
Fixed in e7e2db1. logSearch now sends the pattern base64-encoded and decodes it on the node, so searches for "poweroff"/"halt" pass the guard (guard unchanged); certRenew only adds
--force-renewalwith the newforce: true; inventorySync readsHOMELAB_ANSIBLE_INVENTORYvianodeSetting(). Each has a unit test (417 passing), and the base64/grep transport was checked in a shell with quote, leading-dash and$(...)patterns.fix: restore LF line endings in inventorySync.ts