Skip to content

fix: move unix socket from /tmp/ to ~/.wake/sockets/ - #12

Merged
joemckenney merged 1 commit into
joemckenney:mainfrom
hyponymous:fix/socket-path-security
Feb 21, 2026
Merged

joemckenney merged 1 commit into
joemckenney:mainfrom
hyponymous:fix/socket-path-security

Conversation

@hyponymous

@hyponymous hyponymous commented Feb 15, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Moves the Unix socket path from /tmp/wake-{session_id}.sock to ~/.wake/sockets/wake-{session_id}.sock
  • /tmp/ is world-writable, making sockets vulnerable to symlink attacks, path prediction, and denial of service
  • ~/.wake/sockets/ is user-owned and inherits the user home directory permissions
  • Socket directory is created automatically via create_dir_all

Test plan

  • Run wake shell and verify socket is created under ~/.wake/sockets/
  • Verify hooks (cmd-start, cmd-end) still communicate correctly over the new socket path
  • Verify socket is cleaned up on session exit

Sockets in world-writable /tmp/ are vulnerable to symlink attacks,
path prediction, and denial of service. Using a user-owned directory
under ~/.wake/ eliminates these risks.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@joemckenney
joemckenney merged commit 4fb4e2f into joemckenney:main Feb 21, 2026
5 checks passed
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