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
chore: enable SecretString and overflow checks for security
API keys now stored as `secrecy::SecretString` with memory zeroed on
drop and `[REDACTED]` in debug output. Release profile updated to `lto =
"fat"`, `strip = "symbols"`, and `overflow-checks = true` for ANSSI-FR
compliance.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,6 +39,8 @@ All notable changes to CommitBee are documented here.
39
39
40
40
-**API key validation ordering** — `set-key`, `get-key`, `init`, `config`, `completions`, and `hook` commands no longer require an API key to be present. CLI `--provider` flag now applies before keyring lookup.
41
41
-**Platform-native keyring backends** — keyring v3 now uses macOS Keychain (`apple-native`), Windows Credential Manager (`windows-native`), and Linux Secret Service (`linux-native`) instead of a mock file-based backend.
42
+
-**SecretString for API keys** — API keys stored as `secrecy::SecretString` in Config and provider structs. Memory zeroed on drop, never exposed except at HTTP header insertion.
43
+
-**Overflow checks in release builds** — `overflow-checks = true` added to release profile for ANSSI-FR compliance.
Copy file name to clipboardExpand all lines: CLAUDE.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -198,6 +198,7 @@ When adding or modifying LLM providers (`src/services/llm/`), every provider mus
198
198
5.**Zero-allocation streaming** — parse from `&line_buffer[..newline_pos]` slices, then `drain(..=newline_pos)` instead of allocating new Strings per line
199
199
6.**Shared system prompt** — use `super::SYSTEM_PROMPT`, never duplicate prompt text
200
200
7.**CancellationToken** — check in `tokio::select!` loop alongside stream chunks
201
+
8.**SecretString for API keys** — store as `secrecy::SecretString`, expose only via `.expose_secret()` at HTTP header insertion. Never log, Debug, or Display the raw key.
If built with the `secure-storage` feature, CommitBee can store API keys in your OS keychain using platform-native backends (macOS Keychain, Windows Credential Manager, Linux Secret Service):
359
+
API keys are stored as `secrecy::SecretString` — memory is zeroed on drop and keys show as `[REDACTED]` in debug output. Keys are only exposed at the HTTP header insertion point.
360
+
361
+
The `secure-storage` feature (enabled by default) stores keys in your OS keychain using platform-native backends (macOS Keychain, Windows Credential Manager, Linux Secret Service):
360
362
361
363
```bash
362
-
cargo install commitbee --features secure-storage
363
364
commitbee config set-key openai # Prompts for key, stores in keychain
364
365
commitbee config set-key anthropic # Same for Anthropic
365
366
commitbee config get-key openai # Check if key exists
366
367
```
367
368
368
369
Key lookup order: CLI `--provider` flag → config file → environment variable → keychain. The `set-key` and `get-key` commands do not require an API key to already be configured.
369
370
371
+
To build without keychain support: `cargo install commitbee --no-default-features --features all-languages`
372
+
370
373
## ✂️ Commit Splitting
371
374
372
375
One of CommitBee's standout features. When your staged changes contain logically independent work, CommitBee detects this and offers to create separate commits.
@@ -548,6 +549,7 @@ Allow users to define custom file category patterns in config (e.g., `[categoriz
548
549
549
550
### SR-002: API Key Management
550
551
552
+
-**In-memory protection**: API keys stored as `secrecy::SecretString` in Config and provider structs — memory zeroed on drop, `[REDACTED]` in Debug output, only exposed at HTTP header insertion via `.expose_secret()`
551
553
- System keychain via `keyring` with platform-native backends: `apple-native` (macOS Keychain), `linux-native` (Linux Secret Service), `windows-native` (Windows Credential Manager)
552
554
- Environment variable fallback
553
555
- Never stores keys in plaintext config
@@ -795,8 +797,9 @@ bash, zsh, fish, powershell via `clap_complete`. Documented installation per she
0 commit comments