Repository navigation
fix(settings): keep stored API keys out of the capabilities response - #546
Open
FelipeRamos-neuro wants to merge 1 commit into
Open
FelipeRamos-neuro wants to merge 1 commit into
FelipeRamos-neuro wants to merge 1 commit 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
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
notebook_intelligence/credential_mask.pyholds the mask, restore andsecret-property helpers.LLMProviderProperty.secretis opt-in for extension providers.api_keyis masked by default.autoComplete="new-password"), and focusing one selects the mask so typing replaces it.Evidence
config.json(typed in Settings or written by hand) is in the capabilities JSON in clear text.********. A realNBIConfigentry is covered, not a mock, because a mock hid the storedchat_modelleak during development.Tests:
pytest tests/2521 passed,jest959 passed,tsc --noEmit, ESLint, Prettier andi18n checkclean. Reverting thechat_modelmasking makes a test fail.Merge Danger
Door: two-way
Settings now shows
********where it showed the key. Anyone who relied on reading the key back from the capabilities response loses that.Blast Radius: settings dialog and
/capabilitiesconsumersFollow-up PRs, stacked on this one: #547 (MCP credentials), #548 (error text), #549 (file tools and shell output).
Closes #542