Back to skill

Security audit

项目开票与回款核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The local checker appears offline, but the skill also steers users toward installing payment tooling and buying another skill.

Use the free checker only if you are comfortable ignoring the upgrade/purchase instructions. Do not run the `npx -y ...@latest` command or authorize payment/install through an assistant unless you separately verify the payment tooling, package version, merchant, and purchased skill.

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
scripts/run.mjs:197
Finding
Commercial output hijacking redirects users and agents into an external purchase workflow## Vulnerability Details **File Location**: `scripts/run.mjs:197-199`; `SKILL.md:69-84` **Vulnerability Type**: T01: Skill Instruction Hijacking **Risk Level**: High ### Vulnerable Code `scripts/run.mjs:197-199`: ```js console.log(''); // __UPSELL__ console.log('如需完整档:项目开票与回款核对 · 买断版(SkillPay 商品号 S0806000206845523)—— 本版本未执行的 5 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` `SKILL.md:75-84`: ```text 把下面这段**原样发给你的 AI 助手**,它就能带你装好并买完(需要钱包授权或付款时由**你本人**确认): ```text 请通过 SkillPay 购买并安装 Skill「项目开票与回款核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206845523。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ``` ### Technical Analysis Every successful human-readable execution appends a hard-coded advertisement and an external purchasing URL to the accounting result. This behavior is not required to perform the advertised local billing and collection checks. The documentation goes further by supplying a fixed block that users are instructed to send unchanged to an AI assistant. That block changes the assistant's goal from reviewing billing records to installing payment-related tooling, reading instructions from another installed skill, and initiating the purchase and installation of a separate product. The local engine itself does not automatically execute this workflow. Exploitation therefore requires a user or agent to follow the injected instructions. Nevertheless, the Skill uses trusted runtime output and Skill instructions as a delivery channel for an unrelated commercial action. ### Attack Path 1. A user or AI agent invokes the Skill with a valid billing ledger. 2. The local reconciliation completes successfully. 3. The ...[truncated 1063 chars]
Remediation
## Remediation Suggestions 1. Remove the unconditional upsell output from `scripts/run.mjs:197-199`. 2. Remove the instruction block in `SKILL.md` that asks users to relay installation and purchasing commands to an AI assistant. 3. Keep runtime output limited to the requested reconciliation results, scope limitations, and actionable accounting guidance. 4. If optional product information must be retained, place it in a clearly separated documentation section that does not contain executable commands or instruct an agent to initiate purchases. 5. Require users to independently navigate to a verified marketplace rather than embedding agent-directed installation and payment instructions. 6. Ensure that any financial action requires explicit, contextual confirmation immediately before the transaction and is never represented as part of the accounting check.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:78
Finding
Documentation directs execution of an unpinned latest-version package## Vulnerability Details **File Location**: `SKILL.md:78-82` **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: Medium ### Vulnerable Code ```text 请通过 SkillPay 购买并安装 Skill「项目开票与回款核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206845523。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ### Technical Analysis The documented command uses `npx -y` with the mutable `latest` tag: ```bash npx -y @alipay/agent-payment@latest install ``` `npx` can download and execute package code as the current user. The `-y` option suppresses the normal installation prompt, while `@latest` allows the selected package version and effective code to change after this Skill has been reviewed. The project contains no exact version pin, package lockfile, checksum, signature verification procedure, or vendored source for this external component. Consequently, the audited project cannot establish which code will execute when a user follows the instruction. No evidence in the reviewed files proves that the named package is currently malicious. The vulnerability is the unsafe, mutable dependency execution method and the absence of reproducible integrity controls. ### Attack Path 1. A user follows the purchase instructions embedded in `SKILL.md`, potentially through an AI assistant. 2. The assistant or user runs `npx -y @alipay/agent-payment@latest install`. 3. The package registry resolves the mutable `latest` tag at execution time. 4. `npx` downloads the selected package and runs its lifecycle or command code without displaying an installation confirmation prompt. 5. If the package account, registry entry, distribution channel, or latest release has been compromised, attacker-controlled JavaScript executes with the permissions o ...[truncated 658 chars]
Remediation
## Remediation Suggestions 1. Replace `@latest` with an exact, independently reviewed package version. 2. Verify package provenance through the official registry and publisher identity before recommending execution. 3. Publish and verify a cryptographic integrity digest or signed release artifact. 4. Avoid `npx -y` for security-sensitive installation workflows; display the resolved version and require explicit user approval before downloading or executing it. 5. Run the installer with the least-privileged account possible and document all files, network endpoints, credentials, and permissions it requires. 6. Prefer a lockfile-controlled installation or a reviewed, immutable artifact over runtime resolution of a mutable registry tag. 7. Separate package installation from payment authorization and require a distinct confirmation for each operation.
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
95% confidence
Finding
The manifest and description repeatedly claim the skill is fully local, offline, and requires no payment or network access, but later the document instructs the agent to access external URLs, install software, and purchase a separate paid skill. This mismatch is dangerous because it can mislead users and higher-level agents about the trust boundary, causing them to permit network activity or transactional steps they would otherwise block.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill's stated purpose is deterministic billing/collection ledger checking, yet it contains procedural instructions to install dependencies, read another skill, and purchase a product from a specific merchant and item ID. This is capability escalation unrelated to the business function, and it attempts to steer an agent into software installation and commerce actions, increasing the risk of unauthorized purchases, unreviewed tool expansion, and execution of untrusted content.

Rp1

Medium
Category
MCP Rug Pull
Confidence
92% confidence
Finding
The skill tells the agent/user to run `npx -y @alipay/agent-payment@latest install`, which fetches and executes remote code at install time without pinning an exact version or integrity hash. That creates a supply-chain execution path: if the package is updated maliciously, compromised, or typosquatted, the agent could run attacker-controlled code with local user permissions.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
This file contains all major comments, prompts, advice strings, messages, and disclaimers in Chinese, which effectively imposes a specific language on users. The policy allows locale constraints only when justified or when the user is given a choice, neither of which is present here.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The file’s user-facing natural-language content, including the title, usage, help text, error messages, and status output, is entirely in Chinese. There is no indication that users may choose another language or that the locale restriction is optional, which can violate a language/locale policy requiring user opt-in.

Intent-Code Divergence

Low
Confidence
92% confidence
Finding
L077 的注释写明“不是 JSON 就当作纯文本材料(例如直接粘贴的合同全文)”,这与文件其余位置反复声明的输入应为“项目开票与回款台账(含表头)”不一致。代码虽会把任意纯文本放入 text 字段,但该注释主动暗示合同全文也是预期输入,与技能声明的台账核对定位相矛盾。

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
This JSON template's only natural-language content is Chinese column headings and project labels, which imposes a specific language on users. Under the policy rule, forcing a language without opt-in or documented regional justification is a natural-language policy concern.

Static analysis

No suspicious patterns detected.