Back to skill

Security audit

jf-open-pro-smart-doorlock-control

Security checks for vulnerabilities and agentic risk

Overview

This skill is openly for smart-lock control, but it can remotely unlock a physical door with weak safeguards and handles sensitive credentials in risky ways.

Install only if you trust the publisher and can tightly control who can invoke the skill. Do not run unlock through automation without an explicit human confirmation, keep JF_ENDPOINT fixed to a documented vendor hostname, avoid passing real lock passwords on the command line, and treat printed DeviceToken values as sensitive temporary credentials.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/doorlock_control.py:29
Finding

Unrestricted API Endpoint Can Redirect Sensitive Authentication and Door-Lock Data

Content
View full analysis
Dict[str, str]: """Generate request headers containing a signature and timestamp.""" time_millis = get_time_millis() signature = generate_signature(uuid, app_key, app_secret, time_millis, move_card) return { "Content-Type": "application/json; charset=UTF-8", "uuid": uuid, "appKey": app_key, "timeMillis": time_millis, "signature": signature, "X-Request-Id": os.urandom(16).hex() } ``` The original source contains a Chinese docstring; it is translated above without changing executable behavior. ```python body = {"UserName": username} if password: body["PassWord"] = password if keepalive_time > 0: body["KeepaliveTime"] = keepalive_time response = requests.post(url, headers=headers, json=body, timeout=30) ``` ```python body = {"sn": device_sn, "props": {}} if password: body["props"]["doorLock"] = { "remoteUnlock": { "password": password } } else: body["props"]["doorLock"] = { "remoteOneKeyUnlock": 1, "userType": 5, "memberID": 1 } response = requests.post(url, headers=headers, json=body, timeout=30) ``` ### Technical Analysis The API hostname is taken directly from the `JF_ENDPOINT` environment variable and interpolated into the destination URL without validating it against the four documented vendor endpoints. Every request transmits authentication-related headers containing the account UUID, application key, timestamp, and a signature derived from the application secr ...[truncated 2272 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/doorlock_control.py:347
Finding

Door-Lock Passwords Are Accepted and Documented as Command-Line Arguments

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/doorlock_control.py:214
Finding

Device Access Tokens Are Printed to Standard Output in Plaintext

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (18)

Tainted flow: 'url' from os.getenv (line 164, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
96% confidence
Finding

The request destination is derived from an environment-controlled endpoint value, so an attacker who can influence JF_ENDPOINT can redirect authenticated API calls to an arbitrary host. Because the code sends sensitive headers such as uuid, appKey, timeMillis, and signature, this creates a realistic SSRF/credential-exfiltration path rather than a harmless configurability feature.

Content

Scanner excerpt · scripts/doorlock_control.py (reported line 65)May include surrounding context.

python
if access_token:
        body["accessToken"] = access_token

    response = requests.post(url, headers=headers, json=body, timeout=30)
    result = response.json()

    if result.get("code") != 2000:

Tainted flow: 'url' from os.getenv (line 164, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

This call also uses a URL ultimately influenced by JF_ENDPOINT, allowing a local or deployment-level attacker to reroute signed device-capability requests to an attacker-controlled server. In this skill context, the transmitted headers are tied to smart-lock control, so redirecting them materially increases the risk of credential harvesting and follow-on unauthorized device operations.

Content

Scanner excerpt · scripts/doorlock_control.py (reported line 91)May include surrounding context.

python
body = {"Name": "DoorFunction"}

    response = requests.post(url, headers=headers, json=body, timeout=30)
    result = response.json()

    if result.get("code") != 2000:

Tainted flow: 'url' from os.getenv (line 164, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
95% confidence
Finding

The door-lock configuration request is sent to a host derived from an environment variable without trust validation. That exposes device metadata and authentication material to an attacker-controlled endpoint and is especially sensitive here because the skill manages physical-access devices.

Content

Scanner excerpt · scripts/doorlock_control.py (reported line 117)May include surrounding context.

python
}
    }

    response = requests.post(url, headers=headers, json=body, timeout=30)
    result = response.json()

    if result.get("code") != 2000:

Tainted flow: 'url' from os.getenv (line 164, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
97% confidence
Finding

The device-login request can be redirected via the environment-controlled endpoint, causing usernames, optional passwords, and signed headers to be posted to an unintended server. Since this path handles credentials for a smart door-lock ecosystem, the misuse can directly facilitate account compromise and unauthorized physical access.

Content

Scanner excerpt · scripts/doorlock_control.py (reported line 144)May include surrounding context.

python
if keepalive_time > 0:
        body["KeepaliveTime"] = keepalive_time

    response = requests.post(url, headers=headers, json=body, timeout=30)
    result = response.json()

    if result.get("code") != 2000:

Tainted flow: 'url' from os.getenv (line 164, credential/environment) → requests.post (network output)

Critical
Category
Data Flow
Confidence
98% confidence
Finding

The remote-unlock command is sent to a URL influenced by JF_ENDPOINT, enabling an attacker to intercept lock-control requests and the associated authentication material by changing the endpoint. In the context of a door-unlock skill, any weakness around request routing is highly dangerous because it can support unauthorized control of a physical security device.

Content

Scanner excerpt · scripts/doorlock_control.py (reported line 182)May include surrounding context.

python
"memberID": 1
        }

    response = requests.post(url, headers=headers, json=body, timeout=30)
    result = response.json()

    if result.get("code") != 2000:

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `SKILL.md` | 技能文档 |

Missing User Warnings

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill can issue an irreversible remote door-unlock command immediately based on CLI arguments, with no secondary confirmation, user-presence check, or explicit safety warning. In a physical-security context, this greatly raises the chance of accidental unlocks, misuse by another local user/process, or automation-triggered unsafe actions.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
96% confidence
Finding

The skill performs sensitive operations using environment variables and network access, including obtaining device tokens and remotely unlocking a physical door lock, but it does not declare any explicit tool scope or allowed permissions. This increases the risk of over-broad runtime access, weak reviewability, and accidental or unauthorized use of privileged capabilities in a context involving physical security.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Using a broad trigger like “开锁” can cause accidental invocation from ordinary conversation, which is especially dangerous because this skill can remotely unlock a smart door lock. In this context, trigger ambiguity is not merely a usability issue: it can translate directly into unintended physical access.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The module docstring and user-facing console messages are written in Chinese, which imposes a specific language on users without any opt-in or stated locale constraint. Under the policy, language-specific behavior should either be optional or clearly justified as region-specific.

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/doorlock_control.py (reported line 65)May include surrounding context.

python
if access_token:
        body["accessToken"] = access_token

    response = requests.post(url, headers=headers, json=body, timeout=30)
    result = response.json()

    if result.get("code") != 2000:

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/doorlock_control.py (reported line 91)May include surrounding context.

python
if access_token:
        body["accessToken"] = access_token

    response = requests.post(url, headers=headers, json=body, timeout=30)
    result = response.json()

    if result.get("code") != 2000:

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/doorlock_control.py (reported line 117)May include surrounding context.

python
if access_token:
        body["accessToken"] = access_token

    response = requests.post(url, headers=headers, json=body, timeout=30)
    result = response.json()

    if result.get("code") != 2000:

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/doorlock_control.py (reported line 144)May include surrounding context.

python
if access_token:
        body["accessToken"] = access_token

    response = requests.post(url, headers=headers, json=body, timeout=30)
    result = response.json()

    if result.get("code") != 2000:

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/doorlock_control.py (reported line 182)May include surrounding context.

python
if access_token:
        body["accessToken"] = access_token

    response = requests.post(url, headers=headers, json=body, timeout=30)
    result = response.json()

    if result.get("code") != 2000:

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
82% confidence
Finding

文件中的名称、描述、触发词和操作说明均为中文,但未声明该技能仅面向中文用户,也未提供语言选择或用户确认。按语言/locale 政策,这可能构成默认强制特定语言的自然语言策略问题。

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
96% confidence
Finding

This Python file contains natural-language documentation entirely in Chinese, and the script's user-facing notice is also Chinese. Under the stated policy, forcing a specific language without user opt-in is a natural-language locale violation unless the constraint is explicitly justified or optionality is offered.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest says the skill supports checking lock capability, logging into the device, obtaining device API access tokens, and remote one-click unlock. This file also defines and exposes a separate get-config action that retrieves detailed door lock configuration via GetDoorConfig, which is an additional device-inspection capability not mentioned in the stated description.

Content

No source excerpt is available for this finding.