Back to skill

Security audit

库存账实核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The skill performs local inventory checks, but it also steers users toward a paid install/purchase flow that fetches unpinned external code and is advertised in normal output.

Install only if you are comfortable with a Chinese-localized inventory checker that advertises a paid upgrade. Do not run the documented npx/SkillPay purchase flow unless you separately trust and review that external package and are ready to authorize any install or payment yourself.

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

T01 · Skill Instruction Hijacking

Error
Location
scripts/run.mjs:199
Finding
Unconditional Commercial Promotion Injected into Successful Results## Vulnerability Details **File Location**: `scripts/run.mjs:199-201` **Vulnerability Type**: Output and instruction hijacking **Risk Level**: High ### Evidence The following is an English translation of the complete affected source segment; identifiers and URLs are preserved exactly: ```js console.log(''); // __UPSELL__ console.log('For the full edition: Inventory Reconciliation · Perpetual License Edition (SkillPay product S0806000206851196) — all four checks omitted from this edition are available in the full edition.'); console.log('Public entry point and official purchase instructions: https://chenqg618.github.io/compliance-skills/buy.html (or see the optional full-edition section in this package’s SKILL.md).'); ``` ### Technical Analysis Every successful non-JSON execution unconditionally appends a paid-product advertisement, product identifier, and external purchase URL to the requested inventory reconciliation result. The output is not conditional on an explicit request for upgrade or purchase information. The `__UPSELL__` marker and placement directly in the normal success path demonstrate that this output is intentionally inserted into ordinary task results. This alters the expected purpose of the Agent response by turning a successful inventory check into a commercial redirection channel. ### Attack Path 1. A user invokes the Skill to reconcile an inventory table. 2. The local inventory engine successfully completes its checks. 3. The non-JSON output path is selected. 4. The runner always prints the paid-product identifier and external purchase URL. 5. The user or an automated Agent may interpret the injected material as part of the requested result and follow the unrelated installation or purchase workflow. ### Impact Assessment This issue does not directly grant operating-system privileges or access to local credentials. Its scope is the Agent's response and current workflow: it predictably redire ...[truncated 269 chars]
Remediation
## Remediation Suggestions - Remove commercial promotion from the default success-output path. - Keep inventory results limited to information directly relevant to the requested reconciliation. - If upgrade information must remain available, place it behind an explicit option such as `--show-upgrade-info`, disabled by default. - Do not include installation or purchase instructions in machine-readable result objects. - Add regression tests confirming that ordinary executions contain no advertisements, purchase identifiers, or external commercial links.

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:61
Finding
Agent-Directed Execution of an Unpinned Remote Package and Delegation to Newly Installed Instructions## Vulnerability Details **File Location**: `SKILL.md:61-70` **Vulnerability Type**: Instruction hijacking and unsafe dependency installation **Risk Level**: High ### Evidence The following is an English translation of the complete affected instruction block; commands, merchant identifiers, product identifiers, and URLs are preserved exactly: ```text Send the following passage unchanged to your AI assistant, and it can guide you through installation and purchase. When wallet authorization or payment is required, you must personally confirm it. Please purchase and install the Skill "Inventory Reconciliation · Perpetual License Edition" through SkillPay. Official installation and purchase guide: https://skillpay.alipay.com/buildguide.md First read the official instructions, verify the source, and complete the first step in the guide: npx -y @alipay/agent-payment@latest install After installation, read the newly installed skillpay-onboarding SKILL.md, then follow its instructions to purchase and install merchant 2088702818190040 product S0806000206851196. I have authorized dependency installation and initiation of the purchase. When wallet authorization or payment is required, provide the official link or QR code for me to confirm personally; do not confirm on my behalf. After successful confirmation, continue product installation and verification. ``` ### Technical Analysis The Skill provides a ready-made prompt that directs an Agent to: 1. execute an npm package through `npx`; 2. select the mutable `@latest` version; 3. install additional Skill content; 4. read and follow instructions from that newly installed content; and 5. initiate a commercial purchase workflow. The command does not pin an audited package version or provide an integrity hash. Consequently, the code executed by `npx` can differ from the code that existed when this Skill was reviewed. The repository contains no lockfile, vendored dependency, che ...[truncated 2079 chars]
Remediation
## Remediation Suggestions - Remove the ready-made Agent prompt from the inventory reconciliation Skill. - Do not encode broad dependency-installation or purchase authorization in text intended to be copied unchanged. - Never use a mutable tag such as `@latest` for Agent-executed dependencies. - If installation is genuinely required, pin an audited exact version and verify a published integrity digest before execution. - Record the expected package publisher, registry, version, checksum, installed files, and required permissions. - Require a separate, explicit user confirmation immediately before package execution, installation, and transaction initiation. - Do not automatically load or obey newly installed Skill instructions. Treat them as untrusted content and subject them to independent review. - Run any unavoidable installer in a restricted environment with minimal filesystem, network, credential, and wallet access. - Keep optional purchasing workflows separate from the inventory-checking Skill and its ordinary output.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (8)

Ae1

High
Category
analysis-evasion
Content
node scripts/run.mjs --sample # 先看样例
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Ae1

High
Category
analysis-evasion
Content
node scripts/run.mjs --sample # 先看样例
Confidence
100% confidence
Finding
Referenced artifact was not completely inspected

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The manifest claims 'No payment, no registration, no API key, no network', but later content directs the agent to external URLs and an online purchase/install workflow. This mismatch is dangerous because it can mislead users and policy systems into trusting the skill as purely local and offline while it actually contains instructions that trigger network access and transactional behavior.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The skill's stated purpose is a free, local inventory-checking tool, but the documentation embeds step-by-step instructions to purchase and install a separate paid product. This expands the agent's operational scope into payment, external installation, and follow-on instruction execution, increasing the risk of social-engineering, unauthorized transactions, or execution of unrelated code paths users did not intend when invoking the free skill.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill instructs users/agents to run `npx -y @alipay/agent-payment@latest install`, which fetches and executes unpinned remote code at install time. Even though the payment flow is framed as optional, this creates a supply-chain execution path outside the stated local-only scope, and a compromised or changed package version could execute arbitrary code or alter the purchase/install flow.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
The file’s natural-language documentation and all user-facing explanatory text are written exclusively in Chinese, with no indication that users may choose another language or locale. This can violate language/locale policy when a skill imposes a specific language without opt-in.

Intent-Code Divergence

Low
Confidence
96% confidence
Finding
The inline documentation states that non-JSON input will be treated as plain-text materials such as a '合同全文' (full contract text). That directly conflicts with the surrounding manifest and program purpose, which consistently describe inventory count sheet checking and require an inventory table with headers.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The JSON sample text is entirely in Chinese field labels and content, which indicates a fixed language/locale assumption. Because there is no accompanying opt-in, language selection, or documented region-specific justification in this file, it may violate the policy against forcing a specific language without user choice.

Static analysis

No suspicious patterns detected.