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
{{ message }}
Repository navigation
Bun.cron(…) writes logs to the insecure globally shared temp dir on macOS #28298
The temporary directories in macOS are shared among multiple users. This requires that they be writable by multiple users. Any time you work on files in a location to which others have read/write access, there’s the potential for the file to be compromised or corrupted.
The best way to handle this is to create a safe temporary directory that only you can access, then write the files into that directory.
To do this:
In a cocoa app, call NSTemporaryDirectory.
At the POSIX layer, call confstr and pass the constant _CS_DARWIN_USER_TEMP_DIR as the name parameter.
(I'd personally also use this chance to group bun cron folders under a parent folder to avoid writing a whole bunch of files at the top level, but this is not so severe an issues since it's a temp dir.)
changed the title [-]`Bun.cron(…)` writes logs to the insecure globally shared temp dir[/-][+]`Bun.cron(…)` writes logs to the insecure globally shared temp dir on macOS[/+]on Mar 20, 2026
Activity
[-]`Bun.cron(…)` writes logs to the insecure globally shared temp dir[/-][+]`Bun.cron(…)` writes logs to the insecure globally shared temp dir on macOS[/+]fix(cron): use user-specific log directory instead of /tmp on macOS
fix(cron): use user-specific log directory instead of /tmp on macOS
fix(cron): use user-specific log directory instead of /tmp on macOS
fix(cron): use user-specific log directory instead of /tmp on macOS
fix(cron): use user-specific log directory instead of /tmp on macOS
fix(cron): use user-specific log directory instead of /tmp on macOS
fix(cron): use user-specific log directory instead of /tmp on macOS
fix(cron): write macOS launchd logs to ~/Library/Logs, not /tmp
fix(cron): write macOS launchd logs to ~/Library/Logs, not /tmp
fix(cron): write macOS launchd logs to ~/Library/Logs, not /tmp
fix(cron): write macOS launchd logs to ~/Library/Logs, not /tmp
cron: launchd logs go to the user's temporary directory, and a line b…