mirror of
https://github.com/nickustinov/itsyhome-macos.git
synced 2026-04-26 04:15:56 +03:00
[GH-ISSUE #65] Security issues #66
Labels
No labels
bug
enhancement
pending release
pull-request
wip
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/itsyhome-macos#66
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alaschgari on GitHub (Feb 21, 2026).
Original GitHub issue: https://github.com/nickustinov/itsyhome-macos/issues/65
First and foremost: thank you for creating this.
I ran an Opus 4.6 security check and it found these issues. You might want to fix them for the upcoming versions:
Security Risk Analysis — itsyhome-macos
Summary
The codebase is generally well-structured from a security standpoint — no hardcoded secrets, proper Keychain usage, app sandboxing enabled, and zero third-party dependencies. However, there are several notable risk areas, primarily around the webhook server and network configuration.
🔴 High Severity
1. Webhook Server Has No Authentication
File: WebhookServer.swift
The built-in HTTP server accepts any incoming connection on the configured port without requiring authentication. Anyone on the same network can:
2. Wildcard CORS Header (
Access-Control-Allow-Origin: *)File: WebhookServer.swift#L261
The webhook server sends
Access-Control-Allow-Origin: *on every response. This means any website the user visits could make cross-origin requests to the local webhook server to control devices.🟡 Medium Severity
3. App Transport Security Disabled (
NSAllowsArbitraryLoads)File: Info.plist#L73-L77
ATS is completely disabled, allowing all plaintext HTTP connections.
Mitigating factor: This is likely intentional — Home Assistant instances on local networks commonly run over
http://. The HAURLValidator.swift auto-selectshttp://for local addresses andhttps://for remote ones. However, a narrower exception (e.g.,NSAllowsLocalNetworking) would be safer.4. URL Scheme Can Be Triggered By Any Local App
File: URLSchemeHandler.swift
Any application on the Mac can open
itsyhome://URLs to control devices:Mitigating factor: This is a documented feature (deeplinks). However, there's no confirmation dialog or origin check — a malicious app or script running on the Mac could silently control devices.
5. Logging Exposes Device Names & Server URLs
Multiple files log device names, server URLs, and entity IDs with
privacy: .public:These are visible in Console.app and
log streamto any user on the Mac.🟢 Low Severity / Positive Findings
6. ✅ Credentials Stored in Keychain (Properly)
File: HAAuthManager.swift
The Home Assistant access token is stored in the macOS Keychain with
kSecAttrAccessibleAfterFirstUnlock. The server URL is stored inUserDefaults(acceptable — it's not a secret).7. ✅ No Hardcoded Secrets or API Keys
Scanned the entire codebase — no hardcoded tokens, passwords, API keys, or secrets were found.
8. ✅ App Sandbox Enabled
File: Itsyhome.entitlements
The app runs in a sandbox with only the entitlements it needs:
com.apple.developer.homekitcom.apple.security.network.client+network.servercom.apple.developer.ubiquity-kvstore-identifier(iCloud KV store)9. ✅ Zero Third-Party Dependencies
No SPM packages, CocoaPods, or Carthage dependencies. The entire app is built with Apple frameworks only, eliminating supply chain risk.
10. ✅ URL Scheme Validation Is Properly Whitelisted
The URL validator only accepts
http,https,ws, andwssschemes, and the URL scheme handler only accepts a fixed set of actions (toggle,on,off,lock,unlock, etc.).11. ✅ Process() Usage Is Safe
Process()is only used to call/usr/bin/openwith the app's own bundle path for restart — no user-controlled input reaches this call.Risk Matrix
@nickustinov commented on GitHub (Feb 21, 2026):
Hey! Web server is disabled by default, and unless you are sure what you are doing and know whats happening in your network I would recommend keeping it disabled.