Skip to content

feat(security): Add security hardening for MCP, URL scheme, and per-terminal controls#50

Merged
eyelock merged 2 commits into
mainfrom
fix/security-hardening
Jan 17, 2026
Merged

feat(security): Add security hardening for MCP, URL scheme, and per-terminal controls#50
eyelock merged 2 commits into
mainfrom
fix/security-hardening

Conversation

@eyelock
Copy link
Copy Markdown
Owner

@eyelock eyelock commented Jan 16, 2026

Summary

  • Add comprehensive security hardening based on security audit findings
  • Add per-terminal security settings that override global preferences
  • Add Security documentation page to Help

Security Features Added

Input Validation

  • String length limits (1,000 chars general, 50,000 chars LLM context, 4,096 chars paths)
  • Path traversal prevention (blocks ../ sequences)
  • UUID format validation

URL Scheme Protection

  • User confirmation dialog for external LLM context modifications via termq:// URL scheme
  • Prevents malicious scripts from injecting commands into AI workflows

Clipboard Access Control

  • OSC 52 clipboard access preference (global and per-terminal)
  • Control whether terminal programs can write to system clipboard

File Coordination

  • NSFileCoordinator for safe concurrent board.json access
  • Prevents data corruption when app, CLI, and MCP server access simultaneously

Per-Terminal Security Settings

  • Allow OSC 52 Clipboard (overrides global)
  • Confirm External Modifications (overrides global)
  • Clear "Disabled globally" indicators when global setting takes precedence

Documentation

  • New Security page in Help (Advanced Topics section)
  • Covers all security features, best practices, and settings reference
  • Links to related docs (configuration, environment variables, MCP server)

Includes

  • Localized security strings for all 40 supported languages
  • 25 new unit tests for security features
  • Security audit report in .claude/security-audit-2026-01-16.md

Test plan

  • make check passes (build, lint, 516 tests, localization validation)
  • Verify OSC 52 clipboard toggle works (global and per-terminal)
  • Verify external modification confirmation dialog appears for termq://update with LLM fields
  • Verify input validation rejects oversized strings and path traversal attempts
  • Verify Security help page renders correctly

🤖 Generated with Claude Code

David Collie and others added 2 commits January 17, 2026 08:49
Security improvements based on comprehensive audit:

- Add NSFileCoordinator for safe concurrent board.json access
- Add input validation with length limits (1000 chars general,
  50000 chars LLM context, 4096 chars paths)
- Add path traversal prevention (blocks ../ sequences)
- Add user confirmation dialog for external LLM context modifications
  via termq:// URL scheme
- Add OSC 52 clipboard access preference

Includes:
- Security audit report in .claude/security-audit-2026-01-16.md
- Localized security strings for all 40 supported languages
- 25 new unit tests for security features

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Enhance security controls with granular per-terminal options:

- Add per-terminal OSC 52 clipboard control (overrides global setting)
- Add per-terminal external modification confirmation (overrides global)
- Rename Data tab to "Data & Security" in Settings
- Add Security section in terminal editor with clear status indicators
- Add comprehensive Security documentation page in Help

UI improvements:
- Show "Disabled globally" indicator when global settings override
- Group security settings in dedicated section
- Improve interactive mode toggle labeling

Includes:
- Localized strings for all 40 supported languages
- Updated help index and sidebar navigation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@eyelock eyelock force-pushed the fix/security-hardening branch from c773306 to a0daf0a Compare January 17, 2026 08:49
@eyelock eyelock changed the title feat(security): Add security hardening for MCP and URL scheme feat(security): Add security hardening for MCP, URL scheme, and per-terminal controls Jan 17, 2026
@eyelock eyelock marked this pull request as ready for review January 17, 2026 08:54
@eyelock eyelock merged commit 5358735 into main Jan 17, 2026
5 checks passed
@eyelock eyelock deleted the fix/security-hardening branch January 17, 2026 08:54
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.

1 participant