Back to skill

Security audit

aispeech_ainote

Security checks for vulnerabilities and agentic risk

Overview

The skill is purpose-aligned for managing AI office notes and tasks, but it grants sensitive read/write/delete access using a long-lived bearer token with under-scoped storage and endpoint guidance.

Install only if you trust the publisher and need this OpenClaw integration. Use skill-scoped secret injection rather than gateway-global env vars or plaintext backup files, keep the base URL on the official HTTPS origin, grant only needed scopes, and require explicit confirmation before deleting or moving notes, groups, todos, or hotwords.

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

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:15
Finding

Bearer Token May Be Forwarded to an Untrusted or Plaintext Endpoint

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:15-18, SKILL.md:112-116, and api_reference.md:9-12
Vulnerability Type: Unrestricted credential destination and insufficient transport security
Risk Level: High

Vulnerable Code

yaml
metadata:
  openclaw:
    baseUrl: "${AIWORK_BASE_URL:-https://aiworks.cn}"
    requires:
      env: ["AIWORK_AUTH_TOKEN"]
    optionalEnv: ["AIWORK_BASE_URL"]
text
Authorization: Bearer ${AIWORK_AUTH_TOKEN}
text
Base URL: `${AIWORK_BASE_URL:-https://aiworks.cn}`

The API reference additionally declares both HTTP and HTTPS as supported protocols at api_reference.md:9 while requiring bearer authentication at api_reference.md:12.

Technical Analysis

The API destination is controlled through the optional AIWORK_BASE_URL environment variable. Protected API requests are instructed to carry AIWORK_AUTH_TOKEN as a bearer credential, but the Skill does not specify any validation of the configured URL.

In particular, the documented behavior does not:

  • Require the configured URL to use HTTPS.
  • Restrict the hostname to an approved set of API origins.
  • Prevent credentials from being sent after a cross-origin redirect.
  • Require certificate or final-origin validation before attaching the authorization header.

Because bearer tokens grant access based solely on possession, sending one to an attacker-controlled host or over plaintext HTTP immediately compromises the credential. Exploitation requires the attacker to influence the Skill's environment, configuration, or request destination.

Attack Path

  1. An attacker or compromised component modifies AIWORK_BASE_URL to reference an attacker-controlled server or a plaintext HTTP endpoint.
  2. The agent constructs protected API requests using the modified base URL.
  3. The agent attaches Authorization: Bearer ${AIWORK_AUTH_TOKEN} as instructed.
  4. The attacker-controlled ...[truncated 882 chars]
Remediation
View remediation

Remediation Suggestions

  1. Require AIWORK_BASE_URL to use HTTPS and reject HTTP URLs before making any request.
  2. Allowlist the expected API hostname, such as aiworks.cn, and explicitly approved subdomains.
  3. Normalize and validate the URL before use, including its scheme, hostname, port, and user-information fields.
  4. Disable automatic redirects for authenticated requests, or validate every redirect target and remove the authorization header whenever the origin changes.
  5. Attach Authorization only after the final destination has passed origin validation.
  6. Reject URLs containing embedded credentials, unexpected ports, loopback addresses, private network addresses, or alternate hostname representations unless explicitly required.
  7. Update api_reference.md to require HTTPS for every authenticated endpoint.
  8. Rotate and revoke any token suspected of having been transmitted to an untrusted or plaintext endpoint.

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:20
Finding

Long-Lived Bearer Token May Be Exposed Through Global Environment and Plaintext Storage

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:20-30, SKILL.md:75-105
Vulnerability Type: Excessive secret exposure and insecure credential storage
Risk Level: Medium

Vulnerable Code

yaml
tokenManagement:
  source: "思必驰开放平台应用管理"
  lifecycle: "长期有效,无过期时间。安装时配置,平台需持久化存储"
  configLocations:
    - path: "skills.entries.<slug>.env.AIWORK_AUTH_TOKEN"
    - path: "env.vars.AIWORK_AUTH_TOKEN"
    - path: "~/.aispeech/aitablet.json"
json
{
  "aitablet-skill": {
    "env": {
      "AIWORK_AUTH_TOKEN": "你的授权凭证",
      "AIWORK_BASE_URL": "https://aiworks.cn"
    }
  }
}
bash
export AIWORK_AUTH_TOKEN=$(cat ~/.aispeech/aitablet.json | jq -r '.[].env.AIWORK_AUTH_TOKEN')

The source documentation states that the gateway-global env.vars.AIWORK_AUTH_TOKEN option makes the token visible to every Skill. It also recommends a local JSON file as a backup but does not prescribe restrictive file permissions or an encrypted secret store.

Technical Analysis

The Skill documents a long-lived bearer token with no expiration and offers two unnecessarily broad exposure mechanisms:

  • A gateway-global environment variable visible to unrelated Skills.
  • A plaintext JSON file in the user's home directory, followed by exporting the recovered value into the process environment.

Global environment placement violates least-privilege secret isolation because components that do not need the API credential may receive it. Plaintext storage also makes token confidentiality dependent entirely on filesystem permissions, backups, diagnostic archives, and access by local processes.

The documentation does not require owner-only permissions, encrypted storage, short-lived credentials, token rotation, or protection against accidental inclusion in logs and support bundles.

Attack Path

  1. The user follows the documented global environment or local-file configuration option.

...[truncated 1096 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the gateway-global environment option and inject the token only into the aitablet Skill process.
  2. Store the token in the OpenClaw or operating-system secret manager rather than a plaintext JSON file.
  3. If a compatibility file is unavoidable, create it with owner-only permissions such as mode 0600, verify ownership before reading it, and exclude it from backups, logs, and diagnostic archives.
  4. Avoid exporting the token into a broadly inherited process environment.
  5. Use short-lived, narrowly scoped credentials where supported and implement secure rotation.
  6. Request only the scopes necessary for the user's selected operations.
  7. Redact authorization headers and environment values from logs, traces, error reports, and command history.
  8. Provide a documented revocation procedure and immediately rotate credentials after suspected exposure.
  9. Prefer direct secret injection over shell-based recovery commands that unnecessarily expose the credential to child processes.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
94% confidence
Finding

The skill exposes a direct delete endpoint for todos using a path parameter, with no documented validation, confirmation, or target-verification workflow. If an agent is induced to pass the wrong todoUid or acts on ambiguous user input, it could delete user task data without sufficient safeguards.

Content

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

md
| 查待办列表        | `GET /todo/list`              | `TODO_READ`      |
| 新建待办         | `POST /todo`                  | `TODO_WRITE`     |
| 更新待办         | `PUT /todo/{todoUid}`         | `TODO_WRITE`     |
| 删除待办         | `DELETE /todo/{todoUid}`      | `TODO_WRITE`     |
| 查用户标签知识库     | `GET /label/knowledge/user`   | `LABEL_READ`     |
| 同步用户标签知识库    | `POST /label/knowledge/user/sync` | `LABEL_WRITE` |
| 查笔记标签        | `GET /label/knowledge/note`   | `LABEL_READ`     |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
89% confidence
Finding

The hotword deletion endpoint is exposed as a destructive write action without documented constraints on what can be deleted or any confirmation process. In an agent setting, malformed or adversarial prompts could lead to unintended deletion of user-customized hotwords, degrading recognition or workflow quality.

Content

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

md
| 搜索待办个人数据库      | `POST /database/todo/search` | `KNOWLEDGE_READ` |
| 查询热词词库       | `GET /hotword/content`         | `HOTWORD_READ`   |
| 新增热词         | `POST /hotword/add`            | `HOTWORD_WRITE`  |
| 删除热词         | `DELETE /hotword/delete`       | `HOTWORD_WRITE`  |
| 修改热词         | `PUT /hotword/update`          | `HOTWORD_WRITE`  |
| 标签关联查询       | `GET /label/knowledge/relations` | `LABEL_READ`   |
| 绑定笔记到标签知识库   | `POST /label/knowledge/note/bind` | `LABEL_WRITE` |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
95% confidence
Finding

The note deletion endpoint allows direct deletion by noteUid, and this skill handles sensitive personal meeting notes and records. Because the content domain is private user data, any ambiguity, prompt injection, or mistaken identifier selection can cause destructive impact against potentially important personal or business records.

Content

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

md
| 标签关联查询       | `GET /label/knowledge/relations` | `LABEL_READ`   |
| 绑定笔记到标签知识库   | `POST /label/knowledge/note/bind` | `LABEL_WRITE` |
| 绑定待办到标签知识库   | `POST /label/knowledge/todo/bind` | `LABEL_WRITE` |
| 删除笔记(入回收站)   | `DELETE /note/{noteUid}`       | `NOTE_WRITE`     |
| 新建笔记分组       | `POST /note/group/create`      | `NOTE_WRITE`     |
| 移动笔记分组       | `PUT /note/group/move`         | `NOTE_WRITE`     |
| 删除笔记分组(入回收站) | `DELETE /note/group/{groupUid}`| `NOTE_WRITE`     |

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
93% confidence
Finding

Deleting a note group by groupUid can affect multiple organized notes at once, making misuse more damaging than deletion of a single item. The skill documentation does not specify safety checks, previews of impacted contents, or confirmation requirements, so a wrong parameter or socially engineered command could disrupt a user's information organization at scale.

Content

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

md
| 删除笔记(入回收站)   | `DELETE /note/{noteUid}`       | `NOTE_WRITE`     |
| 新建笔记分组       | `POST /note/group/create`      | `NOTE_WRITE`     |
| 移动笔记分组       | `PUT /note/group/move`         | `NOTE_WRITE`     |
| 删除笔记分组(入回收站) | `DELETE /note/group/{groupUid}`| `NOTE_WRITE`     |

## 参数与返回约定

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill advertises very broad trigger conditions such as querying, deleting, searching, and updating personal notes, todos, labels, and hotwords based on common user intents. In an agent environment, this can cause over-selection of the skill for ambiguous requests and may route benign natural-language queries into a tool that can read or modify sensitive personal data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation lists destructive capabilities including deleting todos, deleting notes, and deleting note groups, but does not clearly require user confirmation or prominently warn that these actions alter or remove personal data. In a conversational agent, omission of those safeguards increases the risk of accidental or manipulated destructive actions against user content.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The document repeatedly instructs skills to use Authorization: Bearer {AIWORK_AUTH_TOKEN} and explains that the token is issued at installation, but it does not warn that this credential is sensitive and must not be logged, exposed, or mishandled. For markdown files, omission of warnings about behaviors affecting privacy or security is in scope.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file describes delete and write operations such as deleting notes, deleting todos, deleting hotwords, and deleting note groups, but it does not include a user-facing warning section about their impact on user data. Under the markdown-file criteria for SQP-2, documentation should warn when skill behavior can affect user data or system integrity.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
83% confidence
Finding

This file presents all user-facing documentation in Chinese and does not indicate that the skill or its documentation supports alternative languages or that Chinese-only behavior is a justified regional constraint. Per SQP-3, forcing a specific language without user opt-in can violate language or locale policy.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

The description contains Chinese-only product wording ("思必驰办公产品skill") without indicating that language or locale is optional or region-specific. For a manifest file, this can be a natural-language policy concern if the skill is presented as requiring a specific language context without documenting user choice or a justified locale restriction.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
86% confidence
Finding

This markdown file contains user-facing natural-language documentation primarily in Chinese, including headings, descriptions, and product guidance, but does not indicate that users can choose another language. Under the language/locale policy criterion, forcing a specific language without user opt-in can be a policy issue.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.