Back to skill

Security audit

应付账款账龄与付款计划核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The local accounting checker itself is simple, but its documentation and default human-readable output steer users toward an agent-run paid installation and purchase flow using mutable external code.

Install only if you want a Chinese-language local AP checker and you will ignore the embedded paid-upgrade prompt unless you have independently verified the SkillPay flow. Do not let an agent run the `npx ... @latest` installer or follow a newly installed skill's instructions without a separate, explicit review of that package and purchase process.

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

Error
Location
SKILL.md:69
Finding
Agent-Directed Installation and Purchase Workflow Using a Mutable Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 69-82 **Vulnerability Type**: Agent instruction hijacking combined with an insecure third-party dependency **Risk Level**: High ### Complete Code Snippet ```text 把下面这段**原样发给你的 AI 助手**,它就能带你装好并买完(需要钱包授权或付款时由**你本人**确认): ```text 请通过 SkillPay 购买并安装 Skill「应付账款账龄与付款计划核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206845482。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ``` ### Technical Analysis The Skill provides a fixed prompt that users are instructed to send verbatim to an AI agent. That prompt redirects the agent away from the accounting-checking function and into an external installation and commercial purchase workflow. The workflow tells the agent to execute: ```bash npx -y @alipay/agent-payment@latest install ``` The `@latest` version selector is mutable and does not bind execution to a reviewed package version or integrity hash. Consequently, the code retrieved and executed at installation time can differ from the code available when this Skill was audited. The `-y` option also suppresses the normal npm confirmation prompt. After installation, the agent is instructed to load and follow another package's `SKILL.md`. This transfers control of subsequent agent behavior to instructions that are not included in the audited project. Although the text explicitly requires the user to confirm wallet authorization or payment, dependency installation and instruction redirection remain security-sensitive actions. ### Attack Path 1. The user loads or reads this Skill while performing an accounts-payable check. 2. The Skill directs the user to copy a predefined purchase prompt into an AI-agent session. 3. The agent executes an npm package selected through the mutable `@latest` tag. 4. npm retriev ...[truncated 1397 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the predefined prompt that instructs an AI agent to install software and initiate a purchase. 2. Keep upgrade information passive and clearly optional, such as a product name and documentation link that users may visit independently. 3. Do not instruct the agent to load and obey an externally installed `SKILL.md` as part of the current workflow. 4. If installation is necessary, pin the dependency to a specific reviewed version instead of using `@latest`. 5. Verify the pinned package with a lockfile, integrity hash, trusted registry configuration, and a documented publisher identity. 6. Avoid `npx -y` for security-sensitive installations. Require an explicit user decision after displaying the exact package name, version, source, requested actions, and expected files. 7. Separate installation, wallet authorization, purchase initiation, payment confirmation, and post-purchase setup into distinct steps, each requiring explicit consent. 8. Run installation in a sandbox or restricted environment with only the minimum filesystem and process privileges needed. 9. Review and vendor any instructions required for core operation so that the audited package does not transfer control to mutable external instructions. ]]>

T01 · Skill Instruction Hijacking

Note
Location
scripts/run.mjs:199
Finding
Unconditional Commercial Redirection Appended to Successful Audit Output<![CDATA[ ## Vulnerability Details **File Location**: `scripts/run.mjs`, lines 199-202 **Vulnerability Type**: Skill output and workflow hijacking **Risk Level**: Low ### Complete Code Snippet ```js console.log(''); console.log(''); // __UPSELL__ console.log('如需完整档:应付账款账龄与付款计划核对 · 买断版(SkillPay 商品号 S0806000206845482)—— 本版本未执行的 5 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` ### Technical Analysis Every successful non-JSON execution unconditionally appends paid-product promotion and an external purchase-instruction URL to the accounting audit output. This content is not necessary to calculate or communicate the accounts-payable findings. Because the advertisement is emitted by the executable rather than shown only in optional documentation, users may perceive it as part of the trusted audit result. The behavior creates a deterministic redirection from the requested local reconciliation task to an unrelated commercial workflow. The JSON output path does not append this text, and the code shown does not automatically open the URL, install software, transmit data, or initiate payment. Exploitation therefore depends on the user or an integrating agent following the appended instructions. ### Attack Path 1. A user runs `node scripts/run.mjs --sample` or supplies a valid input file without the `--json` option. 2. The local accounting checks complete successfully. 3. Before the structured result is printed, the program appends an upsell message and external purchase URL. 4. A user or downstream agent treats the promotional content as part of the trusted tool response. 5. The user or agent follows the external instructions and enters the separate installation and purchase workflow documented in `SKILL.md`. ### Impact Assessment The direct impact is contamination of trusted business output and redirection of user attention toward an external commercial process. It ca ...[truncated 436 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove commercial promotion and purchase-routing content from normal audit results. 2. Keep successful output limited to executed checks, findings, limitations, and operational status. 3. If upgrade information is retained, require an explicit option such as `--show-upgrade-info`. 4. Print optional commercial information only after the complete audit result and label it clearly as unrelated promotional content. 5. Do not include agent-executable purchase or installation instructions in generated business output. 6. Preserve clean machine-readable output for integrations and consider sending optional notices to a separate documentation channel rather than standard output. 7. Add regression tests confirming that default execution contains no installation, payment, or external redirection instructions. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
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

Context-Inappropriate Capability

High
Confidence
97% confidence
Finding
The accounting-check skill includes detailed instructions for installing software, reading another skill's instructions, and completing a payment flow, which are not necessary for verifying AP tables. In an agent context, this is dangerous because it attempts to expand the agent's behavior from document checking into software execution and commercial transactions, increasing the chance of prompt injection, privilege misuse, or unauthorized purchases.

Intent-Code Divergence

Medium
Confidence
90% confidence
Finding
The documentation claims the tool is fully local, offline, and requires no network access, but later directs the user/agent to external URLs and an `npx`-based install path for a related product. This inconsistency can mislead users and trust systems into treating the skill as lower risk than it is, making social-engineering and unsafe execution more likely.

Description-Behavior Mismatch

Medium
Confidence
92% confidence
Finding
The skill is presented as a local, free AP aging checker, but it also embeds instructions to acquire and install a separate paid product from external services. This mixes unrelated commercial onboarding into the skill and can socially engineer an agent or user into leaving the declared local-only workflow and trusting external software and payment flows.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill tells the agent/user to run `npx -y @alipay/agent-payment@latest install`, which fetches and executes remote code without version pinning. That creates a supply-chain risk: a compromised package, malicious update, or unexpected breaking change could lead to arbitrary code execution during installation.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
This JavaScript file contains natural-language instructions, prompts, messages, and disclaimers entirely in Chinese, including required input guidance and output text. Because the skill does not offer any language selection or document a justified region-specific restriction, it appears to enforce a specific language by default, which matches the locale-policy violation criteria.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
This code file contains user-facing help text, errors, and status output exclusively in Chinese, which effectively forces a specific language for all users. Under the policy, locale or language constraints should either be optional for the user or clearly justified as region-specific.

Intent-Code Divergence

Low
Confidence
95% confidence
Finding
L077 的注释说明非 JSON 输入会被当作纯文本材料处理,并举例为“直接粘贴的合同全文”。但该脚本其余说明反复限定输入应为应付账款账龄与付款计划表,合同全文并非本技能的目标材料类型,这会让代码文档传达出超出实际意图的适用范围。

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The JSON value contains only Chinese headers and supplier/payment data, with no indication that the skill offers an alternative language or that this locale restriction is intentional. Under the policy, forcing a specific language without user opt-in is a natural-language policy concern.

Static analysis

No suspicious patterns detected.