Skip to content

fix: store the LLM API key in SecretStorage, not settings - #355

Open
MaximeGaudin wants to merge 2 commits into
mainfrom
fix/issue-191-secret-storage
Open

fix: store the LLM API key in SecretStorage, not settings#355
MaximeGaudin wants to merge 2 commits into
mainfrom
fix/issue-191-secret-storage

Conversation

@MaximeGaudin

Copy link
Copy Markdown
Owner

Summary

  • slint.llm.apiKey was a plain string setting, so the credential persisted in plaintext settings.json (and in editor sync, or a committed workspace file). The setting is removed.
  • The key now lives in vscode.SecretStorage (OS keychain, encrypted at rest), set with slint: Set the model API key (secure storage) (masked input) and removed with slint: Clear the stored model API key. llmArgv/llmEnv read the cached secret; it is still passed only via the SLINT_EDITOR_API_KEY env var, never argv.
  • One-time migration on activation: a key already in settings is moved into SecretStorage (most specific scope wins) and every plaintext copy is cleared, with a notification.

Fixes #191

Note: overlaps PR #321 (issue #33), which made the same setting scope: machine. This PR supersedes that part — one of the two package.json changes will need a rebase when they merge.

Test plan

  • New regression tests failed before the fix (setting declared; commands absent; migration unimplemented)
  • New regression tests pass after the fix (17/17)
  • Local checks mirror CI and passed before push (./scripts/check.sh full run)
  • CI green on the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VS Code extension setting stores LLM API keys as plaintext configuration, not SecretStorage

1 participant