Skip to content

Claude/code audit strategy 01 xo hukl sn6i2r wr d faj qc xd#2

Open
arbal wants to merge 2 commits intomasterfrom
claude/code-audit-strategy-01XoHUKLSn6i2rWrDFajQcXd
Open

Claude/code audit strategy 01 xo hukl sn6i2r wr d faj qc xd#2
arbal wants to merge 2 commits intomasterfrom
claude/code-audit-strategy-01XoHUKLSn6i2rWrDFajQcXd

Conversation

@arbal
Copy link
Copy Markdown
Owner

@arbal arbal commented Nov 18, 2025

No description provided.

…ection

SECURITY FIX - Command Injection Vulnerability (HIGH severity)

- Added escapeAppleScriptString() function to properly escape user-controlled
  strings before inserting into AppleScript code
- Applied fix to alert() and prompt() functions in --ui mode
- Escapes: backslashes, quotes, newlines, carriage returns, tabs
- Prevents malicious tab titles from executing arbitrary AppleScript/shell commands

Attack vector: Malicious website sets crafted tab title, user runs brave.js
with --ui flag, injected code executes in user context.

Impact: Limited to AppleScript/shell execution as user (no privilege escalation),
but could exfiltrate data or modify files.

Testing: Added comprehensive test suite (test_security_patch.mjs) covering
8 attack vectors. All tests pass.

Documentation:
- SECURITY_PATCH.md: Full vulnerability disclosure and remediation
- PATCH_DEMO.md: Attack demonstrations and technical explanations
- P0_SECURITY_FIX_SUMMARY.md: Implementation summary

Fixes: P0 security issue identified in code audit
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.

2 participants