Back to skill

Security audit

yzl-aiot-north

Security checks for vulnerabilities and agentic risk

Overview

ClawScan rates this skill suspicious with medium confidence: scanners report insecure handling of bearer tokens, credential-backed repository publishing, and capabilities or examples that exceed the stated AIoT integration purpose.

Consider avoiding installation until the plaintext-HTTP examples and undeclared credential, publishing, and configuration capabilities have been reviewed. If you do use it, verify the destination and security of any API or webhook, and treat device-control examples as actions that may affect real equipment. The scan is partial, so it cannot establish that all bundled behavior was inspected.

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

T09 · Insecure Skill Coding Practices

Error
Location
docs/06-设施属性修改接口说明_v1.0_20261121.md
Finding

Authenticated API examples expose bearer tokens over plaintext HTTP

Content
View full analysis

Impact

An observer can capture and replay the bearer token to access platform data or perform changes within the token's permissions. An active attacker can modify the documented metric-access change in transit.

Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (26)

Tainted flow: 'req' from os.environ.get (line 39, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · examples/python/bridge_webhook.py (reported line 40)May include surrounding context.

python
headers["X-AIoT-Signature"] = "sha256=" + hmac.new(
            SECRET.encode("utf-8"), raw, hashlib.sha256).hexdigest()
    req = urllib.request.Request(WEBHOOK_URL, data=raw, headers=headers, method="POST")
    with urllib.request.urlopen(req, timeout=10) as resp:
        return resp.status

Tainted flow: 'req' from os.environ.get (line 105, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
94% confidence
Finding

Sending environment-provided credentials to the intended AIoT API is legitimate, but urllib's default redirect handling can forward the explicitly supplied Authorization and API-key headers to a different origin. A malicious or compromised endpoint could redirect an authenticated request to an attacker-controlled host, exposing credentials that may permit device access and commands.

Content

Scanner excerpt · lib/north_client.py (reported line 107)May include surrounding context.

python
payload = json.dumps(body, ensure_ascii=False).encode("utf-8") if body is not None else None
        req = urllib.request.Request(url, data=payload, headers=headers, method=method.upper())
        try:
            with urllib.request.urlopen(req, timeout=self.timeout) as resp:
                status, raw = resp.status, resp.read().decode("utf-8", "replace")
        except urllib.error.HTTPError as e:
            status, raw = e.code, e.read().decode("utf-8", "replace")

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The reported bundled publishing behavior is outside device integration and can stage local changes, acquire hosting credentials, and publish repository contents to fixed destinations. SKILL.md lists sync.sh as a packaged maintenance resource without defining an authorization boundary for running it; this creates an accidental disclosure risk, although nothing here establishes automatic execution.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

Ordinary device listing matches the declared integration purpose. Explicitly requesting plaintext secrets is a distinct sensitive capability not disclosed in the description. Supporting JWT/API-Key authentication does not itself imply retrieving device credentials. The snippet does not show external transmission of those secrets.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
87% confidence
Finding

Ordinary device listing fits the declared integration purpose. Explicitly retrieving plaintext device credentials is a distinct sensitive capability not disclosed by the description; mentioning JWT/API-Key authentication does not disclose retrieval of device passwords. The snippet does not show transmission of those secrets to an external destination.

Content

No source excerpt is available for this finding.

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- **Python ≥ 3.8 / Node.js ≥ 18**:直接用 `lib/north_client.py`(标准库)或 `lib/north_client.mjs`(原生 fetch),**无需安装 SDK 或第三方包**

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `lib/north_client.mjs` | Node.js(原生 fetch) | 同名方法(camelCase) |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
客户端与文档都随技能打包:`lib/north_client.py`、`lib/north_client.mjs`、`docs/`(01 北向接口说明、04 独立服务器与 Webhook、05 故障排查、06 设施属性修改)。不需要外部 SDK。

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- 🧰 新增 `lib/north_client.py`(标准库)与 `lib/north_client.mjs`(原生 fetch),覆盖全部北向 REST 接口

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `lib/README.md` | — | 接口 ↔ 方法 ↔ CLI 对照表 |

Incomplete referenced artifact analysis

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
| `examples/js/bridge_webhook.mjs` | 同上(Node.js ESM) |

The script implements credential-backed repository publishing, which is unrelated to the declared AIoT integration capabilities.

High
Category
Excessive Agency
Confidence
99% confidence
Finding

When invoked, this maintainer-style script stages all repository changes and pushes to fixed repositories using environment credentials, a credential file outside the skill, or an existing GitHub CLI session. It can unintentionally publish sensitive local files and exposes tokens in Git command arguments, although it is not shown to run automatically.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_write, network.

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.

Shadow Command Trigger

Medium
Category
Trigger Abuse
Confidence
70% confidence
Finding

Shadow Command Trigger: description clause 'ebhook 或数据管道:JWT/API-Key 认证、设备/实时值/历史/聚合/指令/告警 REST、北向 MQTT 订阅、REST 轮询的 HTTP/Webhook 桥(Bridge);也覆盖型号设施的查询与单设施属性修改(PATCH /open/product/{id}/metric/{key}:access 改 rw 才能下发指令、改 dataType/label/visible)。Use when integrating 云智联 AIoT northbound data, or when the user' conflicts with built-in command 'open'

Content

No source excerpt is available for this finding.

The verification workflow includes a device-control command without warning that it may change real equipment state.

Medium
Category
Output Handling
Confidence
91% confidence
Finding

The verification workflow recommends a get/set command after changing metric properties without distinguishing read-only verification from physical actuation. In an agent-operated IoT skill, treating set as routine validation can change connected equipment beyond the user's requested configuration edit.

Content

No source excerpt is available for this finding.

The command tutorial executes a device-state change without warning about its effects on connected equipment.

Medium
Category
Output Handling
Confidence
91% confidence
Finding

The quickstart sends a switch-on command and then shows another executable set call as an alternative, without a physical-effects warning or confirmation gate. When adapted to a real device, running the tutorial can actuate equipment and potentially issue the command twice.

Content

No source excerpt is available for this finding.

MCP server referenced without pinned version: 'npx aiot-north'.

Medium
Category
MCP Rug Pull
Confidence
70% confidence
Finding

npx commands without a version suffix (e.g. @1.0.0) create a rug-pull risk if the upstream server is compromised and publishes a malicious update.

Content

No source excerpt is available for this finding.

The Bridge startup example enables webhook forwarding without warning that device data may leave the system.

Medium
Category
Output Handling
Confidence
87% confidence
Finding

The runnable example configures AIOT_WEBHOOK_URL and starts the Bridge, enabling device-data forwarding when that variable is set. The reference at L193 points to webhook formats but does not warn users that telemetry will be transmitted to the configured destination or advise them to verify that destination before startup.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% 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 · docs/04-独立服务器与Webhook.md (reported line 161)May include surrounding context.

text

```bash
curl -X POST http://127.0.0.1:8080/commands/DEV-1 \
  -H 'Content-Type: application/json' \
  -d '{"cmd":"set","args":["sw","1"]}'

The Bridge troubleshooting instructions recommend opening the cloud firewall without warning about exposing the service to untrusted networks.

Medium
Category
Output Handling
Confidence
94% confidence
Finding

The troubleshooting advice combines an all-interface listener with opening the cloud security group, without specifying trusted source addresses or authentication. This can expose telemetry endpoints to untrusted clients; restricting CORS is not a substitute for network access control or authentication.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
99% confidence
Finding

The example sends a bearer token and a configuration-changing request to a public IP over unencrypted HTTP. An on-path attacker can steal the token, alter the request, or impersonate the platform, even if the destination is legitimate.

Content

Scanner excerpt · docs/06-设施属性修改接口说明_v1.0_20261121.md (reported line 99)May include surrounding context.

1. 把浮球输入改成开关类型(可画阶梯曲线)

bash
curl -X PATCH 'http://47.111.84.144:3005/open/product/RSTICQ/metric/in1' \
  -H "Authorization: Bearer $TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"dataType":"enum","label":"浮球1(高/低)"}'

The module documents HMAC-signed webhook delivery, but sends unsigned requests when no secret is configured.

Medium
Category
Excessive Agency
Confidence
97% confidence
Finding

The example promises HMAC-signed delivery but silently sends unsigned requests when AIOT_WEBHOOK_SECRET is missing, including under the documented startup configuration. Receivers that rely on the advertised signing guarantee may accept unauthenticated events; correctly configured receivers instead reject delivery.

Content

No source excerpt is available for this finding.

The client exposes product-level metrics configuration writes beyond the manifest's stated single-metric modification scope.

Medium
Category
Excessive Agency
Confidence
93% confidence
Finding

The manifest describes model/facility queries and single-facility property changes through PATCH /open/product/{id}/metric/{key}. In contrast, updateMetricsConfig accepts control and compare configurations and sends them to a product-level metrics-config endpoint using PUT, exposing a broader configuration-write capability than the declared single-metric edits.

Content

No source excerpt is available for this finding.

Unsafe Defaults

Medium
Category
Tool Misuse
Confidence
75% 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 · lib/north_client.py (reported line 81)May include surrounding context.

python
raise ValueError("account 和 password 必填")
        data = self.request("POST", "/auth/login",
                            body={"account": account, "password": password},
                            auth=False)
        token = (data or {}).get("token")
        if not token:
            raise NorthError("登录响应中没有 token", body=data)

Product-wide facility configuration writes exceed the manifest's stated single-facility editing scope.

Medium
Category
Excessive Agency
Confidence
91% confidence
Finding

The manifest describes model/facility queries and single-facility property changes through PATCH /open/product/{id}/metric/{key}. At L261–L268, update_metrics_config instead submits caller-supplied control and compare configurations to a product-wide PUT endpoint without identifying a single facility, exposing a broader configuration-writing operation.

Content

No source excerpt is available for this finding.