Back to skill

Security audit

Imou Open Device Config

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a functional Imou camera configuration skill, but it can broadly change device settings and sends credential-bearing requests to a user-configured API URL that is not validated.

Review before installing. Use a dedicated, least-privilege Imou developer app if possible, set IMOU_BASE_URL only to the documented HTTPS Imou endpoints, keep IMOU_APP_SECRET out of shared shells and logs, and treat IoT property-set or service commands as broad remote device-control actions. Pin dependencies in a controlled environment before using this with real cameras.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/imou_client.py:23
Finding

Credential-Bearing Requests Can Be Redirected to an Untrusted or Plaintext Endpoint

Content
View full analysis
str: """Build sign: MD5 of 'time:{time},nonce:{nonce},appSecret:{app_secret}' (UTF-8), 32-char lowercase hex.""" raw = f"time:{time_sec},nonce:{nonce},appSecret:{app_secret}" return hashlib.md5(raw.encode("utf-8")).hexdigest() def _request(method: str, params: dict, app_id: str, app_secret: str, base_url: str = None) -> dict: """ Send one Open API request. :param method: API method name. :param params: Request params object. :param app_id: App ID. :param app_secret: App secret for sign. :param base_url: Optional base URL; uses env IMOU_BASE_URL or default if None. :return: Full response body as dict; check result.code for '0'. """ base = base_url or _get_base_url() url = f"{base.rstrip('/')}/openapi/{method}" time_sec = int(time.time()) nonce = uuid.uuid4().hex sign = _build_sign(time_sec, nonce, app_secret) body = { "system": { "ver": "1.0", "appId": app_id, "sign": sign, "time": time_sec, "nonce": nonce, }, "id": str(uuid.uuid4()), "params": params, } headers = { "Content-Type": "application/json", OPENCLAW_HEADER: OPENCLAW_HEADER_VALUE, } resp = requests.post(url, headers=headers, json=body, timeout=30) ``` The CLI passes the environment-controlled URL directly into this request path: ```python APP_ID = os.environ.get("IMOU_APP_ID", "") APP_SECRET = os.environ.get("IMOU_APP_SECRET", "") BASE_URL = os.environ.ge ...[truncated 3082 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Dependency Version Is Not Reproducibly Pinned

Content
View full analysis
=2.28.0 ``` The installation guidance further uses: ```bash pip install requests ``` ### Technical Analysis The project depends on the legitimate and widely used `requests` package. No evidence indicates that the currently named dependency is malicious, misspelled, or obtained from an unsafe custom repository. However, the lower-bound-only constraint allows any future `requests` release to be installed. The documented `pip install requests` command does not even enforce the stated minimum version. The resulting environment is therefore not reproducible and may install dependency versions that were never reviewed with this Skill. Python package installation and imports execute code with the privileges of the user or service running the Skill. A future compromised package release, compromised transitive dependency, or materially incompatible update could therefore affect installation-time behavior, TLS handling, or outbound requests. This is a supply-chain hardening weakness rather than evidence of an actively malicious dependency. ### Attack Path 1. A user follows the documented installation instructions or installs from `requirements.txt`. 2. Package resolution selects the newest available compatible release and its current transitive dependencies. 3. If a future selected release or dependency is compromised, malicious installation or import-time code executes under the installing user's privileges. 4. Because the package is used for credential-bearing network requests, compromised dependency code could access process environment variables or intercept API traffic. 5. The possible effects depend on the privileges of the process and the behavior of the compromised package. ### Impact ...[truncated 530 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
Findings (15)

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

cmd_service_invoke accepts an arbitrary service ref and JSON content and forwards them directly to iot_device_control, allowing invocation of any device-exposed thing-model service. If a device model includes sensitive functions such as reboot, reset, firmware actions, streaming changes, or account-related operations, this skill can be abused to perform unauthorized or destructive actions far outside the described security configuration use case.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Because these generic IoT setters/controllers can modify arbitrary properties and invoke arbitrary services, the lack of guardrails or user-confirmation becomes security-relevant rather than merely UX-related. In this skill context, broad remote device modification coupled with no built-in restriction or approval path increases the chance of stealthy or unintended device reconfiguration.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill requires environment secrets and makes outbound network requests, but it does not declare an explicit tool scope such as permissions or allowed-tools. That creates an authorization gap: a host agent may expose broader capabilities than intended, allowing the skill to access sensitive environment data or perform network actions without clear user-visible constraints. In this context, the skill is specifically designed to use app credentials and remote API calls, so the missing scope is more dangerous because secret handling and device-control operations are core behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The document explicitly describes how to obtain an admin-scoped access token and use it to manage device security settings, but provides no warning about the sensitivity of these credentials or the consequences of misuse. In a skill intended to automate camera privacy mode and monitoring behavior, omission of consent, authorization, and secure token-handling guidance materially increases the risk of unauthorized surveillance changes or abuse.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

These sections document APIs that can disable privacy mode, alter motion detection, and change alarm sensitivity/schedules without any warning that such actions affect physical privacy and security monitoring. Because this skill is specifically for security configuration of consumer cameras, the lack of safety rails or user-warning language makes misuse more dangerous: an integrator could silently reduce detection, suppress monitoring, or manipulate privacy controls on deployed devices.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The CLI exposes generic thing-model inspection and control operations (iot model, arbitrary property get/set, and service invocation) that go beyond the stated purpose of managing motion detection, sensitivity, and privacy mode. In a security-focused device-management skill, this scope expansion increases the attack surface and enables misuse of the skill as a general remote control interface for device capabilities not disclosed in the manifest.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The module docstring states 'All descriptions and output in English,' which is a natural-language locale restriction applying to all users of the skill. This is a language policy concern because the file does not offer any user choice, opt-in, or documented justification for forcing English output.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
80% 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/imou_client.py (reported line 63)May include surrounding context.

python
"Content-Type": "application/json",
        OPENCLAW_HEADER: OPENCLAW_HEADER_VALUE,
    }
    resp = requests.post(url, headers=headers, json=body, timeout=30)
    resp.raise_for_status()
    return resp.json()

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This code exposes functions that change camera/privacy status via remote API calls, but the implementation has no confirmation prompt, visible logging, or user-facing disclosure at the point of action. Although the docstring describes the API, it does not warn users that invoking the function will immediately modify device behavior.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

These functions update motion-detection schedules and sensitivity on a device, which can materially affect monitoring behavior, but there is no confirmation, print/log notice, or explicit warning beyond terse API docstrings. The absence of disclosure increases the risk that callers trigger impactful configuration changes without realizing it.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The thing-model helpers expose generic property writes and service invocation for any ref/value pair supplied by a caller, which exceeds the skill’s declared purpose of managing motion detection schedule, sensitivity, and privacy mode. In this context, a higher-level agent could use the library to alter unrelated device capabilities or invoke unexpected commands on supported products, creating an authorization/scope-expansion issue rather than a narrowly bounded configuration tool.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The generic iotDeviceControl function can dispatch arbitrary service commands discovered from a thing model, despite the skill being presented as a limited security-configuration capability. That mismatch makes the skill more dangerous because callers may gain a broad remote command surface over devices, potentially triggering unintended operational changes beyond privacy or motion settings.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
95% confidence
Finding

The dependency is specified as requests>=2.28.0, which allows any future version and does not guarantee a reproducible or reviewed install. In a security-sensitive skill that manages device security settings and uses API credentials, unpinned dependencies increase supply-chain risk and make it harder to ensure vulnerable or breaking releases are not introduced unexpectedly.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
requests>=2.28.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
90% confidence
Finding

Because requests is not pinned, it is impossible to verify whether installation will resolve to a version affected by known advisories. This is more concerning in this skill's context because it handles Imou developer credentials and likely makes outbound network requests to device/cloud APIs, so dependency-level flaws could expose secrets, alter request security behavior, or affect device configuration operations.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The model command retrieves and displays not only properties and services but also events for the product thing model. Enumerating events is not necessary to manage motion schedules, sensitivity, or privacy mode, and broadens the skill into general device introspection rather than the narrowly described configuration function.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.