Back to skill

Security audit

xianmu-ims

Security checks for vulnerabilities and agentic risk

Overview

The inventory features are appropriately scoped, but the setup guide encourages approving security warnings without verifying what is being authorized.

Verify the installer source, checksum, publisher, MCP address, and requested action before approving prompts; do not follow the blanket approval advice. Use the lowest IMS permissions needed, protect the token, and review configuration changes before saving. Document deletion is permanent.

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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (13)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
### 5. 图片与资料
- 加图片:`POST /items/{id}/attachments`(multipart,`file_type=image`,≤20MB);调整顺序/封面用 `PUT /items/{id}/attachments/order`(ids 须覆盖全部附件,第一张为封面)。
- 加资料:链接用 `POST /items/{id}/docs`(后台抓取,稍后 `GET /docs?item_id=` 看结果);本地文件用 `POST /docs/upload`(后缀白名单 pdf/docx/txt/md/png/jpg/xlsx/csv/pptx/zip 等)。
- 一份资料可关联多个物品(多对多):改显示名用 `PATCH /docs/{doc_id}`(body `{"title": "..."}`);追加关联用 `POST /docs/{doc_id}/items`(body `{"item_id": 123}`,幂等);解除关联用 `DELETE /docs/{doc_id}/items/{item_id}`(资料本身保留)。注意 `GET /docs?item_id=` 的含义是「**包含**该物品的资料」,不等于唯一归属;列表行里 `items[]` 才是全部关联物品。
- 删除物品**不会**删除它名下的资料,只会解除关联(资料降级为未关联的全局资料);资料被删除只有 `DELETE /docs/{doc_id}` 一条路径。
- 删除图片/资料均为不可恢复操作,先向用户确认再调用。

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
### 5. 图片与资料
- 加图片:`POST /items/{id}/attachments`(multipart,`file_type=image`,≤20MB);调整顺序/封面用 `PUT /items/{id}/attachments/order`(ids 须覆盖全部附件,第一张为封面)。
- 加资料:链接用 `POST /items/{id}/docs`(后台抓取,稍后 `GET /docs?item_id=` 看结果);本地文件用 `POST /docs/upload`(后缀白名单 pdf/docx/txt/md/png/jpg/xlsx/csv/pptx/zip 等)。
- 一份资料可关联多个物品(多对多):改显示名用 `PATCH /docs/{doc_id}`(body `{"title": "…"}`);追加关联用 `POST /docs/{doc_id}/items`(body `{"item_id": 123}`,幂等);解除关联用 `DELETE /docs/{doc_id}/items/{item_id}`(资料本身保留)。注意 `GET /docs?item_id=` 的含义是「**包含**该物品的资料」,不等于唯一归属;列表行里 `items[]` 才是全部关联物品。
- 删除物品**不会**删除它名下的资料,只会解除关联(资料降级为未关联的全局资料);资料被删除只有 `DELETE /docs/{doc_id}` 一条路径。
- 删除图片/资料均为不可恢复操作,先向用户确认再调用。

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
- 加图片:`POST /items/{id}/attachments`(multipart,`file_type=image`,≤20MB);调整顺序/封面用 `PUT /items/{id}/attachments/order`(ids 须覆盖全部附件,第一张为封面)。
- 加资料:链接用 `POST /items/{id}/docs`(后台抓取,稍后 `GET /docs?item_id=` 看结果);本地文件用 `POST /docs/upload`(后缀白名单 pdf/docx/txt/md/png/jpg/xlsx/csv/pptx/zip 等)。
- 一份资料可关联多个物品(多对多):改显示名用 `PATCH /docs/{doc_id}`(body `{"title": "…"}`);追加关联用 `POST /docs/{doc_id}/items`(body `{"item_id": 123}`,幂等);解除关联用 `DELETE /docs/{doc_id}/items/{item_id}`(资料本身保留)。注意 `GET /docs?item_id=` 的含义是「**包含**该物品的资料」,不等于唯一归属;列表行里 `items[]` 才是全部关联物品。
- 删除物品**不会**删除它名下的资料,只会解除关联(资料降级为未关联的全局资料);资料被删除只有 `DELETE /docs/{doc_id}` 一条路径。
- 删除图片/资料均为不可恢复操作,先向用户确认再调用。

### 6. 初始化引导(分类与位置一次配好)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
## 护栏(必须遵守)

1. **写操作前先复述确认**:入库/出库/移库/调整/建档/初始化写入前,向用户复述关键内容(物品 + 数量 + 目标库位,或配置预览),得到确认再调用。用户指令已非常明确时可省略复述直接执行。
2. **禁触端点**:不要调用设置(`/settings`,含 AI 密钥)、授权(`/license`)、Token/Webhook 管理、用户管理等系统端点;也不要调用物品删除/物理删除/并库/停用(`DELETE /items/{id}`、`/purge`、`/merge`、`/disable`)——这些留给用户在界面操作。
3. **出错不删数据**:有流水的物品不可删除只能停用;写错了提示用户在界面用「冲正」功能回退,Agent 不要自行尝试补救性反向操作。
4. **一次一步**:批量写入逐条执行,每条之间检查响应;某条失败(如 OUT_OF_STOCK)就停下报告,不要跳过继续。
5. **数量与单位照抄用户口径**,不主动换算;价格字段留 0 表示未计价。

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

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

md
## 护栏(必须遵守)

1. **写操作前先复述确认**:入库/出库/移库/调整/建档/初始化写入前,向用户复述关键内容(物品 + 数量 + 目标库位,或配置预览),得到确认再调用。用户指令已非常明确时可省略复述直接执行。
2. **禁触端点**:不要调用设置(`/settings`,含 AI 密钥)、授权(`/license`)、Token/Webhook 管理、用户管理等系统端点;也不要调用物品删除/物理删除/并库/停用(`DELETE /items/{id}`、`/purge`、`/merge`、`/disable`)——这些留给用户在界面操作。
3. **出错不删数据**:有流水的物品不可删除只能停用;写错了提示用户在界面用「冲正」功能回退,Agent 不要自行尝试补救性反向操作。
4. **一次一步**:批量写入逐条执行,每条之间检查响应;某条失败(如 OUT_OF_STOCK)就停下报告,不要跳过继续。
5. **数量与单位照抄用户口径**,不主动换算;价格字段留 0 表示未计价。

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api.md (reported line 107)May include surrounding context.

md
### PUT /items/{id}/attachments/order — 附件重排
Body `{"ids":[附件id…]}`,**必须与该物品现有全部附件一一对应**;列表第一张图片即封面。

### DELETE /attachments/{att_id} — 删除附件
磁盘文件同删,不可恢复;调用前先向用户确认。

### POST /items/{id}/docs — 添加资料链接

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api.md (reported line 125)May include surrounding context.

md
### POST /docs/{doc_id}/items — 资料关联到物品
Body `{"item_id":123}`;幂等(重复关联直接返回现状)。一份资料可关联多个物品,关联后该物品详情页的资料列表即包含它,返回更新后的资料行(含 `items[]`)。

### DELETE /docs/{doc_id}/items/{item_id} — 解除资料与物品的关联
只解除关联,**资料本身保留**;解除后不再关联任何物品时成为未关联的全局资料。

### DELETE /docs/{doc_id} — 删除资料

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api.md (reported line 128)May include surrounding context.

md
### DELETE /docs/{doc_id}/items/{item_id} — 解除资料与物品的关联
只解除关联,**资料本身保留**;解除后不再关联任何物品时成为未关联的全局资料。

### DELETE /docs/{doc_id} — 删除资料
文件类同清落盘,不可恢复。另注:删除**物品**不会连带删除它名下的资料,只解除关联(资料降级为全局资料)——所以删物品后资料仍可用 `GET /docs?q=` 找到。

## 明确不碰的端点

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
80% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/api.md (reported line 134)May include surrounding context.

md
## 明确不碰的端点

以下端点与本技能无关,**不要调用**:
- 物品删除类:`DELETE /items/{id}`、`POST /items/{id}/purge`、`POST /items/purge-batch`、`POST /items/{id}/merge`、`POST /items/{id}/disable`
- 系统管理:`GET/PUT /settings`(含 AI 密钥)、`/license/*`、`/api-tokens*`、`/webhooks*`、`/notify/*`、用户管理
- 流水冲正:`POST /stock/records/{id}/reversal` —— 写错了请用户在界面操作冲正

The activation list includes generic phrases such as “初始化” (initialize), “开始使用” (get started), and “激活” (activate) without requiring an established 闲沐 IMS context.

Medium
Category
Trigger Abuse
Confidence
92% confidence
Finding

These phrases commonly occur in onboarding, configuration, and activation requests for unrelated products. Although the description identifies 闲沐 IMS, it does not explicitly restrict these generic triggers to conversations already concerning that product, allowing unintended skill activation.

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 · references/api.md (reported line 20)May include surrounding context.

list 内物品对象关键字段:id、internal_id(如 PRT-000123)、name、model、series、type、quantity(当前总量)、safety_stock、unit、location_id、location_path(如 A1-B2-3 库位链)、brand、supplier_id、tags、status、last_cost、avg_cost、params、thumbnail。

text
curl -s -H "Authorization: Bearer $XMT" "$BASE/api/v1/items?q=M3%E8%9E%BA%E4%B8%9D&page=1&page_size=20"

GET /items/{id} — 物品详情

Instructions to bypass SmartScreen and approve security prompts omit warnings about the resulting security risks.

Medium
Category
Output Handling
Confidence
98% confidence
Finding

The setup guidance normalizes bypassing SmartScreen and approving UAC, MCP trust, and tool prompts without checking the publisher, requested privileges, server identity, or specific operation. This can lead users to execute a malicious installer or authorize dangerous tools if a download or configuration is substituted; using an official HTTPS source and mentioning a checksum reduces but does not eliminate this risk.

Content

No source excerpt is available for this finding.

The setup instructions permit persistent client configuration changes despite declaring a no-side-effects role boundary.

Low
Category
Excessive Agency
Confidence
91% confidence
Finding

L007 explicitly limits the agent to side-effect-free detection, configuration generation, guidance, and verification. L076 nevertheless authorizes writing the client's configuration file after user approval, which persistently changes its MCP connection settings. Consent makes the operation authorized but does not make it side-effect-free.

Content

No source excerpt is available for this finding.