Back to skill

Security audit

费用预算执行差异核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The core budget checker appears local and purpose-aligned, but the skill also steers users toward an external paid install and purchase flow that can run unpinned remote code.

Use this only for its local budget-table check unless you separately decide to trust the external SkillPay/Alipay purchase path. Do not paste the bundled purchase prompt or run the `npx ... @latest` command just to use the free checker, and remember that the free results do not perform the withheld execution-rate or cumulative checks.

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

Error
Location
SKILL.md:69
Finding
AI-directed installation and purchase workflow hijacks the Skill's operational purpose## Vulnerability Details **File Location**: `SKILL.md:69-80` **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: High **Complete Code Snippet**: ```markdown - 货架:**AI 核对工具铺** <https://skillpay.alipay.com/public/tokendidi> - 怎么买(含每个商品的商品号与官方购买指令):<https://chenqg618.github.io/compliance-skills/buy.html> - 找它:按商品名 **「费用预算执行差异核对 · 买断版」** 把下面这段**原样发给你的 AI 助手**,它就能带你装好并买完(需要钱包授权或付款时由**你本人**确认): ```text 请通过 SkillPay 购买并安装 Skill「费用预算执行差异核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206851213。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ``` A second manifestation occurs in `scripts/run.mjs:197-199`: ```js console.log(''); // __UPSELL__ console.log('如需完整档:费用预算执行差异核对 · 买断版(SkillPay 商品号 S0806000206851213)—— 本版本未执行的 5 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` ### Technical Analysis The Skill's declared operational purpose is local verification of budget-variance tables. The quoted instructions expand that purpose into installing payment tooling, loading instructions from a newly installed Skill, initiating a transaction for a specified merchant and product, and continuing installation after payment confirmation. The instruction tells the user to relay a fixed authorization statement to an AI assistant. If followed literally, this changes the agent's goal from analyzing a local budget table to executing an external installation and commercial transaction workflow. The newly installed `skillpay-onboarding` instructions are outside the reviewed project, so their behavior and subsequent requests cannot be verified by this audit. The executable CLI also appends an upsell and an external purcha ...[truncated 1872 chars]
Remediation
## Remediation Suggestions 1. Remove the verbatim prompt that directs an AI assistant to install payment tooling and initiate a specified purchase. 2. Keep commercial information separate from operational Skill instructions and only show it after an explicit user request. 3. Remove the unconditional `__UPSELL__` output from `scripts/run.mjs`. 4. Ensure successful analysis output contains only requested findings, scope limitations, and remediation relevant to the supplied budget table. 5. Require separate, informed user approval for each security-sensitive phase: dependency download, package execution, wallet onboarding, transaction initiation, and additional Skill installation. 6. Do not treat a general statement embedded in a copied prompt as sufficient authorization for installation or financial actions. 7. If optional upgrade documentation is retained, clearly state that it is outside the audit engine's functionality and must not be executed automatically by an agent.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:77
Finding
Mutable third-party package is downloaded and executed without version pinning## Vulnerability Details **File Location**: `SKILL.md:77-78` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: Medium **Complete Code Snippet**: ```text 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install ``` ### Technical Analysis The command uses `npx` to resolve, download, and execute the mutable `latest` release of `@alipay/agent-payment`. The `-y` option suppresses the normal package-installation confirmation. No exact version, lockfile, package integrity hash, vendored source, or reviewed dependency manifest is provided in this project. Consequently, the effective code executed by this instruction can change after the Skill has been audited. A future compromised, malicious, or simply incompatible package release could execute arbitrary installation logic with the permissions of the user running the command. The package itself is not included in the project, so this audit cannot establish that the remotely resolved version is safe. ### Attack Path 1. The user or agent follows the installation instructions in `SKILL.md`. 2. `npx` queries the configured package registry for the current `latest` release. 3. The package and its transitive dependencies are downloaded at execution time. 4. The `-y` option permits execution without an interactive package-installation confirmation. 5. Package entry points or lifecycle behavior execute with the invoking user's local permissions. 6. If the package, publisher account, registry resolution, or a transitive dependency has been compromised, attacker-controlled code executes locally. ### Impact Assessment A malicious resolved package could generally read or modify files accessible to the invoking user, access inherited environment variables, create subprocesses, communicate over the network, or alter user-level configuration. The exact scope would depend on the runtime environment and t ...[truncated 335 chars]
Remediation
## Remediation Suggestions 1. Replace `@latest` with an exact version that has been reviewed and tested. 2. Verify the package against a documented registry, publisher identity, and cryptographic integrity value before execution. 3. Remove `-y` so the user receives an explicit installation and execution confirmation. 4. Publish the expected package version, checksum, permissions, lifecycle scripts, and network behavior in the documentation. 5. Prefer a lockfile-backed installation process with integrity metadata over ad hoc `npx` execution. 6. Execute installation in a least-privilege, isolated environment without sensitive environment variables or unnecessary filesystem access. 7. Require fresh user confirmation immediately before executing externally downloaded code. 8. Re-audit the exact package and its transitive dependencies whenever the pinned version changes.
Vulnerability Patterns
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (11)

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

Vague Triggers

Medium
Confidence
88% confidence
Finding
The manifest description says the trigger phrases include "费用预算执行差异核对、预算执行表对不上", but does not define scope boundaries or negative examples. In particular, "预算执行表对不上" is conversational and could overlap with ordinary discussion of spreadsheet discrepancies, increasing the chance of unintended invocation.

Description-Behavior Mismatch

Medium
Confidence
98% confidence
Finding
A skill advertised as fully local, free, and self-contained embeds step-by-step instructions to purchase and install a separate paid product, including telling the user to paste a ready-made prompt into their AI assistant. This is dangerous because it functions as social-engineering and workflow redirection: a benign business tool becomes a vehicle to induce package installation, payment flow initiation, and trust transfer to another skill/package chain.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill instructs the agent/user to run `npx -y @alipay/agent-payment@latest install`, which pulls and executes remote code without pinning a specific version. That creates a supply-chain risk: if the package is compromised or updated maliciously, the agent could install or execute unreviewed code under the guise of purchasing a related product.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
The file’s user-facing descriptions, guidance, and sample inputs are entirely in Chinese, including mandatory-use language such as '必须做' and the returned advice/disclaimer strings. There is no indication that users may choose another language or that the locale restriction is intentional and justified as a region-specific tool.

Description-Behavior Mismatch

Medium
Confidence
93% confidence
Finding
The free-version engine advertises that certain checks are withheld, but the output still computes and exposes execution-rate-derived metrics such as overall_exec_rate and exec_range. Even if this is not code execution or data exfiltration, it is a scope-integrity issue: downstream users or agents may infer that execution-rate analysis was performed or rely on unsupported signals, leading to incorrect financial review conclusions.

Intent-Code Divergence

Medium
Confidence
96% confidence
Finding
The disclaimer states that the tool checks internal consistency including execution rate and cumulative figures, but this free version explicitly does not execute those withheld checks. This mismatch can mislead operators into trusting validation that never occurred, creating audit and decision-making risk through false assurance.

Natural-Language Policy Violations

Low
Confidence
77% confidence
Finding
The file presents the skill primarily in Chinese while also including English metadata such as `display_name_en` and `description_en`, but it does not state how language is selected or offer a user opt-in for output language. This can create a language/locale policy issue if the skill defaults users into a specific language without an explicit choice.

Intent-Code Divergence

Low
Confidence
95% confidence
Finding
The inline documentation says non-JSON input will be treated as plain-text material such as '直接粘贴的合同全文', which contradicts the surrounding manifest and usage text that require a budget execution table with headers. The code and later messages are clearly scoped to budget-table checking, so the comment actively misdescribes the intended input domain.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The JSON contains only Chinese-language tabular text, which implies a fixed language/locale presentation. There is no accompanying natural-language indication that users may choose another language or that the locale restriction is intentional and justified.

Static analysis

No suspicious patterns detected.