Servant
by ucpdh23
Overview
Smart Home Assistant Platform to simplify and automate domestic tasks efficiently, integrating with sensors, actuators, and AI.
Installation
java -jar servantV3-0.0.1-SNAPSHOT-fat.jar -conf conf.jsonEnvironment Variables
- mongodb.uri
- mongodb.database
- ParrotVerticle.token
- ParrotVerticle.witToken
- NetworkVerticle.server
- NetworkVerticle.usr
- NetworkVerticle.pws
- ThermostatVerticle.url
- ThermostatVerticle.token
- LampVerticle.url
- LampVerticle.token
- SensorVerticle.server
- SensorVerticle.usr
- SensorVerticle.pws
- OutletVerticle.host
- OutletVerticle.login
- OutletVerticle.password
- CalendarVerticle.calendar
- CalendarVerticle.secret
- OpenIAVerticle.API_KEY
- Neo4jVerticle.uri
- Neo4jVerticle.username
- Neo4jVerticle.password
- BrainVerticle.model
- BrainVerticle.secret
- BrainVerticle.mcpServerUrl
- BrainVerticle.managerA2AHost
- GithubVerticle.account
- GithubVerticle.repository
- GithubVerticle.projectBuilderAccessToken
- AzureDevOpsVerticle.organization
- AzureDevOpsVerticle.project
- AzureDevOpsVerticle.accessToken_b64
Security Notes
Critical security vulnerabilities identified: 1. Hardcoded API Key: The GraphHopper API key is directly embedded in `RoadUtils.java`, posing a significant risk if exposed. 2. Remote Command Execution: `SSHUtils.runLocalCommand` and `runRemoteCommand` are used across multiple verticles (`HomeVerticle`, `OutletVerticle`, `SensorVerticle`, `ScrumLeaderVerticle`, `GithubVerticle`, `AzureDevOpsVerticle`). While current usage seems restricted to controlled inputs or configuration, this pattern is highly susceptible to command injection if external inputs are not meticulously sanitized. The `process_device_security` method in `HomeVerticle` is triggered by user input via Telegram and influences device security status which could indirectly lead to command execution if not carefully managed. 3. File Download and Processing: `ParrotUtils` downloads files from Telegram. The `onFile` handler in `ParrotVerticle` constructs a `filepath` from user-provided content (`content.split("#")[2]`), which introduces a potential path traversal vulnerability if the `content` is malicious. 4. XML External Entity (XXE) Vulnerability: `RoadUtils.parseXML` processes XML from external sources without explicit configuration for XXE protection, making it vulnerable to such attacks. 5. Sensitive Data in Configuration: While `conf.json` uses placeholders, if actual secrets are stored directly in this file and committed to version control, they become hardcoded secrets (e.g., GitHub and Azure DevOps access tokens in `GithubVerticle` and `AzureDevOpsVerticle`).
Similar Servers
xiaozhi-esp32-server
This project provides a comprehensive backend service for ESP32-based intelligent terminal devices, enabling AI interaction, device control, voice recognition, and managing various smart features through MQTT, Websocket, and custom MCP protocols.
xiaozhi-esp32-server-java
Provides backend support and a management platform for smart hardware devices, focusing on AI-powered voice interaction, device management, and IoT control.
ha-mcp
Provides AI agents with complete control over Home Assistant via REST and WebSocket APIs, offering a comprehensive suite of tools for smart home management, automation, and debugging.
rulego-server
A lightweight, high-performance, and modular automation workflow platform for orchestration, iPaaS, API/AI orchestration, data processing, and IoT rule engine scenarios.