Repository navigation
fix(security): keep NBI's config files out of agent file tools and shell output - #549
Draft
FelipeRamos-neuro wants to merge 4 commits into
Draft
FelipeRamos-neuro wants to merge 4 commits into
FelipeRamos-neuro wants to merge 4 commits into
Conversation
A key stored in config.json was sent to the browser in clear text and filled a plain input. The capabilities response now carries a mask in its place (model lists, stored chat_model and inline_completion_model entries, claude_settings and acp_settings), ConfigHandler maps a posted mask back to the stored key, and the key inputs are password fields. LLMProviderProperty gains an opt-in `secret` flag. Closes plmbr#542
…files The Claude-mode server list masks every env and headers value. The NBI MCP editor masks credential-named values in the temp copy it writes to the workspace and restores them on save; a mask with nothing stored behind it is refused with a 400. Closes plmbr#543
run_claude_cli scrubs the env and argv values it was given, then runs the shared redactor. Claude-mode stream errors, the bail-out message and the related log lines are redacted too. Closes plmbr#544
…ell output The file tools, search_files and Chatbook mentions refuse NBI's own config files (resolved path and file identity, so links count). Shell output now also redacts the credentials NBI stores, leaving placeholder keys alone. The protected-path set and the stored-credential list are cached and invalidated on config load and save. Closes plmbr#545
This branch has not been deployed
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.
Summary
NBIConfigregisters its config paths and clears both caches on load and save.Evidence
config.jsonandmcp.jsonlike any file, andredact_env_secretsleaves a stored key without a known prefix.pytest tests/2563 passed, 4 skipped,jest959 passed,tsc, ESLint, Prettier andi18n checkclean. Reverting any one of the inode check, the mention gate, the generation guard or the Claude-mode scrubbing makes a test fail.Merge Danger
Door: two-way
Blast Radius: agent file tools and shell output
A workflow that had the agent edit
~/.jupyter/nbi/mcp.jsonthrough the file tools stops working. The config API and Settings still edit it.Closes #545