Back to skill

Security audit

Starling Home Hub (Nest/Google Home)

Security checks for vulnerabilities and agentic risk

Overview

The skill is coherent and disclosed, but it needs review because it can control locks and cameras while using weak transport and credential-handling defaults.

Install only if you understand that this can read camera data and change physical smart-home state, including locks. Use a narrowly scoped API key, pin the hub certificate with --cacert, avoid --http, keep the hub address private/local and verified, and avoid passing untrusted values into set or stream-start commands.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (4)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/starling.sh:137
Finding

API Key Exposed Through Process Command-Line Arguments

Content
View full analysis
&1) || true ``` The same vulnerable URL construction is used by the other request functions: ```bash curl -sfS "${CURL_TIMEOUT[@]}" ${CURL_EXTRA[@]+"${CURL_EXTRA[@]}"} "$@" "${BASE_URL}${path}?key=${API_KEY}" || { ``` ```bash body=$(curl -sfS -w '\n%{http_code}' "${CURL_TIMEOUT[@]}" ${CURL_EXTRA[@]+"${CURL_EXTRA[@]}"} "$@" "${BASE_URL}${path}?key=${API_KEY}&${params}" 2>&1) || true ``` ```bash resp=$(curl -sfS -w '\n%{http_code}' "${CURL_TIMEOUT[@]}" ${CURL_EXTRA[@]+"${CURL_EXTRA[@]}"} -X POST \ -H "Content-Type: application/json" \ -d "$body" \ "${BASE_URL}${path}?key=${API_KEY}" 2>&1) || true ``` ### Technical Analysis The Starling API requires authentication through a `key` query parameter. Although the script initially obtains the key from `STARLING_API_KEY`, it interpolates the secret directly into curl's URL argument. Consequently, the complete URL, including `?key=`, can appear in the curl process command line while a request is active. Users or monitoring services with permission to inspect that process can recover the credential. This conflicts with the script's warning that only use of the `--key` option creates process-list exposure. The network transmission itself is necessary for the declared functionality, and the query parameter is imposed by the underlying API. However, placing the resulting URL directly in an argv element is not the minimum-exposure way to perform that transmission. ### Attack Path 1. A victim configures a Starling API key through `STARLING_API_KEY`. 2. An attacker with local process-inspection access continuously monitors command lines, ...[truncated 1002 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/starling.sh:106
Finding

TLS Certificate Verification Disabled by Default

Content
View full analysis
&1) || true ``` ### Technical Analysis The default HTTPS mode uses curl's `-k` option unless the user explicitly supplies `--cacert`. This disables both certificate-chain and hostname verification. Encryption without server authentication does not establish that the remote endpoint is the intended Starling hub. Any attacker able to intercept or redirect local traffic can present an arbitrary certificate, and curl will accept it. Authenticated URLs, request bodies, device responses, snapshots, and streaming information may then be exposed. Using a self-signed hub certificate does not inherently require disabling verification. The certificate or its issuing authority can instead be explicitly trusted or pinned. Because secure verification is optional rather than the default, the implementation unnecessarily weakens the confidentiality and integrity protections applied to a privileged smart-home interface. ### Attack Path 1. The victim runs the script without supplying `--cacert`, which is the documented default workflow. 2. An attacker gains a network position capable of redirecting traffic through ARP spoofing, route manipulation, DNS manipulation when a hostname is used, or a compromised local gateway. 3. The attacker impersonates the hub ...[truncated 938 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/starling.sh:82
Finding

Unrestricted Hub Destination Permits API Key Disclosure to an Attacker-Controlled Host

Content
View full analysis
&2 BASE_URL="http://${HUB_IP}:3080/api/connect/v1" CURL_EXTRA=() fi ``` Authenticated requests are then sent to that destination: ```bash "${BASE_URL}${path}?key=${API_KEY}" ``` ### Technical Analysis `STARLING_HUB_IP` and `--ip` are trusted without validation. The script does not ensure that the value is: - A syntactically valid IP address. - A private or link-local address. - The expected Starling hub. - Free from hostname or URL metacharacter ambiguity. - Bound to a previously enrolled certificate. Although the documentation describes the API as local-network only, the implementation can send the API key to a public or attacker-controlled destination. The default use of `-k` makes this more exploitable because an attacker-controlled HTTPS endpoint does not need a trusted certificate. Allowing the user to select a hub is functionally necessary. Allowing an arbitrary unauthenticated destination to receive a privileged key exceeds the minimum network scope required for local hub management. ### Attack Path 1. An attacker influences configuration, automation instructions, shell environment setup, or invocation parameters. 2. `STARLING_HUB_IP` or `--ip` is set to an attacker-controlled hos ...[truncated 1238 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Error
Location
scripts/starling.sh:239
Finding

Unsafe JSON Construction Allows Request-Body Manipulation

Content
View full analysis
" >&2; exit 1; } validate_id "$1" "device ID" api_post "/devices/$1/stream" "{\"offer\":\"$2\"}" | fmt_json ;; ``` ### Technical Analysis The script constructs JSON through string concatenation. Property values and SDP offers are inserted between quotation marks without JSON escaping. Input containing quotation marks, backslashes, or control characters can therefore: - Produce malformed JSON. - Terminate the intended string value. - Insert additional object members. - Change the semantic meaning of a smart-home command. The validation applied to property names does not protect values. The numeric detection is also permissive: strings composed only of digits, periods, and minus signs are emitted as unquoted JSON even when they are not valid JSON numbers. This issue is especially significant because `set` can invoke safety- and privacy-sensitive writable properties. Arguments may also originate from external automation, generated content, or untrusted upstream data rather than direct trusted user input. ### Attack Path 1. An automation workflow passes an attacker-influenced value to `starling.sh set`. 2. Th ...[truncated 1274 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (9)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
92% confidence
Finding

Using curl -k disables TLS certificate verification, allowing a machine on the local network to impersonate the hub and intercept API keys or alter commands and responses. Although the skill notes this tradeoff and offers --cacert as a safer option, making insecure verification bypass part of the normal workflow is an unsafe transport default for a skill that controls locks, cameras, and home state.

Content

Scanner excerpt · SKILL.md (reported line 60)May include surrounding context.

md
- Create separate keys for different automation tasks if possible

### TLS Certificate Verification
- HTTPS is the default, but the script uses `curl -k` (skip cert verification) because Starling Home Hub uses a self-signed certificate
- This is acceptable on a **trusted local network** but increases MITM risk on untrusted networks
- To pin the hub's certificate instead: `starling.sh --cacert /path/to/hub-cert.pem status`
- When `--cacert` is provided, `-k` is not used and full certificate verification applies

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · scripts/starling.sh (reported line 19)May include surrounding context.

sh
KEY_FROM_CLI=false
CACERT=""

# Curl timeouts to prevent hanging
CURL_TIMEOUT=(--connect-timeout 5 --max-time 30)

usage() {

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 51)May include surrounding context.

md
### API Key Management
- **Always use the `STARLING_API_KEY` env var** — never pass keys via `--key` (visible in `ps` output)
- Never store keys in scripts, SKILL.md, or version-controlled files
- Use a `.env` file with restricted permissions: `chmod 600 .env`
- Consider a secrets manager for production/automated setups

### Least Privilege

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 77)May include surrounding context.

md
### API Key Management
- **Always use the `STARLING_API_KEY` env var** — never pass keys via `--key` (visible in `ps` output)
- Never store keys in scripts, SKILL.md, or version-controlled files
- Use a `.env` file with restricted permissions: `chmod 600 .env`
- Consider a secrets manager for production/automated setups

### Least Privilege

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
80% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · scripts/starling.sh (reported line 221)May include surrounding context.

sh
### API Key Management
- **Always use the `STARLING_API_KEY` env var** — never pass keys via `--key` (visible in `ps` output)
- Never store keys in scripts, SKILL.md, or version-controlled files
- Use a `.env` file with restricted permissions: `chmod 600 .env`
- Consider a secrets manager for production/automated setups

### Least Privilege

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
70% confidence
Finding

Tool defaults are unsafe or overly permissive (e.g. disabled TLS verification, no authentication, world-writable permissions). Unsafe defaults widen the attack surface.

Content

Scanner excerpt · SKILL.md (reported line 76)May include surrounding context.

md
- Always use HTTPS (default) to prevent local network sniffing of API keys and device data

### Snapshot Handling
- Camera snapshots contain sensitive imagery — don't store in world-readable locations
- The script sets snapshot files to `chmod 600` (owner-only) automatically
- Clean up temporary snapshot files when no longer needed

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This markdown file describes endpoints for retrieving camera snapshots and starting/stopping WebRTC streams, which can expose sensitive in-home visual data. The documentation does not include any warning or disclosure about privacy implications, user consent, or handling of captured media.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
70% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/starling.sh (reported line 165)May include surrounding context.

sh
api_post() {
  local path="$1" body="$2"
  local http_code resp
  resp=$(curl -sfS -w '\n%{http_code}' "${CURL_TIMEOUT[@]}" ${CURL_EXTRA[@]+"${CURL_EXTRA[@]}"} -X POST \
    -H "Content-Type: application/json" \
    -d "$body" \
    "${BASE_URL}${path}?key=${API_KEY}" 2>&1) || true

Static analysis

No suspicious patterns detected.