Skip to content

Commit bd2c06b

Browse files
kochj23claude
andcommitted
docs(readme): Update to v6.1.0 with security audit details
Add What's New section for v6.1.0 security hardening release documenting all 31 findings resolved. Updated Security section with Keychain storage, model verification, thread safety, and secure logging details. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent cc9a48e commit bd2c06b

1 file changed

Lines changed: 70 additions & 3 deletions

File tree

README.md

Lines changed: 70 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# MLX Code
1+
# MLX Code v6.1.0
22

33
![Build](https://github.com/kochj23/MLXCode/actions/workflows/build.yml/badge.svg)
44
![Platform](https://img.shields.io/badge/platform-macOS%2014%2B-blue)
@@ -48,6 +48,35 @@ Read-only tools (grep, glob, file read, code navigation) auto-approve. Write/exe
4848

4949
---
5050

51+
## What's New in v6.1.0 (February 2026)
52+
53+
### Security Hardening & Code Quality Audit
54+
**31 findings resolved across CRITICAL, HIGH, MEDIUM, LOW, and INFO severities:**
55+
56+
**Critical Fixes:**
57+
- **API Keys to Keychain**: All AI backend API keys (OpenAI, Anthropic, Google, AWS, Azure, IBM) migrated from UserDefaults to macOS Keychain with automatic migration on first launch
58+
59+
**High Fixes:**
60+
- **Command Validator Hardened**: Replaced naive `String.contains()` with `NSRegularExpression` word-boundary matching to prevent bypass via substrings
61+
- **Python Import Validator**: Regex-based import validation with comment filtering prevents bypass via inline comments
62+
- **Model Hash Verification**: SHA256 verification of downloaded models using CryptoKit
63+
- **Buffered I/O**: 4096-byte chunk reading replaces byte-by-byte daemon communication for significant performance improvement
64+
- **Task Cancellation**: All infinite `while true` loops replaced with `while !Task.isCancelled` for clean shutdown
65+
- **Portable Paths**: Bundle-relative paths replace hardcoded file paths
66+
- **Secure Logging**: All `print()` statements replaced with `SecureLogger` calls
67+
68+
**Medium Fixes:**
69+
- Proper Unicode search with `localizedCaseInsensitiveContains()`
70+
- O(n) context management replacing O(n^2) insert-at-zero pattern
71+
- 1MB file content cap for memory management
72+
- Multi-version Python path lookup (3.13 down to 3.9)
73+
- Serial queues for thread-safe MLX service operations
74+
- Async logging via serial queue in CommandValidator
75+
- Permission check for script execution
76+
- Regex validation improvements
77+
78+
---
79+
5180
## Features
5281

5382
### Xcode Integration
@@ -159,17 +188,33 @@ MLX Code (SwiftUI)
159188
## Security
160189

161190
### Shell Execution Safety
162-
- **Command Validation**: All bash commands pass through `CommandValidator` before execution, blocking dangerous patterns (rm -rf /, fork bombs, etc.)
191+
- **Command Validation**: All bash commands pass through `CommandValidator` with regex word-boundary matching before execution, blocking dangerous patterns (rm -rf /, fork bombs, etc.)
192+
- **Python Import Validation (v6.1.0)**: Regex-based validation with comment filtering prevents bypass via inline comments
163193
- **No Shell Interpolation**: Git and build tools use `process.currentDirectoryURL` instead of `cd` string interpolation, preventing directory traversal and injection attacks
164194
- **Tool Approval Flow**: Write and execute tools (bash, file write, xcode build) require user confirmation before running
165195
- **Read-Only Auto-Approve**: Only safe, read-only tools (grep, glob, file read) auto-approve without user interaction
196+
- **Permission Checks (v6.1.0)**: File permission validation before script execution in CommandValidator
197+
198+
### Credential Security (v6.1.0)
199+
- **macOS Keychain Storage**: All API keys (OpenAI, Anthropic, Google, AWS, Azure, IBM) stored in macOS Keychain using `SecItemAdd`/`SecItemCopyMatching`
200+
- **Automatic Migration**: Existing UserDefaults-stored keys automatically migrated to Keychain on first launch
201+
- **No Plaintext Secrets**: Non-secret config only (region, model names) stored in UserDefaults
202+
203+
### Model Security (v6.1.0)
204+
- **SHA256 Hash Verification**: Downloaded models verified against expected hashes using CryptoKit
205+
- **Secure Logging**: All debug output routed through `SecureLogger` instead of `print()` — no sensitive data in console
166206

167207
### Data Privacy
168208
- **100% Local**: All model inference runs on-device via Apple MLX -- no data leaves your machine
169209
- **No Telemetry**: No analytics, crash reporting, or usage tracking
170210
- **No API Keys Required**: No cloud services, no subscriptions, no accounts
171211
- **Local Memory Storage**: User memories stored in `~/.mlxcode/memories.json`, never transmitted
172212

213+
### Thread Safety (v6.1.0)
214+
- **Serial Queues**: MLX service I/O operations serialized to prevent race conditions
215+
- **Buffered I/O**: 4096-byte chunk reading replaces byte-by-byte daemon communication
216+
- **Task Cancellation**: All infinite loops replaced with `while !Task.isCancelled` for clean shutdown
217+
173218
---
174219

175220
## What It Doesn't Do
@@ -186,7 +231,29 @@ Being honest about limitations:
186231

187232
## Version History
188233

189-
### v6.0.0 (February 20, 2026) — Current
234+
### v6.1.0 (February 26, 2026) — Current
235+
- Comprehensive security audit: 31 findings resolved (2 CRITICAL, 8 HIGH, 10 MEDIUM, 9 LOW, 1 INFO)
236+
- API keys migrated from UserDefaults to macOS Keychain with automatic migration
237+
- Command validator hardened with NSRegularExpression word-boundary matching
238+
- Python import validator hardened with regex matching and comment filtering
239+
- SHA256 model hash verification using CryptoKit
240+
- Buffered 4096-byte I/O replacing byte-by-byte daemon communication
241+
- Task cancellation (`while !Task.isCancelled`) replacing infinite loops
242+
- Bundle-relative paths replacing hardcoded file paths
243+
- Multi-version Python path lookup (3.13 down to 3.9)
244+
- Serial queues for thread-safe MLX service operations
245+
- SecureLogger replacing all `print()` statements
246+
- Async logging via serial queue in CommandValidator
247+
- `localizedCaseInsensitiveContains()` for proper Unicode search
248+
- O(n) context management replacing O(n^2) insert-at-zero pattern
249+
- 1MB file content cap for memory management in codebase indexer
250+
- Implemented Clear Conversations confirmation dialog in Settings
251+
- Force unwrap elimination in MLXService
252+
- NSString cast chains replaced with URL API across 3 files
253+
- Named constants for context budget ratios
254+
- Deprecated unused ContentView with `@available` attribute
255+
256+
### v6.0.0 (February 20, 2026)
190257
- GitHub integration: issues, PRs, branches, credential scanning
191258
- Code analysis: metrics, dependencies, lint, symbols
192259
- Xcode full deploy pipeline: build, archive, DMG, install

0 commit comments

Comments
 (0)