Skip to content

🔒 [security fix] Move notification logs to secure directory#3

Open
Bwillou1 wants to merge 1 commit into
mainfrom
fix-secure-notification-log-path-8838677968184243535
Open

🔒 [security fix] Move notification logs to secure directory#3
Bwillou1 wants to merge 1 commit into
mainfrom
fix-secure-notification-log-path-8838677968184243535

Conversation

@Bwillou1
Copy link
Copy Markdown
Owner

@Bwillou1 Bwillou1 commented May 8, 2026

The vulnerability involved using the world-writable /tmp directory for sensitive notification logs. This could allow a malicious local user to perform symlink attacks or inject false log entries.

The fix moves the log file to /Library/Logs/HomeAssistant/notifications.log, which is owned by the _homeassistant system user. Additionally, the postinstall script now sets the directory permissions to 750, ensuring only the owner and group can access the logs. The uninstall script was also updated to explicitly clean up the new log file.


PR created automatically by Jules for task 8838677968184243535 started by @Bwillou1

Move `ha_notifications.log` from world-writable `/tmp` to `/Library/Logs/HomeAssistant/notifications.log` with restricted permissions (750). This mitigates potential symlink attacks, log injection, and unauthorized access to sensitive notification data.

Changes:
- Updated `config/default_config.yaml` with the new secure path.
- Updated `docs/OFFICIAL_MACOS_GUIDE.md` documentation.
- Modified `scripts/postinstall` to set secure (750) permissions on the log directory.
- Modified `scripts/uninstall` to ensure cleanup of the new log path while maintaining legacy cleanup.

Co-authored-by: Bwillou1 <162920784+Bwillou1@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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