Back to skill

Security audit

运费对账(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The reconciliation tool itself appears local, but it also steers users and agents into an unpinned software-installation and purchase flow for a separate paid skill.

Use the free checker only for local Chinese freight-statement reconciliation. Do not let an assistant run the provided purchase prompt or the npx @latest command unless you independently verify the package source, version, and payment flow and you intentionally want the paid skill installed.

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
Forced Commercial Content Injection into Reconciliation Results## 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 商品号 S0806000206846643)—— 本版本未执行的 4 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` ### Technical Analysis Every successful non-JSON execution unconditionally appends a commercial product promotion, product identifier, and external purchasing URL to the reconciliation output. The `__UPSELL__` marker further indicates that this is intentional output injection rather than information required to perform freight reconciliation. The injected content cannot be disabled separately and is unrelated to the integrity of the reconciliation result. When an AI agent invokes the script and consumes or relays its standard output, the commercial instructions become part of agent-visible content and may influence subsequent responses or actions. ### Attack Path 1. A user or AI agent invokes `node scripts/run.mjs --input <file>`. 2. The input is parsed and the reconciliation engine returns a successful result. 3. Execution reaches lines 197-199 in the default human-readable output path. 4. The script appends an upgrade advertisement and an external purchasing URL. 5. An AI agent processing the output may reproduce the promotion, direct the user to the external site, or treat the purchasing instructions as relevant follow-up actions. ### Impact Assessment This issue does not directly grant filesystem, operating-system, or network privileges. Its impact is manipulation of user-visible and agent-visible output, contamination of legitimate business results, and redirection toward an external commercial workflow. The affected scope is every successful non-JSON invocation of the command.
Remediation
## Remediation Suggestions - Remove commercial promotion and purchasing instructions from normal reconciliation output. - If upgrade information must be available, require an explicit opt-in option such as `--show-upgrade-info`. - Keep machine-readable and human-readable result channels limited to reconciliation findings and operational diagnostics. - Do not embed external purchasing links in output that may be interpreted by an AI agent. - Add tests asserting that standard successful output contains only reconciliation-related information.

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:63
Finding
AI-Directed Installation and Purchase Flow Uses an Unpinned Remote Package## Vulnerability Details **File Location**: `SKILL.md`, lines 63-69 **Vulnerability Type**: Agent instruction hijacking and unsafe dependency execution **Risk Level**: High ### Evidence ```text 把下面这段**原样发给你的 AI 助手**,它就能带你装好并买完(需要钱包授权或付款时由**你本人**确认): ```text 请通过 SkillPay 购买并安装 Skill「运费对账 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206846643。 ``` ### Technical Analysis The Skill documentation instructs the user to send a fixed prompt verbatim to an AI assistant. That prompt directs the agent to install another package, read newly installed instructions, and continue into a product purchasing and installation workflow. The command uses: ```bash npx -y @alipay/agent-payment@latest install ``` The mutable `latest` tag means the executed package can change after this Skill has been audited. The `-y` option suppresses the normal package-installation confirmation. Consequently, the reviewed Skill delegates execution and subsequent agent behavior to remotely supplied code and instructions whose exact version and integrity are not pinned in this project. No evidence establishes that the referenced package is currently malicious. The vulnerability is the unsafe and non-reproducible dependency acquisition pattern, combined with instructions that transfer control of subsequent agent actions to a newly installed Skill. ### Attack Path 1. A user follows `SKILL.md` and copies the supplied prompt verbatim into an AI assistant. 2. The assistant executes `npx -y @alipay/agent-payment@latest install`. 3. The package manager retrieves the package version currently associated with the mutable `latest` tag. 4. Retrieved package code executes with the permissions of the user or agent process. 5. The assistant is instructed to read the newly installed `skil ...[truncated 1045 chars]
Remediation
## Remediation Suggestions - Remove the instruction telling users to relay a fixed prompt verbatim to an AI assistant. - Do not direct an agent to automatically trust or follow instructions from newly installed Skills. - Pin the dependency to a reviewed exact version instead of using `@latest`. - Publish and verify a cryptographic integrity value or signed provenance for the package artifact. - Avoid `npx -y`; require explicit confirmation after displaying the exact package name, version, source, and requested actions. - Download and inspect the package before executing installation scripts. - Run installation in a restricted environment with minimal filesystem, credential, environment-variable, and network access. - Require a separate user confirmation before loading newly installed instructions and before initiating any purchase workflow. - Document the package registry and trusted publisher identity so users can verify the source independently.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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 (9)

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

Description-Behavior Mismatch

Medium
Confidence
94% confidence
Finding
The skill presents itself as a fully local, no-network reconciliation tool, yet later embeds directions to visit external sites, purchase another product, and install additional software. That mismatch can mislead users into trusting a broader workflow than advertised, weakening consent and increasing the chance they follow risky external instructions under the assumption they remain in a local-only experience.

Context-Inappropriate Capability

Medium
Confidence
91% confidence
Finding
The documentation includes a ready-made prompt telling an AI assistant to purchase and install another skill, grant dependency installation, and continue through a commerce workflow. This is dangerous because it expands the skill from passive analysis into delegated transaction and software-installation behavior, creating opportunities for unauthorized purchases, misleading consent, and execution of unreviewed external components unrelated to the core reconciliation function.

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 at install time without pinning to an immutable version. This creates a supply-chain execution risk: if the package is compromised, updated maliciously, or resolved unexpectedly, the user may execute attacker-controlled code while believing they are only completing a purchase flow.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This file's natural-language interface is entirely in Chinese, including the top-level description and the user-facing contract/help text returned by the skill. Under the stated policy, forcing a specific language without user opt-in is a locale-policy violation unless the constraint is explicitly justified as region-specific, which is not documented here.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This code file contains natural-language strings that force a specific language/locale for usage instructions and operational messages. Under the policy, locale-specific behavior should either be optional for the user or clearly documented as a justified regional constraint.

Intent-Code Divergence

Low
Confidence
89% confidence
Finding
L077 的注释写明“不是 JSON 就当作纯文本材料(例如直接粘贴的合同全文)”,而文件其余说明和 manifest 都将技能用途限定为运费月结单/对账单材料。代码实际只是把文本交给 freight-reconciliation 引擎,并未体现“合同全文”这一不同文档类型的声明,因此该注释在意图层面扩大了适用对象,与技能定位不一致。

Natural-Language Policy Violations

Low
Confidence
93% confidence
Finding
The JSON payload contains only Chinese-language labels and values in a natural-language string, with no indication that the skill is region-specific or that users can opt into this locale. Under the policy rules, hard-coding a specific language without user choice or clear justification is a natural-language policy concern.

Static analysis

No suspicious patterns detected.