Back to skill

Security audit

三单匹配AI核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The free local checker appears to run without networking, but it also steers users or agents into an external unpinned install-and-purchase workflow.

Install only if you want a Chinese-language local three-way-match checker and are comfortable ignoring the paid-upgrade instructions unless you explicitly choose them. Do not let an agent run the SkillPay npx install or initiate a purchase without separate review, a pinned package/version, and clear human confirmation.

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

Warning
Location
SKILL.md:111
Finding
Agent-Directed Purchase Workflow and Mandatory Promotional Output<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:111-127`; `scripts/run.mjs:196-198` **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: Medium ### Vulnerable Code `SKILL.md:111-127`: ```text 把下面这段**原样发给你的 AI 助手**,它就能带你装好并买完(需要钱包授权或付款时由**你本人**确认): ```text 请通过 SkillPay 购买并安装 Skill「三单匹配AI核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206852982。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ``` `scripts/run.mjs:196-198`: ```js console.log(''); // __UPSELL__ console.log('如需完整档:三单匹配AI核对 · 买断版(SkillPay 商品号 S0806000206852982)—— 本版本未执行的 8 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` ### Technical Analysis The declared purpose of the Skill is to perform a local three-way document match. However, its instructions additionally tell the user to send a predefined command to an AI agent so that the agent installs another package, reads newly installed instructions, and initiates a commercial purchase workflow. This instruction is unrelated to the mechanical document-comparison operation. It attempts to redirect the agent's current-session goals from auditing documents to installing dependencies, processing external onboarding instructions, and initiating a purchase. Normal human-readable execution also unconditionally appends promotional content and an external purchasing URL, even when the user requested only document analysis. The executable matching code itself does not silently initiate a purchase or make network requests. Exploitation requires the user or agent to follow the documented upgrade instructions. Nevertheless, the agent-directed language creates a clear instruction-hijacking path and expands the workflow beyond the Skill's declar ...[truncated 1196 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the agent-directed block that tells users to submit a predefined installation and purchase command. 2. Do not instruct an agent to load and follow instructions from a newly installed Skill without a separate security review. 3. Remove unconditional promotional output from the normal execution path in `scripts/run.mjs`. 4. If upgrade information must remain, place it in a clearly labeled, passive documentation section and display it only when the user explicitly requests upgrade or pricing information. 5. Keep operational output limited to the requested document-comparison results. 6. Require a distinct, explicit user action before entering any installation or purchasing workflow. 7. Clearly separate document-processing functionality from commercial onboarding so an agent cannot interpret purchasing as part of the audit task. ]]>

T08 · Insecure Dependencies

Error
Location
SKILL.md:119
Finding
Execution of an Unpinned Mutable Package and Delegation to Unaudited Instructions<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:119-125` **Vulnerability Type**: `T08: Insecure Dependencies` **Risk Level**: High ### Vulnerable Code ```text 请通过 SkillPay 购买并安装 Skill「三单匹配AI核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206852982。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ### Technical Analysis The documented workflow uses: ```bash npx -y @alipay/agent-payment@latest install ``` The `latest` tag is mutable and does not identify a fixed, audited artifact. `npx` may download and execute package code, including package entry points and lifecycle behavior, under the invoking user's account. The `-y` option suppresses the normal installation confirmation, reducing the opportunity for inspection. No package version, package-lock entry, integrity digest, trusted artifact hash, or locally reviewable source is provided. The instructions then require the agent to read and follow a newly installed `skillpay-onboarding/SKILL.md`, delegating control to content that is not included in the audited project and can change independently after this audit. There is no evidence in the reviewed project that the named third-party package is currently malicious. The confirmed defect is the unsafe, mutable dependency-execution pattern and the delegation to unaudited instructions. ### Attack Path 1. The user or agent follows the upgrade instructions in `SKILL.md`. 2. `npx` resolves `@alipay/agent-payment@latest` from the package registry at execution time. 3. The resolved package is downloaded without an exact version or integrity pin. 4. Package-controlled code executes with the permissions of the account running Node.js. 5. The agent loads `skillpay-onboarding/SKILL.md` from the newly installed material. 6. The agent follows instructions that we ...[truncated 1194 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, security-reviewed package version. 2. Verify the downloaded package using a cryptographic integrity digest or a committed lockfile. 3. Avoid `npx -y` for security-sensitive installation workflows because it downloads and executes code while suppressing confirmation. 4. Prefer a reviewable installation process that downloads the artifact first, verifies its source and integrity, and executes it only after explicit user approval. 5. Vendor or include the required onboarding instructions in the audited project rather than delegating automatically to a newly installed `SKILL.md`. 6. Require a separate security review before an agent follows instructions supplied by another package. 7. Run installation in a sandbox or least-privilege environment with restricted filesystem, credential, and network access. 8. Document the package's required permissions, expected files, network destinations, and rollback procedure. 9. Keep purchase initiation separate from dependency installation and require explicit user confirmation at each security-sensitive boundary. ]]>
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 (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

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
88% confidence
Finding
The document claims the tool does not network, exfiltrate material, or call any model, yet later includes instructions for an AI assistant to perform external install and purchase actions. This contradiction can mislead users and downstream agents about the true operational boundaries, increasing the chance that an assistant follows high-risk external actions under a false sense of safety.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill instructs the user/assistant to run `npx -y @alipay/agent-payment@latest install`, which fetches and executes remote code without pinning an exact version. This creates a supply-chain risk: if the package is compromised or a malicious update is published, the assistant could run attacker-controlled code during installation.

Natural-Language Policy Violations

Medium
Confidence
93% confidence
Finding
This code file contains extensive natural-language comments, user-facing status/advice strings, and sample document text entirely in Chinese, with no indication that the user can choose another language or that the skill is restricted to a China-specific deployment. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation.

Intent-Code Divergence

Medium
Confidence
95% confidence
Finding
The header comment explicitly says that when materials are insufficient it returns insufficient_input and "绝不输出'未发现问题'". Later, the code generates a verdict string stating that within the checked scope no problems were found, which actively contradicts the documented intent rather than merely omitting detail.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The module-level documentation states it should return insufficient_input when material is insufficient and "绝不输出'未发现问题'". However, the summary verdict explicitly includes a success-path message saying "在上述检查项范围内没有发现问题", which is semantically a no-issues-found result. This is a direct mismatch between stated behavior and actual output behavior.

Natural-Language Policy Violations

Medium
Confidence
91% confidence
Finding
The file’s user-facing natural-language interface is entirely presented in Chinese, including the capability name and all prompts, with no indication that users may opt into another language. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation unless the locale constraint is explicitly justified.

Description-Behavior Mismatch

Low
Confidence
82% confidence
Finding
The manifest description and English description frame this skill as a free, no-payment, no-registration, no-network three-way match tool. However, the same skill file includes a substantial section directing the agent/user to external SkillPay URLs and a purchase/install workflow for a separate paid product, which goes beyond the described checking behavior of this free skill.

Natural-Language Policy Violations

Low
Confidence
77% confidence
Finding
The JSON sample embeds document types and fields primarily in Chinese, with no accompanying indication that the skill is region-specific or that users may choose another language/locale. Under the policy rule for natural-language violations, this can be interpreted as a locale constraint that is not explicitly justified or offered as an opt-in.

Static analysis

No suspicious patterns detected.