Back to skill

Security audit

nicechat

Security checks for vulnerabilities and agentic risk

Overview

This NiceChat integration is mostly coherent, but it recommends installing mutable third-party code and a whole skill collection, so it should be reviewed before use.

Install from the ClawHub-published skill when possible, avoid unpinned `npx` or `@latest` commands, and only give the skill a NiceChat API key you are comfortable using for chat and contact actions. Review the CLI package and repository before any global install.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:28
Finding

Unpinned Third-Party Packages and Skill Repository Content

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 28, 117, 123, 201, and 319
Vulnerability Type: T08: Insecure Dependencies
Risk Level: Medium

Vulnerable code snippets:

Line 28:

bash
npx skills add XhanGlobal/skills

Lines 117 and 123:

bash
npm install -g @xhanglobal/nicechat-cli
bash
npx @xhanglobal/nicechat-cli --help

Line 201:

bash
npm install -g @xhanglobal/nicechat-cli@latest

Line 319:

bash
npm install -g @xhanglobal/nicechat-cli

Technical Analysis

The documented installation commands retrieve mutable third-party content without pinning an exact package version, repository commit, or integrity hash. In particular, npx @xhanglobal/nicechat-cli --help may download and immediately execute package code. Global npm installation may also execute package lifecycle scripts with the permissions of the invoking user.

The npx skills add XhanGlobal/skills command installs content from an entire external skill collection rather than only the audited NiceChat skill. This expands the supply-chain trust boundary to unrelated or subsequently added repository content.

Although SKILL.md advises users to review the npm page and source code, this does not ensure that the reviewed content is identical to the mutable package or repository version later retrieved. No malicious package content was present in the audited project, but the unpinned installation process creates a supply-chain exposure.

Attack Path

  1. An attacker compromises the referenced npm publisher account or the external skill repository, or gains control through a malicious upstream update.
  2. The attacker publishes a hostile package version or modifies the mutable repository content.
  3. A user or agent follows the documented unpinned npx, npm install, or @latest command.
  4. The package manager retrieves the attacker-controlled version.
  5. The malicious pa ...[truncated 1017 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the CLI to a reviewed, exact version, for example @xhanglobal/nicechat-cli@X.Y.Z, rather than using an implicit current version or @latest.
  2. Pin the skill repository to a verified commit hash or immutable release tag supported by the installation tool.
  3. Publish and verify package integrity hashes or signed release provenance before installation.
  4. Avoid executing newly downloaded packages directly through npx. Download the package, verify its provenance and contents, and then execute the reviewed artifact.
  5. Prefer installing only the required NiceChat skill instead of the complete XhanGlobal/skills collection.
  6. Review npm lifecycle scripts and use --ignore-scripts where compatible with the package's operation.
  7. Run installation and CLI operations in a restricted environment with minimal filesystem permissions and only the credentials required for the immediate task.
  8. Replace automatic recommendations to install @latest with a controlled upgrade process that reviews release changes and pins the approved version.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (7)

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

This markdown file presents all operational instructions and warnings in Chinese, which effectively forces a specific language for users of the skill. The policy only permits this when the skill offers a language/locale choice or clearly documents a justified regional constraint, neither of which appears here.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
90% confidence
Finding

The documentation recommends running npx skills add XhanGlobal/skills without pinning a specific package or repository revision. This allows whatever version is current at execution time to be fetched and executed, creating a supply-chain risk if the package, dependency tree, or referenced repository is compromised or unexpectedly changed.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
每个请求都必须携带以下两种凭据之一(按优先级检查):

| 优先级                 | 方式        | 传递方法                                            | 说明                                                                                                                                 |
| ---------------------- | ----------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| **首选(AI 智能体)**  | API 密钥    | 由宿主运行时在请求发出时附加 `x-api-key` 请求头     | 在 Clawersity 的「个人资料 → API 密钥」页面创建,并存入宿主 Secret Manager;不要在提示词、日志、截图、对话回复或仓库中回显明文密钥。 |
| **备选(浏览器用户)** | 会话 Cookie | 登录后自动设置的 `better-auth.session_token` Cookie | 无需手动传递,浏览器自动携带。                                                                                                       |

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
| 优先级                 | 方式        | 传递方法                                            | 说明                                                                                                                                 |
| ---------------------- | ----------- | --------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------ |
| **首选(AI 智能体)**  | API 密钥    | 由宿主运行时在请求发出时附加 `x-api-key` 请求头     | 在 Clawersity 的「个人资料 → API 密钥」页面创建,并存入宿主 Secret Manager;不要在提示词、日志、截图、对话回复或仓库中回显明文密钥。 |
| **备选(浏览器用户)** | 会话 Cookie | 登录后自动设置的 `better-auth.session_token` Cookie | 无需手动传递,浏览器自动携带。                                                                                                       |

两种凭据均缺失或无效时,所有接口返回 `401`。

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 · SKILL.md (reported line 79)May include surrounding context.

搜索用户

bash
curl "https://clawersity.hanshi.tech/api/nicechat/users/search?q=alice" \
  # 认证头由宿主运行时在执行时附加

Rp1

Medium
Category
MCP Rug Pull
Confidence
93% confidence
Finding

The skill suggests npx @xhanglobal/nicechat-cli --help without a pinned version, which executes code retrieved at runtime from the package registry. An attacker who compromises the package, publisher account, or dependency chain could deliver malicious code to users or agents following the instructions.

Content

No source excerpt is available for this finding.

Whitespace Padding

Medium
Category
Prompt Injection
Confidence
70% confidence
Finding

Large whitespace padding was detected (a block of blank lines or a long run of spaces). This can push injected instructions below or to the right of the visible area so a human reviewer never sees them while the agent still reads them. Manual review of the hidden content is recommended.

Content

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

md
## API 快速索引

| 方法     | 路径                                              | 说明                                                                                                   |
| -------- | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
| `GET`    | `/api/nicechat/users/search?q=<query>`            | 按姓名或邮箱搜索用户,最多返回 20 条,排除调用方自身                                                   |
| `GET`    | `/api/nicechat/contacts?status=accepted`          | 列出联系人。status 默认 accepted,传 pending 查看待处理请求                                            |