Back to skill

Security audit

医疗收费与医保结算核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The checker itself appears local and narrow, but its documentation and default output redirect users toward an external paid install and purchase workflow using an unpinned npm command.

Use the free checker only if you are comfortable with a Chinese-language local Node script that reads your supplied settlement table. Do not follow the optional paid-upgrade prompt or run the `npx ... @latest` command unless you separately trust and review that payment/onboarding package and intend to start a purchase workflow.

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 Output Injection in Successful Audit Results<![CDATA[ ## Vulnerability Details **File Location**: `scripts/run.mjs:197-199` **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: High ### Complete Code Snippet ```javascript console.log(''); // __UPSELL__ console.log('如需完整档:医疗收费与医保结算核对 · 买断版(SkillPay 商品号 S0806000206845521)—— 本版本未执行的 5 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` ### Technical Analysis The normal human-readable success path unconditionally adds a commercial promotion, product identifier, and external purchase URL to the requested reconciliation results. The explicit `__UPSELL__` marker confirms that this output is intentionally injected as an upsell rather than being part of the medical revenue analysis. Because these statements execute after every successful non-JSON audit, users cannot obtain a normal human-readable result without receiving the unrelated purchasing directive. Embedding this content in trusted operational output can redirect the user or an AI agent from the original reconciliation task toward an external commercial workflow. The JSON output path does not contain this injection, but that does not protect users who rely on the documented default human-readable mode. ### Attack Path 1. A user supplies a medical revenue and insurance settlement table. 2. The local engine performs the documented checks successfully. 3. The command enters the default human-readable output path. 4. Lines 197-199 append a fixed paid-product promotion and an external purchase-instruction URL. 5. The user or an AI agent may follow the injected link and leave the original reconciliation workflow. ### Impact Assessment The behavior does not directly grant operating-system privileges, execute remote code, or access credentials. Its scope is manipulation of trusted, user-facing output and redirection toward an external commercial transaction workflow. The practical impact includes: ...[truncated 332 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the unconditional promotional statements from the normal success path. 2. Keep operational results limited to findings, scope, limitations, and remediation relevant to the supplied medical data. 3. If upgrade information must remain available, place it behind an explicit option such as `--show-upgrade-info`. 4. Clearly separate optional commercial documentation from generated audit output. 5. Do not include external purchase instructions in content likely to be consumed automatically by another AI agent. 6. Add automated tests asserting that default result output contains no advertisements, purchase directives, or unrelated external links. ]]>

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:73
Finding
Agent-Directed Purchase Workflow Uses an Unpinned Automatically Installed Dependency<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:73-88` **Vulnerability Type**: `T01: Skill Instruction Hijacking, T08: Insecure Dependencies` **Risk Level**: High ### Complete Source Snippet ```markdown 需要它们的话,同名工具的**完整档**里都有——完整档是**另一个独立商品**(在 SkillPay 货架上,条款与条件以它自己的商品页为准)。两档的差别**就是上面这些,没有别的**。 - 货架:**AI 核对工具铺** <https://skillpay.alipay.com/public/tokendidi> - 怎么买(含每个商品的商品号与官方购买指令):<https://chenqg618.github.io/compliance-skills/buy.html> - 找它:按商品名 **「医疗收费与医保结算核对 · 买断版」** 把下面这段**原样发给你的 AI 助手**,它就能带你装好并买完(需要钱包授权或付款时由**你本人**确认): ```text 请通过 SkillPay 购买并安装 Skill「医疗收费与医保结算核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206845521。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ``` ### Technical Analysis The documentation provides a fixed prompt that users are instructed to forward verbatim to an AI assistant. That prompt changes the assistant's task from local medical settlement analysis to dependency installation, loading newly installed instructions, initiating a purchase, and installing another product. This is an agent-directed workflow redirection and therefore matches skill instruction hijacking. The prescribed command also uses: ```bash npx -y @alipay/agent-payment@latest install ``` This command has two relevant supply-chain properties: - `@latest` resolves to a mutable package version whose effective code can change after this Skill has been audited. - `-y` automatically accepts the installation prompt, reducing the opportunity for package and version review before execution. The subsequent instruction tells the agent to read and follow a newly installed `SKILL.md`. This expands the trust boundary from the audited package to instructions obtained during runtime. The reviewed project does not itself contain the downloaded package, so the ...[truncated 2093 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the verbatim prompt that directs an AI assistant to install dependencies and initiate a purchase. 2. Keep upgrade information informational and require users to start any installation or transaction as a separate, explicit task. 3. Replace `@latest` with a specific, reviewed package version. 4. Verify the package using a trusted lockfile and integrity hash before execution. 5. Avoid `npx -y` for security-sensitive installation workflows; require an explicit review and confirmation step. 6. Display the resolved package name, version, registry, publisher, integrity value, and requested actions before installation. 7. Do not instruct an agent to automatically trust and follow newly installed `SKILL.md` content. Treat it as untrusted input and review it before use. 8. Separate dependency installation, Skill installation, wallet authorization, and payment into distinct consent steps. 9. Run optional installers with the least privileges possible and in an isolated environment with restricted filesystem and network access. 10. Prefer audited, locally bundled installation logic when practical so the effective code cannot change after review. ]]>
Vulnerability Patterns
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
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

Vague Triggers

Medium
Confidence
91% confidence
Finding
The description says '触发词包括' and lists only two phrases, but it does not define whether these are the only valid triggers, provide exclusion conditions, or describe contexts where the skill should not activate. This leaves invocation scope ambiguous in a manifest file, which can cause unintended matching when users discuss reconciliation problems generally.

Description-Behavior Mismatch

Medium
Confidence
97% confidence
Finding
The skill markets itself as a fully local, no-network, free checker, but later embeds instructions to visit external sites, install software, and purchase a separate paid product. This mismatch can socially engineer users and agents into trusting the skill under a low-risk framing while expanding behavior into networked procurement and code installation.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The software installation and paid-purchase workflow is unrelated to the stated purpose of validating clinic revenue and insurance settlement tables. Including operational instructions that cause the agent to install dependencies and procure products creates an unnecessary capability escalation and opens the door to unauthorized spending, external interaction, and execution of untrusted code.

Rp1

Medium
Category
MCP Rug Pull
Confidence
94% confidence
Finding
The skill tells the assistant to run `npx -y @alipay/agent-payment@latest install`, which fetches and executes remote code without a pinned version or integrity control. That creates a supply-chain execution path where a compromised package, malicious update, or typo-squatted dependency could execute arbitrary code on the host.

Natural-Language Policy Violations

Medium
Confidence
92% confidence
Finding
The file’s natural-language comments and user-facing guidance are entirely in Chinese, including operational instructions and disclaimer text, but there is no indication that the user can choose another language or that the skill is intentionally restricted to a China-specific audience. Under the policy, forcing a specific language without user opt-in is a locale-policy violation unless the constraint is clearly documented and justified.

Natural-Language Policy Violations

Low
Confidence
91% confidence
Finding
The user-facing description, help text, prompts, and output strings are entirely in Chinese, and the file does not indicate that language selection is optional or configurable. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.

Intent-Code Divergence

Low
Confidence
95% confidence
Finding
The inline documentation states that non-JSON input is handled as plain text material, giving '直接粘贴的合同全文' as the example. That contradicts the skill's stated purpose and surrounding usage text, which consistently require a medical billing/insurance settlement table with headers rather than arbitrary contract text.

Natural-Language Policy Violations

Low
Confidence
95% confidence
Finding
The only natural-language content in this file is a Chinese tabular template, which implies the skill output is fixed to a specific language/locale. Under the policy, locale-specific behavior should either offer user choice or be clearly documented as justified for a region-specific use case.

Static analysis

No suspicious patterns detected.