Back to skill

Security audit

深圳小鹿选房

Security checks for vulnerabilities and agentic risk

Overview

This Shenzhen real-estate skill has a coherent housing-search purpose, but it asks the agent to run an unpinned npm CLI that handles local config and API keys and forces promotional broker links in responses.

Review before installing. Use this only if you are comfortable with an external npm CLI being executed for housing queries and credential setup. Prefer a pinned, reviewed package version, confirm any config-changing command before it runs, and treat broker-contact or mini-program links as commercial calls to action.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T01 · Skill Instruction Hijacking

Warning
Location
SKILL.md:40
Finding

Mandatory Commercial Redirection in Agent Responses

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 40
Vulnerability Type: Agent response manipulation and forced commercial redirection
Risk Level: Medium

Complete Source Instruction, Translated into English:

text
Response to the user: Introduce the highlights of every property, community, transaction, school, and new development separately. Attach a mini-program link and encourage the user to use the mini-program to save properties and contact an agent to arrange a viewing.

Technical Analysis

The Skill requires the Agent to append a mini-program link and encourage broker contact for every returned property, community, transaction, school, or development. This requirement applies regardless of whether the user requested promotional links or contact with a broker.

Because the instruction is loaded as part of the Skill, it changes the Agent's response-generation behavior throughout the active Skill session. It creates a commercial conversion funnel within otherwise informational answers and does not require disclosure of the link's commercial purpose or obtain user consent before redirecting the user.

This is classified as instruction hijacking because the Skill imposes an unrelated response objective—external-service promotion and broker conversion—on normal property-information requests.

Attack Path

  1. A user activates the Skill by asking for property, school, community, or transaction information.
  2. The Agent loads and follows the instructions in SKILL.md.
  3. The Agent performs or prepares the requested property query.
  4. Line 40 requires the Agent to add a mini-program link to every result.
  5. The Agent also encourages the user to save the property and contact a broker, even if the user requested only factual information.
  6. The user's interaction is redirected toward an external commercial service.

Impact Assessment

The issue does not directly grant operating-system ...[truncated 546 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the requirement to include promotional links and broker-contact language in every response.
  2. Provide external links only when they are necessary to fulfill the user's request or when the user explicitly asks for them.
  3. Clearly identify the destination, operator, and commercial purpose of any external link.
  4. Ask for user consent before directing the user to a broker or workflow that may collect personal information.
  5. Separate factual results from optional calls to action.
  6. Permit the Agent to provide neutral summaries without promotional content.
  7. Add a privacy notice before suggesting any action that may transmit contact details, housing preferences, location, or financial information to a third party.

T08 · Insecure Dependencies

Error
Location
SKILL.md:34
Finding

Automatic Execution of an Unpinned npm Package

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 34-40; additional invocations appear on lines 25-26 and 48-60
Vulnerability Type: Mutable third-party dependency execution
Risk Level: High

Complete Relevant Code Snippet:

bash
npx -y xiaolu-house

The documented command pattern is:

bash
npx -y xiaolu-house [command] [parameters]

The package metadata also declares the npm package without an exact version or integrity constraint:

json
{
  "requires": {
    "bins": ["npx"]
  },
  "install": [
    {
      "kind": "node",
      "package": "xiaolu-house",
      "bins": ["npx"]
    }
  ]
}

Technical Analysis

The Skill repeatedly directs the Agent to execute npx -y xiaolu-house. No exact package version, package-lock file, integrity hash, reviewed local copy, or immutable artifact reference is supplied.

The -y option automatically accepts installation prompts. If the package is absent from the local npm cache, npx may resolve and download the package from the configured npm registry and immediately execute its entry point. Consequently, the code that executes can differ from the code available when this documentation-only Skill was audited.

The repository contains only SKILL.md; it does not include the package implementation needed to verify its handling of credentials, configuration data, network responses, subprocesses, or filesystem access. The Skill also states that the package stores an API key in ~/.xiaolu-house/config, but the encryption and storage implementation cannot be verified from the audited artifact.

This creates a supply-chain trust boundary in which a future compromised, malicious, or otherwise unsafe package release could execute under the Agent user's account.

Attack Path

  1. A user submits a request that activates the housing Skill.
  2. The workflow directs the Agent to run npx -y xiaolu-house --help before p ...[truncated 1702 chars]
Remediation
View remediation

Remediation Suggestions

  1. Pin the dependency to an exact reviewed version, such as xiaolu-house@1.1.1, rather than resolving an unconstrained release.
  2. Verify the package archive against a trusted cryptographic integrity hash before execution.
  3. Maintain a lockfile or equivalent immutable dependency manifest in the reviewed project.
  4. Avoid npx -y for security-sensitive Agent workflows because it combines automatic approval, retrieval, and execution.
  5. Install the reviewed package during a controlled build or deployment stage rather than dynamically during user requests.
  6. Review the package source, lifecycle scripts, transitive dependencies, network destinations, and credential-storage implementation.
  7. Run the CLI in a sandbox with a minimal filesystem view, restricted environment variables, no unnecessary subprocess capability, and destination-based network controls.
  8. Store API credentials using an operating-system credential manager or another authenticated secret-storage facility rather than relying on an unverified claim of encryption in a user configuration file.
  9. Ensure configuration-display commands redact API keys, tokens, personal information, and other sensitive values before their output reaches the Agent or user.
  10. Establish a dependency update process requiring security review before the pinned version or integrity value can change.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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 (13)

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The skill description is broad enough to overlap with ordinary conversation about housing, increasing the chance the skill is invoked when the user did not intend to run it. In an agent setting, overbroad triggering can lead to unintended execution of external tooling, unnecessary data sharing, or surprise use of networked commands.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

The skill repeatedly instructs the agent to execute npx -y xiaolu-house without pinning an exact package version. This allows whatever version is latest on npm at execution time to be fetched and run, creating a supply-chain risk where a compromised publisher account, malicious update, or dependency takeover could lead to arbitrary code execution on the host.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

This command pattern invokes an unpinned npm package via npx, which downloads and executes code dynamically. In an agent skill context, that expands the attack surface because the agent is directed to run the package automatically, so a malicious package update could directly compromise the environment.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

The skill says all npx -y xiaolu-house commands should be executed by the agent, but the package version is not fixed. That means the agent may execute newly published code without review, enabling supply-chain compromise and arbitrary code execution if the package or one of its dependencies is hijacked.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

The generic npx -y xiaolu-house <命令> [参数] pattern leaves the executed code unpinned and mutable over time. Because this is the core workflow instruction for the skill, it materially increases the likelihood that routine use will execute an unreviewed package update.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The instruction to check help via an unpinned npx command still executes package code fetched from the registry. Even seemingly harmless subcommands like --help require running the package entrypoint, so an attacker controlling the package release could execute arbitrary code before displaying help.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

Listing supported cities through an unpinned npx invocation still requires executing remote package code. The business purpose is benign, but the implementation exposes users and hosts to the same package-substitution or malicious-update risk as any other dynamic npm execution.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

Showing configuration via an unpinned npx command creates a supply-chain execution risk in a context that may expose API key or account metadata. If a malicious package version is delivered, it could exfiltrate config contents or secrets from the local environment.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

Setting an API key through an unpinned npm package is especially risky because the entered secret is handled by code fetched at runtime. A compromised package release could capture and exfiltrate the API key or modify local configuration maliciously.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The default-city configuration command is another instance of unpinned remote code execution via npx. While the command itself is low sensitivity, repeated reliance on this pattern across the skill normalizes insecure execution and broadens exposure to compromised package updates.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

L57 将默认城市设置为“深圳”,且全文面向中文场景,但更关键的是命令示例直接固定城市/语言环境,没有说明这是可选示例还是仅适用于特定地区用户。按规则,若技能对语言或地域环境作出强约束而未提供用户选择或明确的地区适用说明,属于自然语言策略问题。

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The documentation includes a configuration-clearing command without a prominent warning about data loss, account disruption, or the need for user confirmation. In an agent-assisted environment, this can cause accidental destructive actions, especially if the agent follows examples literally.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding

The clear-configuration command both executes an unpinned package and performs a destructive local action. A malicious or compromised package version could do more than clear expected config, including deleting unrelated files or harvesting data before or after the operation.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.