Back to skill

Security audit

hmos-connect-api-cli-skill

Security checks for vulnerabilities and agentic risk

Overview

ClawScan marks this skill suspicious with medium confidence, mainly because the installer-facing description appears inconsistent with a reported standalone date-formatting function and the scan was incomplete.

Consider the suspicious verdict and incomplete evidence before installing. The bundled CLI script was not available for analysis, and one part of SKILL.md was only partially inspected; the scan therefore cannot fully establish what the skill does. Review the skill's scope and any credential or certificate steps before deciding.

Vulnerability Patterns
  • 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
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Output HandlingUnvalidated Output Injection, Cross-Context Output, Unbounded Output
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (14)

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The supplied chunk performs only local date formatting; it does not invoke the declared CLI or implement any listed AGC operation. Although timestamp formatting could support AGC workflows, this chunk establishes no such connection. The mismatch assessment is limited to the supplied code.

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 118)May include surrounding context.

md
`<SKILL_ROOT>` = 本 skill 根目录(含 `SKILL.md` 与 `scripts/`)。

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

写入当前工程 CWD .env(CLI 只读这里;无 BOM、不覆盖已有 AGC 键、不打印 .env 内容)。先把校验通过的路径放进当前会话的 DEVECO_HOME,再跑:

powershell
# 无 BOM 只更新 DEVECO_HOME;值来自当前环境,勿 echo .env
node -e @'
const fs=require("fs"); const file=".env";
const home=process.env.DEVECO_HOME;

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

powershell
# 无 BOM 只更新 DEVECO_HOME;值来自当前环境,勿 echo .env
node -e @'
const fs=require("fs"); const file=".env";
const home=process.env.DEVECO_HOME;
if(!home) process.exit(1);
let t=fs.existsSync(file)?fs.readFileSync(file,"utf8"):"";

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

先 auth status(§3),再按下表选流程。逐步命令见 workflows.md。

text
缺凭证 / .env 读不到?          → 停,按 §3 让用户写入 .env
OAuth 要浏览器授权?            → 停,等用户点授权(非交互环境不要重试)
没有 DEVECO_HOME 且要签名/构建/真机? → 停,按 §3.1 问安装目录;禁止搜盘
用户要上传 .hap 上架/测试?     → 拒绝:商店与测试分发只接受 .app

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

先 auth status(§3),再按下表选流程。逐步命令见 workflows.md。

text
缺凭证 / .env 读不到?          → 停,按 §3 让用户写入 .env
OAuth 要浏览器授权?            → 停,等用户点授权(非交互环境不要重试)
没有 DEVECO_HOME 且要签名/构建/真机? → 停,按 §3.1 问安装目录;禁止搜盘
用户要上传 .hap 上架/测试?     → 拒绝:商店与测试分发只接受 .app

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

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

md
## 11. 不要外泄

不打印 `.env` 内容、完整 access token、`~/.connect-api-cli-token.json`、P12 密码。
需要展示配置时只给键名:`sed 's/=.*/=***/' .env`。确认登录状态用 `auth status`。
`.env`、`.certs/`、`*.p12`、token 缓存都不入库。

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 81)May include surrounding context.

md
## 安全红线

- 不打印 `.env` 内容、完整 access token、`~/.connect-api-cli-token.json`、P12 密码。展示配置只给键名:`sed 's/=.*/=***/' .env`。
- `.env`、`.certs/`、`*.p12`、token 缓存不入库。
- 版本 < 1.1.1 的 `csr-generate` 会把 `-keyPwd <明文>` 打进日志:若在旧版日志里见到,提醒用户清理并更换该 P12 密码。

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · test-cases/test-case-1.md (reported line 35)May include surrounding context.

md
## 验证方法
- 检查命令序列是否为 status → login(按需)→ status;logout → status
- 检查未外泄 `.env` 与 access token

The activation list includes generic login/logout phrases without requiring an AGC or HarmonyOS context.

Medium
Category
Trigger Abuse
Confidence
97% confidence
Finding

The description says to use the skill when the user mentions “登录” or “退出登录” (login or logout), alongside domain-specific triggers. These common phrases can refer to unrelated services, and the activation instruction provides no explicit contextual restriction or exclusions.

Content

No source excerpt is available for this finding.

User-facing dates are forced into the Asia/Shanghai timezone without user choice or a stated regional requirement.

Medium
Category
Output Handling
Confidence
93% confidence
Finding

The skill mandates Beijing time for displayed dates and explicitly requires Asia/Shanghai formatting. Although this convention is documented, it provides neither a user opt-in nor a regional business requirement that justifies overriding the user's preferred timezone.

Content

No source excerpt is available for this finding.

The troubleshooting action instructs the agent to delete a certificate without warning about the consequences.

Medium
Category
Output Handling
Confidence
89% confidence
Finding

The action column explicitly directs use of provision cert-delete --cert-ids <id>, rather than merely listing the command. The file does not warn that this removes a certificate from the account or advise checking its use by existing signing and provisioning workflows before proceeding.

Content

No source excerpt is available for this finding.

The workflow registers the device's unique identifier without warning about its disclosure to the provisioning service.

Medium
Category
Output Handling
Confidence
88% confidence
Finding

The workflow retrieves the connected device's UDID and uses device-registration and profile-creation operations. It does not warn that this persistent device identifier is submitted to the certificate/profile service, which is a privacy-relevant disclosure.

Content

No source excerpt is available for this finding.

Human-readable dates are forced to Beijing time without user opt-in.

Low
Category
Output Handling
Confidence
96% confidence
Finding

The instruction requires all natural-language date conversions to use Asia/Shanghai and prohibits UTC output, without offering a timezone choice. Explaining the eight-hour offset does not establish a regional requirement that justifies overriding the user's locale.

Content

No source excerpt is available for this finding.