Back to skill

Security audit

UniFi Network Diagnostics

Security checks for vulnerabilities and agentic risk

Overview

This UniFi troubleshooting skill is mostly coherent, but it can automatically run a locally discovered helper program and may expose network details despite promising redaction.

Install only if you are comfortable with the agent running local network diagnostics and executing a local UniFi helper. Before approving --write, verify the exact helper path yourself and ensure it is a trusted executable; avoid using broad or spoofable PATH entries, and do not share diagnostic output publicly without reviewing it for private network names or other identifying details.

Vulnerability Patterns
  • Tool Hijacking and SpoofingModifies or replaces tools so legitimate-looking calls execute attacker logic
  • 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
Findings (2)

T07 · Tool Hijacking and Spoofing

Warning
Location
scripts/discover-unifi-config.sh:103
Finding

Automatic Execution and Persistence of an Unverified UniFi Helper

Content
View full analysis
/dev/null 2>&1; then sites_ok=true fi if timeout 8 "$selected_path" devices >/dev/null 2>&1; then devices_ok=true fi if timeout 8 "$selected_path" clients-summary >/dev/null 2>&1; then clients_summary_ok=true fi else add_error "missing timeout; skipped helper capability probes" fi ``` The selected path can subsequently be persisted by `scripts/discover-unifi-config.sh:154-173`: ```bash config_written=false if [[ "$WRITE_CONFIG" == "true" ]]; then if [[ "$selected_usable" != "true" || -z "$selected_path" ]]; then add_error "not writing config because no usable helper was discovered" else mkdir -p "$CONFIG_DIR" tmp_file="${CONFIG_FILE}.tmp" jq -n \ --arg helper "$selected_path" \ --arg updated_at "$(date -u +'%Y-%m-%dT%H:%M:%SZ' 2>/dev/null || printf 'unknown')" ...[truncated 5064 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/diagnose-network.sh:113
Finding

Free-Form UniFi Helper Output Can Bypass Sensitive-Data Redaction

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (4)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding

The skill invokes shell-based diagnostic scripts and system commands but does not declare any explicit tool scope or permission boundary. That creates an authorization ambiguity where an agent may execute shell actions more broadly than intended, increasing the chance of unintended local command execution against the operator's machine.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The description includes broad triggers like 'vague network-health questions,' which can cause the skill to activate for loosely related requests and begin autonomous diagnostics on the local environment. In a skill with shell capability and local helper discovery, overbroad invocation expands the chance of unnecessary system probing and exposure of local network information.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
92% confidence
Finding

The skill explicitly authorizes autonomous follow-up tests 'without asking,' including shell commands and re-querying local helper configuration. Even if described as read-only, this reduces user awareness and consent for local environment interrogation, and it can expose sensitive metadata about the household network, installed tools, routing, and resolver state.

Content

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

md
## Autonomous Follow-Up Tests

Run safe follow-ups without asking when they help isolate the fault:

- Repeat the bundled diagnostic script to check whether packet loss, DNS timing, or gateway reachability is transient.
- Use bounded `ping`, `dig`, `getent`, `ip route`, `resolvectl status`, or `nmcli device show` checks if installed.

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/discover-unifi-config.sh (reported line 171)May include surrounding context.

sh
contains_secrets: false,
        note: "Local Operator config. Do not commit."
      }' > "$tmp_file"
    chmod 600 "$tmp_file" 2>/dev/null || true
    mv "$tmp_file" "$CONFIG_FILE"
    config_written=true
  fi

Static analysis

No suspicious patterns detected.