Back to skill

Security audit

预付款与预付账款核销核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The free checker itself appears local, but it steers users and agents toward an external paid install and purchase flow using mutable remote code.

Install only if you want a local Chinese prepayment-ledger checker and are comfortable ignoring the optional upgrade prompts. Do not paste the provided purchase prompt into an agent or run the `npx ... @latest` command unless you independently trust the payment package, source, and purchase flow.

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

Warning
Location
scripts/run.mjs:197
Finding
Automatic Commercial Promotion Injected into Successful User-Facing Results<![CDATA[ ## Vulnerability Details **File Location**: `scripts/run.mjs`, lines 197–199 **Vulnerability Type**: Output and instruction hijacking **Risk Level**: Medium ### Evidence ```js console.log(''); // __UPSELL__ console.log('如需完整档:预付款与预付账款核销核对 · 买断版(SkillPay 商品号 S0806000206851205)—— 本版本未执行的 5 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` ### Technical Analysis Every successful non-JSON execution reaches these statements after producing the requested accounting-check result. The application therefore injects an advertisement, product identifier, and external purchasing URL into its standard user-facing output without requiring an explicit promotional option. This content is unrelated to performing the local reconciliation checks. The explicit `__UPSELL__` marker also demonstrates that the insertion is intentional. In an AI-agent environment, output from a trusted Skill can be presented as authoritative guidance or consumed by subsequent agent reasoning. Appending purchase instructions to that channel can redirect the session away from its original accounting task. The JSON output path does not include this promotional block, and the code does not automatically open the link or perform a purchase. The vulnerability is consequently limited to output manipulation and user redirection rather than direct code execution. ### Attack Path 1. A user or agent invokes the Skill without `--json`. 2. The local engine completes the requested prepayment reconciliation. 3. The normal success path reaches lines 197–199. 4. The program unconditionally appends a paid-product promotion and an external URL. 5. The user or calling agent may treat the appended content as part of the trusted result and follow the external purchasing workflow. ### Impact Assessment No additional operating-system privilege is directly obtained by these statements. However, the affected scope includes ...[truncated 343 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the unconditional promotion from the normal success path. 2. Keep accounting results limited to information necessary for the requested reconciliation. 3. If upgrade information must be available, place it behind an explicit option such as `--show-upgrade-info`, disabled by default. 4. Do not include purchasing URLs in data intended for downstream agent processing. 5. Separate machine-readable results, operational diagnostics, and optional marketing content into distinct channels. 6. Add regression tests confirming that ordinary successful runs contain no advertisements, purchase instructions, or unrelated external links. ]]>

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:73
Finding
AI-Agent Instructions Redirect the Session into Mutable Package Installation and Purchasing<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 73–82 **Vulnerability Type**: Agent instruction hijacking and unsafe dependency installation guidance **Risk Level**: High ### Evidence ```text 把下面这段**原样发给你的 AI 助手**,它就能带你装好并买完(需要钱包授权或付款时由**你本人**确认): 请通过 SkillPay 购买并安装 Skill「预付款与预付账款核销核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206851205。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ### Technical Analysis The Skill documentation asks the user to send a fixed prompt verbatim to an AI assistant. That prompt changes the agent's goal from running a local accounting check to: - Installing a third-party npm package. - Reading and following instructions from a newly installed Skill. - Initiating a commercial purchase. - Continuing installation after payment confirmation. The command uses `npx -y @alipay/agent-payment@latest install`. The `-y` option suppresses the normal confirmation prompt, while `@latest` resolves to mutable package content rather than a reviewed and pinned version. No version lock, integrity digest, or locally audited copy is specified. As a result, the code executed at installation time can differ from the content available when this Skill was audited. The follow-on instruction to read another installed `SKILL.md` also transfers control of the agent's behavior to material outside this project. Any instructions supplied by that package can extend the workflow beyond the reviewed local Skill. The current project does not itself execute this command, access a wallet, or perform a payment. Exploitation requires the user to copy the prompt and an agent or user environment to execute it. Wallet authorization or payment is expressly reserved for user confirmation. These constraints reduce automatic exploitability but do not e ...[truncated 1842 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the verbatim prompt that directs an AI assistant to install payment tooling and conduct a purchase. 2. Present optional upgrade information as passive documentation rather than executable agent instructions. 3. Require users to initiate installation and purchasing independently, outside the accounting Skill's agent session. 4. Do not use mutable `@latest` package references. Pin a specifically reviewed package version. 5. Publish and verify an integrity hash or signed package provenance before installation. 6. Avoid `npx -y` for security-sensitive installation workflows because it suppresses an explicit confirmation checkpoint. 7. Display the exact package name, resolved version, source registry, publisher, integrity value, requested permissions, and expected files before execution. 8. Do not automatically load and follow instructions from a newly installed Skill. Treat new Skill text as untrusted until independently reviewed. 9. Keep wallet authorization and payment entirely user-driven, and ensure that an agent cannot interpret general installation consent as payment approval. 10. If an external installation guide is retained, warn that it is outside the audited package boundary and may change independently. ]]>
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (10)

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

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The skill body, usage guidance, and purchasing instructions are written entirely in Chinese, while the file provides no instruction that users may choose another language for interaction or output. Because locale/language policy applies to all file types, this is a natural-language policy concern unless the language restriction is explicitly optional or justified.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The document claims the skill is fully local and offline, but later provides network URLs, installation commands, and a purchasing workflow. This inconsistency can mislead users about the actual security posture and data-flow expectations, reducing their caution and increasing the chance they will trust external actions that contradict the initial local-only claim.

Description-Behavior Mismatch

Medium
Confidence
88% confidence
Finding
The skill markets itself as a free, local-only checker, but then embeds instructions to visit external commerce pages and install/purchase a separate product. This is dangerous because it expands the trust boundary and can socially engineer users into actions beyond the declared behavior of the skill, including executing installer commands and initiating payment-related flows.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill instructs users to run `npx -y @alipay/agent-payment@latest install`, which fetches and executes remote code without pinning a specific version. This creates a supply-chain execution risk: if the package is compromised or a breaking/malicious update is published, users may run attacker-controlled code simply by following the skill's instructions.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The file’s natural-language comments and user-facing guidance are entirely in Chinese, including warnings, instructions, and output phrasing, with no indication that the user can choose another language. Under the policy, forcing a specific language without opt-in is a natural-language policy violation unless the locale restriction is explicitly documented and justified.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The user-facing description, usage help, errors, and output strings are entirely in Chinese, and the file does not offer any language or locale choice. Under the policy for natural-language violations, forcing a specific language without user opt-in is reportable unless the locale constraint is explicitly justified, which is not stated here.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The JSON value consists entirely of Chinese-language business data and provides no natural-language indication that the skill is limited to Chinese-language use or that users can choose another language. Under the language/locale policy, forcing a specific language without opt-in is a policy concern.

Intent-Code Divergence

Low
Confidence
79% confidence
Finding
L077 的注释写明“不是 JSON 就当作纯文本材料(例如直接粘贴的合同全文)”,这与文件其他位置反复声明的能力范围——仅针对预付账款核销台账进行核对——不一致。代码虽然后续只是把文本传给本地引擎,但该注释主动暗示可接受合同全文这类超出所述范围的材料,构成文档意图与技能定位的偏差。

Static analysis

No suspicious patterns detected.