Back to skill

Security audit

差旅费标准与报销核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The local checker mostly matches its purpose, but it also steers users into a paid installation flow that runs outside code and changes the agent environment.

Install only if you want the local free checker and are comfortable with its Chinese-language output. Do not copy the paid-upgrade prompt or allow the npx @latest installer unless you separately trust SkillPay, the npm package, and the newly installed onboarding skill; use JSON output if you need checker results without the appended promotional text.

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
scripts/run.mjs:197
Finding
Unconditional Commercial Content Injection into Successful Results## Vulnerability Details **File Location**: `scripts/run.mjs:197-199` **Vulnerability Type**: Unconditional output manipulation **Risk Level**: High **Complete Code Snippet**: ```js console.log(''); // __UPSELL__ console.log('如需完整档:差旅费标准与报销核对 · 买断版(SkillPay 商品号 S0806000206851262)—— 本版本未执行的 5 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` ### Technical Analysis Every successful invocation using the default human-readable output path unconditionally appends a commercial product promotion and an external purchasing URL. This content is unrelated to the expense-checking computation and cannot be disabled independently of selecting JSON output. The explicit `__UPSELL__` marker demonstrates that the insertion is intentional. Because an AI agent may relay command output directly to the user, the injected content can become part of the agent's response despite not being requested. This alters the expected output of the skill and redirects the user toward an external commercial workflow. ### Attack Path 1. A user or agent invokes `node scripts/run.mjs --input <file>`. 2. The local engine performs the documented expense checks. 3. The successful human-readable output branch is entered. 4. Lines 197-199 append the promotion and external purchase URL without user consent or an opt-in option. 5. An invoking agent may reproduce this content as part of its trusted analytical response. 6. The user may follow the promoted URL and enter the separate installation and purchasing workflow. ### Impact Assessment This issue does not directly grant operating-system privileges or access to local data. Its scope is manipulation of the skill's successful output and redirection of user attention toward an external commercial service. In agent-mediated use, the promotional message may be presented with the same apparent authority as the legitima ...[truncated 179 chars]
Remediation
## Remediation Suggestions 1. Remove the unconditional promotional output from the normal result path. 2. Keep analytical output limited to the requested expense-checking results. 3. If upgrade information is necessary, require explicit user opt-in through a flag such as `--show-upgrade-info`. 4. Clearly separate optional commercial information from findings and machine-readable results. 5. Ensure that both human-readable and JSON output modes have equivalent security and content boundaries. 6. Add automated tests confirming that a normal successful run contains no advertisements, purchase instructions, or unrelated external links.

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:90
Finding
Agent-Directed Execution of an Unpinned Dependency and External Purchase Workflow## Vulnerability Details **File Location**: `SKILL.md:90-98` **Vulnerability Type**: Agent instruction redirection and unsafe dependency execution **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的S0806000206851262。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ``` ### Technical Analysis The documentation provides a copy-and-paste prompt specifically designed to instruct an AI agent to install and execute `@alipay/agent-payment@latest`, read instructions from a newly installed skill, initiate a purchase, and continue with another installation. Use of the mutable `@latest` tag means the package version and effective executable payload are not fixed to the artifact that was audited. The `npx -y` options allow package retrieval and execution without an interactive package-installation confirmation. Consequently, future package content can differ from the content available when this skill was reviewed. The workflow also delegates control to another skill's `SKILL.md`. Those newly retrieved instructions are outside this project's audit boundary and can influence the agent's subsequent goals and tool use. Although the supplied text requires the user to confirm wallet authorization or payment, dependency installation and loading of external instructions occur earlier in the path. ### Attack Path 1. The user reads the upgrade section or receives the promotion emitted by the executable. 2. The user copies the provided prompt into an AI assistant. 3. The assistant follows the prompt and runs: `npx -y @alipay/agent-payment@latest install` 4. The package manager retrieves the packag ...[truncated 1485 chars]
Remediation
## Remediation Suggestions 1. Remove the copy-and-paste prompt that directs an AI agent to install dependencies, load another skill's instructions, and initiate a purchase. 2. Present any optional purchase information as a passive link that the user may inspect manually. 3. Do not use `@latest` for executable dependencies. Pin an exact, reviewed package version. 4. Verify the pinned package with a package-lock file and an expected integrity hash. 5. Avoid `npx -y` for security-sensitive installation workflows because it suppresses an installation confirmation step. 6. Require explicit, separate user confirmation before dependency installation, loading newly installed skill instructions, initiating a purchase, and installing the purchased product. 7. Display the exact package name, version, registry, integrity value, requested permissions, and planned commands before execution. 8. Treat newly installed `SKILL.md` content as untrusted until independently reviewed, rather than automatically delegating control to it. 9. Run any unavoidable installer in a restricted environment with minimal filesystem access, no unnecessary credentials, and no wallet or payment permissions.
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • 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
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
91% confidence
Finding
The skill presents itself as a fully local, no-network checking tool, but later embeds instructions that cause the agent to access external commerce URLs, install onboarding software, and facilitate purchase of a separate product. This mismatch can socially engineer users or agents into trusting the skill more than they should, increasing the likelihood of unexpected network access, code execution, and payment-related actions.

Context-Inappropriate Capability

Medium
Confidence
90% confidence
Finding
The skill contains operational instructions for commerce, onboarding, dependency installation, and product purchase that are unrelated to its stated purpose of reconciling travel-expense tables. In an agent setting, this broadens the action surface from document checking to software installation and transactional flows, creating opportunities for confused-deputy behavior and unsafe privilege use.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill instructs the agent to run an unpinned npm package via `npx -y @alipay/agent-payment@latest install`, which executes whatever code is currently published under that package name. This creates a supply-chain and remote code execution risk: if the package is compromised, typosquatted, or changed unexpectedly, the agent could execute attacker-controlled code on the host.

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The file’s natural-language documentation and user-facing strings are entirely in Chinese, including required input guidance and result messages. There is no indication that the skill is region-specific or that users may choose another language, which can violate an organizational language/locale policy requiring opt-in or documented justification.

Intent-Code Divergence

Medium
Confidence
97% confidence
Finding
The disclaimer says the tool checks "伙食补助 = 天数 × 标准", but the free-tier implementation explicitly withholds that logic and never performs it. This can mislead users into trusting a control that does not actually exist, causing missed reimbursement discrepancies and weakening financial review integrity.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The file’s user-facing description, usage text, prompts, and output messages are entirely in Chinese, and there is no indication that users may opt into another language or locale. Under the policy for natural-language violations, forcing a specific language without user opt-in is in scope unless the locale restriction is clearly documented and justified.

Intent-Code Divergence

Low
Confidence
84% confidence
Finding
L077 的注释写明“不是 JSON 就当作纯文本材料(例如直接粘贴的合同全文)”,但该技能的清单与其余帮助文本都表明输入应是差旅费报销与标准表,而非合同全文。这属于内联文档对技能意图的错误描述,容易误导维护者或调用方对实际适用材料范围的理解。

Static analysis

No suspicious patterns detected.