Back to skill

Security audit

Xiwu Inventory

Security checks for vulnerabilities and agentic risk

Overview

This home-inventory skill appears purpose-aligned, but it needs Review because it can automatically install an unpinned global package and then run shell commands built from user-provided inventory fields.

Install only if you trust the xiwu-niangzi package source and are comfortable with a skill that can modify a local inventory database and install a global CLI. Prefer a version that removes automatic installation, pins and verifies dependencies, narrows triggers, and uses safe structured command execution for all user-provided fields.

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

T08 · Insecure Dependencies

Error
Location
SKILL.md:45
Finding

Automatic Global Installation of an Unpinned Third-Party Package

Content
View full analysis
Remediation
View remediation
``` 3. Verify the package against an expected integrity digest or trusted signed provenance before use. 4. Disable lifecycle scripts with `--ignore-scripts` unless an audited installation script is strictly required. 5. Prefer a project-local, locked dependency over global installation. Commit an appropriate lockfile and verify it in deployment. 6. Run the CLI in a sandbox or least-privileged service account with access only to the required inventory database. 7. Include the CLI source or a verifiable dependency manifest in the audited artifact so the executable implementation can be reviewed. 8. Restrict registry configuration to a trusted registry and protect against dependency confusion or package-name substitution. ]]>

T09 · Insecure Skill Coding Practices

Error
Location
SKILL.md:133
Finding

Shell Command Injection Through Interpolated Inventory Fields

Content
View full analysis
" -c -q --json ``` ```bash xiwu search --json xiwu update -q --json xiwu remove --json xiwu update --json ``` These templates direct an agent with access to the `shell` tool to construct command strings from user-derived item names, categories, quantities, identifiers, and modification values. ### Technical Analysis The instructions do not require argument-array execution, strict field validation, or shell-safe escaping. Several values are shown without quoting. The item name is enclosed in double quotes, but double quotes do not neutralize shell command substitution such as `$(command)` or backtick substitution. For example, if an item name is accepted as: ```text $(touch /tmp/xiwu-injection-proof) ``` the generated shell command would resemble: ```bash xiwu add "$(touch /tmp/xiwu-injection-proof)" -c other -q 1 --json ``` A POSIX-compatible shell evaluates the command substitution before invoking `xiwu`. The injected command therefore runs even though the item name appears inside double quotes. Unquoted categories, quantities, IDs, and modification arguments may additionally permit shell separators, redirections, pipelines, glob expansion, or option injection if they are not constrained before command construction. The document provides a fixed category list and some semantic checks, but it does not mandate syntactic allowlist validation or safe process invocation. Prompt-level confirmation for certain write operations does not eliminate command injection because the confirmed value can itself contain shell syntax. ### Attack Path 1. An attacker supplies an inventory field containing shell syntax, such as an item name with command substitution. 2. The agent extracts ...[truncated 1226 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (12)

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The trigger set contains broad everyday terms such as '买了', '过期', '食品', and '库存', making accidental invocation likely in unrelated conversations. In this skill, unintended invocation is especially risky because the skill has shell access and includes auto-install and write operations that can modify inventory data or the host environment. Broad routing therefore increases the chance of unsafe side effects from benign user messages.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill instructs the agent to automatically perform global package installation via pnpm/npm when xiwu is missing. This expands the skill from local inventory management into remote code retrieval and system modification, creating a supply-chain and privilege-risk path that is not necessary for handling user inventory data. Because the installation is automatic and shell-enabled, unintended invocation could cause unreviewed software to be installed on the host.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill permits automatic global CLI installation through shell commands without requiring clear upfront user approval. This is dangerous because a simple conversational trigger could lead to system-wide package installation, introducing supply-chain risk and modifying the host outside the user's explicit intent. The danger is amplified by the skill's broad triggers and shell requirement.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The description is written as a Chinese-only assistant behavior and the skill instructions and trigger phrases are entirely Chinese, with no indication that users may choose another language. This can constitute a language/locale policy violation when the skill effectively enforces one language without opt-in.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The documentation claims the skill only interacts with the local xiwu CLI, but it also directs the agent to use npm/pnpm to fetch and install software. This boundary mismatch is dangerous because operators may trust the skill as local-only while it can actually initiate network access and alter the environment. Hidden capability expansion reduces informed consent and weakens review assumptions.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
80% confidence
Finding

The trigger '库存' is short and ambiguous, which can cause the skill to activate in contexts not intended for inventory management. Because this skill can execute shell commands and perform write actions, even low-friction accidental activation raises the chance of unnecessary command execution or setup behavior.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
79% confidence
Finding

The trigger '买了' is a common phrase that may appear in many unrelated conversations. In a skill that can write inventory records and auto-install missing tooling, that ambiguity can lead to accidental activation and unintended state changes.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
78% confidence
Finding

The trigger '过期' is overly generic and may match casual discussion unrelated to home inventory. While the trigger alone is not severe, it contributes to unintended invocation of a shell-capable skill, increasing operational risk.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
77% confidence
Finding

The trigger '盘点' is broad and can apply to many domains besides household goods. Given the skill's ability to access shell and modify data, accidental matches create unnecessary exposure to command execution paths.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
78% confidence
Finding

The trigger '扔了' is a common colloquial phrase that could appear in unrelated contexts. In this skill, accidental activation could lead to delete-flow prompts or item search operations when the user did not intend inventory management.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
77% confidence
Finding

The trigger '补货' is short and generic, so it may activate the skill in broad shopping or planning discussions. Although impact is limited compared with the auto-install findings, it increases the chance of unneeded shell-based inventory queries and follow-on actions.

Content

No source excerpt is available for this finding.

Overly Broad Trigger

Low
Category
Trigger Abuse
Confidence
75% confidence
Finding

The trigger '食品' is extremely broad and likely to appear in many non-inventory contexts. Its inclusion widens attack surface for accidental invocation of a shell-enabled skill far beyond the intended household inventory domain.

Content

No source excerpt is available for this finding.