Repository navigation
feat: opt-in redact_output masks secrets in tool results - #94
Merged
Merged
Conversation
- New redact_output setting (default off): execute, execute_on_group and converted ToolError text pass through ssh_mcp.redact before returning to the client - Masks passwords/tokens/keys (key=value, quoted, Authorization, Bearer, URL password, PEM blocks); logins, e-mails, IPs and host names stay visible - Linear-time rules, run off the event loop; documented in README, CHANGELOG and servers.example.toml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opt-in
redact_output(default off). When on,execute,execute_on_groupand converted ToolError text are passed throughssh_mcp.redactbefore they reach the MCP client (an LLM agent).=), quoted values (escape-aware), Authorization / Bearer, URL passwords (login kept), PEM private keys (bounded at truncation marker / blank line /Exit code:).PWD=/path.asyncio.to_thread.Tests: 1059 pass;
tests/test_paths.py::test_ensure_root_refuses_group_or_world_accessible_rootfails on main too in a umask-0077 shell (pre-existing, unrelated).