T03 · Remote Payload Retrieval and Execution
- Location
scripts/homebridge_setup.sh:14- Finding
Privileged execution of a remotely retrieved installation script
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real smart-home automation/setup skill, not just a planner, and it needs review because it can store credentials and control devices with weak scoping and safety defaults.
Install only if you intentionally want this skill to set up integrations and run local smart-home automations. Use a dedicated low-privilege account and isolated host, avoid LAN HTTP and default admin credentials, protect or delete token/profile files, pin and review dependencies before running setup scripts, disable Homebridge MCP admin tools unless needed, and require manual confirmation for locks, alarms, cameras, climate, plugs, and other safety-sensitive actions.
scripts/homebridge_setup.sh:14Privileged execution of a remotely retrieved installation script
scripts/automation_setup.sh:21Unpinned third-party packages execute in security-sensitive integrations
automation/plugins/homekit/homebridgeclient.py:10Homebridge credentials and bearer tokens may be transmitted over plaintext HTTP
automation/run_automations.py:274Automation validation fails open and ignores documented trigger safeguards
knowledge/homekit-guide.md:119Agent integration exposes unnecessary Homebridge administrative capabilities
The manifest suggests broad planning/configuration help, but the content includes host-level software installation via npm and service connectivity checks against Homebridge/Homebridge MCP. Installing software and probing local services are materially more privileged than ordinary advice, and can modify the host or expose internal-network details without clear up-front disclosure.
The manifest suggests broad planning/configuration help, but the content includes host-level software installation via npm and service connectivity checks against Homebridge/Homebridge MCP. Installing software and probing local services are materially more privileged than ordinary advice, and can modify the host or expose internal-network details without clear up-front disclosure.
The manifest suggests broad planning/configuration help, but the content includes host-level software installation via npm and service connectivity checks against Homebridge/Homebridge MCP. Installing software and probing local services are materially more privileged than ordinary advice, and can modify the host or expose internal-network details without clear up-front disclosure.
The manifest suggests broad planning/configuration help, but the content includes host-level software installation via npm and service connectivity checks against Homebridge/Homebridge MCP. Installing software and probing local services are materially more privileged than ordinary advice, and can modify the host or expose internal-network details without clear up-front disclosure.
The manifest suggests broad planning/configuration help, but the content includes host-level software installation via npm and service connectivity checks against Homebridge/Homebridge MCP. Installing software and probing local services are materially more privileged than ordinary advice, and can modify the host or expose internal-network details without clear up-front disclosure.
The skill directs storage of service URLs, credentials, and tokens in local profile/auth files without an explicit security warning, storage hardening guidance, or least-privilege handling. If those files are exposed, an attacker could gain control over smart-home platforms, enumerate devices and scenes, and potentially infer occupancy or manipulate physical devices.
The skill explicitly instructs obtaining long-lived access tokens and saving them for later API use, which is credential acquisition and persistence. In this context that is dangerous because long-lived tokens often grant broad control over home automation systems and, if mishandled, can enable persistent unauthorized access to device state and control endpoints.
### Step 2: If User Grants Access — Guide API Setup
**Home Assistant:**
- Guide to Settings → Long-Lived Access Tokens
- Save URL and token to profile
- Test connection with a simple API call
The plugin exposes live actuation methods through call_service(), including property writes, scene execution, and device actions. That exceeds the skill's declared purpose of planning, comparison, and configuration assistance, so if this skill is invoked or reused by an agent it could perform real-world smart-home changes such as unlocking, powering devices, or triggering scenes without user intent.
Direct home-automation actuation is implemented via set_device_property, run_scene, and run_device_action, giving the code the ability to change the physical environment. In the context of a skill advertised as a planner/setup assistant, this mismatch is dangerous because downstream systems or users may trust it as advisory-only while it can actually control devices.
The file implements a full standalone automation engine that polls device state, evaluates triggers and conditions, and executes actions against real smart-home platforms. That exceeds the declared role of a planning/recommendation skill and creates an unauthorized actuation surface where a user or downstream component could cause real-world device changes rather than receiving advice only.
The action handlers directly invoke Mijia and HomeKit operations such as turning devices on/off, running scenes, and setting accessory characteristics. In the context of a planner skill, this is dangerous because generated or loaded automation data can trigger immediate physical-world actions without clear consent boundaries, enabling misuse of locks, lights, switches, climate, or scenes.
Using --net=host removes network isolation between the container and host, expanding the blast radius if Homebridge or a plugin is compromised. In this skill's context, Homebridge manages smart-home devices and exposes a REST API, so host networking makes lateral movement, service exposure, and host-level network abuse more dangerous.
# Option B: Docker
docker run -d --name homebridge --restart=unless-stopped \
--net=host \
-e HOMEBRIDGE_CONFIG_UI=1 \
-e HOMEBRIDGE_CONFIG_UI_PORT=8581 \
-v ~/homebridge:/homebridge \
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
**Config:** YAML + UI (since 2023.7+ most things configurable via UI)
**Automation syntax:** triggers / conditions / actions
**API:** REST API + WebSocket
**Auth:** Long-lived access tokens (Settings → Long-Lived Access Tokens)
**Server required:** Yes (Raspberry Pi, NAS, PC, or HA Cloud)
**Best for:** Geeks, advanced users, multi-platform integration
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
**Config:** YAML + UI (since 2023.7+ most things configurable via UI)
**Automation syntax:** triggers / conditions / actions
**API:** REST API + WebSocket
**Auth:** Long-lived access tokens (Settings → Long-Lived Access Tokens)
**Server required:** Yes (Raspberry Pi, NAS, PC, or HA Cloud)
**Best for:** Geeks, advanced users, multi-platform integration
The documented Docker command uses --net=host, which removes network namespace isolation and gives the container direct access to the host network stack. In a smart-home environment, that broadens exposure of Homebridge and any compromised plugin or service, potentially enabling easier lateral movement, local service discovery, and access to sensitive LAN devices and management interfaces.
# Install Homebridge (Docker)
docker run -d --name homebridge --net=host \
-e HOMEBRIDGE_CONFIG_UI=1 -e HOMEBRIDGE_CONFIG_UI_PORT=8581 \
-v ~/homebridge:/homebridge homebridge/homebridge:latest
The script checks for Mijia credentials and, if absent, triggers a live interactive login through a Python API. That causes credentialed access to a third-party smart-home account from a setup helper, which is more dangerous in this context because the skill is described as planning/configuration assistance rather than an account-integrating management tool.
The script writes plugin files directly into the installed AppDaemon package directory, modifying local application code rather than limiting itself to user configuration. This creates persistence and code-execution risk because those Python files may be loaded by AppDaemon later, and the behavior is unusually invasive for a smart-home planning skill.
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
if ! command -v node &> /dev/null; then
echo "Error: Node.js not found. Please install Node.js 18+ first."
echo " macOS: brew install node"
echo " Linux: curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && sudo apt install -y nodejs"
exit 1
fi
Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.
if ! command -v node &> /dev/null; then
echo "Error: Node.js not found. Please install Node.js 18+ first."
echo " macOS: brew install node"
echo " Linux: curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - && sudo apt install -y nodejs"
exit 1
fi
Potential security issue detected. Manual review is recommended.
echo "Warning: Homebridge not reachable at $HB_URL"
echo ""
echo "You need to install and start Homebridge first:"
echo " Docker: docker run -d --name homebridge --net=host -e HOMEBRIDGE_CONFIG_UI=1 -v ~/homebridge:/homebridge homebridge/homebridge:latest"
echo " npm: npm install -g homebridge homebridge-config-ui-x && homebridge"
echo ""
echo "Then set environment variables:"
Potential security issue detected. Manual review is recommended.
echo "Warning: Homebridge not reachable at $HB_URL"
echo ""
echo "You need to install and start Homebridge first:"
echo " Docker: docker run -d --name homebridge --net=host -e HOMEBRIDGE_CONFIG_UI=1 -v ~/homebridge:/homebridge homebridge/homebridge:latest"
echo " npm: npm install -g homebridge homebridge-config-ui-x && homebridge"
echo ""
echo "Then set environment variables:"
The skill describes behaviors that involve file reads/writes, network/API access, and shell/package-install commands, but it does not declare any tool scope or permission boundary. That makes the skill's effective capabilities opaque to the host and user, increasing the chance of over-broad execution, silent persistence, credential handling, or command execution in contexts that expected a planning-only assistant.
The trigger terms are broad enough to match many ordinary 'smart home' or setup-related requests, which increases the chance the skill activates in contexts where users only wanted generic advice. Because this skill also includes credential handling, local persistence, API use, and automation setup, over-broad activation becomes more dangerous than it would be for a purely informational skill.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
## Safety Rules
- Treat door locks, cameras, and alarm-like scenes as opt-in and require explicit confirmation.
- Prefer manual override and fail-safe defaults when power loss, network loss, or cloud outage would create risk.
- For motion-based automations, use conservative defaults and keep false-trigger handling visible.
- Do not assume a risky automation is acceptable just because it is technically possible.
The skill instructs persistent storage of a user household profile and repeated updates to that file, but it does not require a clear, explicit disclosure of what is stored, for how long, and who can access it. Household layout, membership, platform details, and special needs are sensitive in a smart-home context because they can reveal occupancy, lifestyle, and security posture.
No suspicious patterns detected.