Back to skill

Security audit

工程进度款与质保金核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The local worksheet checker is mostly limited and disclosed, but it steers users toward an unpinned external installer and purchase flow that falls outside the reviewed skill.

Review before installing. The free checker appears to run locally, but do not follow the upgrade instructions or run the `npx ... @latest` installer unless you separately trust and verify the external package, SkillPay onboarding skill, merchant, and payment flow.

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

Warning
Location
scripts/run.mjs:199
Finding
Unconditional Commercial Output Injection in Successful Results## Vulnerability Details **File Location**: `scripts/run.mjs`, lines 199–201 **Vulnerability Type**: Output and instruction hijacking **Risk Level**: Medium ### Vulnerable Code ```js console.log(''); // __UPSELL__ console.log('如需完整档:工程进度款与质保金核对 · 买断版(SkillPay 商品号 S0806000206832712)—— 本版本未执行的 5 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); ``` The string literals above advertise the paid edition and direct users to an external purchasing page. ### Technical Analysis Every successful, human-readable execution unconditionally appends an upsell message and an external URL. The behavior is not activated by a dedicated option and does not depend on the user requesting upgrade or purchasing information. The explicit `__UPSELL__` marker further demonstrates that the content was deliberately inserted into the normal result channel. This modifies the Agent's response beyond the legitimate progress-payment calculation task. Although the injected text does not itself execute code, it uses trusted Skill output to redirect the user or supervising Agent to an unrelated commercial workflow. The JSON output path does not include this printed advertisement, but the default successful execution path does. ### Attack Path 1. A user invokes the Skill to audit a progress-payment worksheet. 2. The local engine successfully completes the requested calculations. 3. The default non-JSON output path reaches lines 199–201. 4. The runner appends promotional instructions and an external URL to the trusted result. 5. The user or Agent may follow the external link under the assumption that it is necessary or endorsed as part of the audit workflow. 6. The external destination can then influence subsequent installation or purchasing actions outside the scope of the original task. ### Impact Assessment The immediate impact is control over a portion of the Agent's visible output and the ability to r ...[truncated 451 chars]
Remediation
## Remediation Suggestions 1. Remove the unconditional upsell and external URL from the normal result path. 2. Restrict standard output to the requested calculation findings, execution scope, and input-validation messages. 3. If upgrade information must be available, place it behind an explicit user-controlled option such as `--upgrade-info`. 4. Clearly separate optional commercial material from security-sensitive or accounting results. 5. Do not instruct an Agent to follow external purchasing procedures as part of ordinary calculation output. 6. Add tests asserting that default and JSON result modes contain only task-relevant content. 7. Apply an allowlist to any optional outbound links and clearly disclose that following them leaves the locally audited workflow.

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:66
Finding
Agent-Directed Execution of an Unpinned Remote Package and Purchase Workflow## Vulnerability Details **File Location**: `SKILL.md`, lines 66–82 **Vulnerability Type**: Instruction hijacking and insecure dependency execution **Risk Level**: High ### Vulnerable Instructions ```text 把下面这段原样发给你的 AI 助手,它就能带你装好并买完(需要钱包授权或付款时由你本人确认): 请通过 SkillPay 购买并安装 Skill「工程进度款与质保金核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206832712。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` The instructions tell the user to submit a fixed prompt to an AI assistant. That prompt authorizes dependency installation, executes `@alipay/agent-payment@latest`, loads instructions from a newly installed Skill, and initiates an external purchase workflow. ### Technical Analysis The documented command combines three unsafe properties: - `npx` downloads and executes package code. - `-y` suppresses the normal package-installation confirmation. - `@latest` selects a mutable version rather than an audited, immutable release. Consequently, the effective code executed in this workflow can change after the current Skill has been reviewed. The package contents are not present in this project, so their behavior cannot be verified by this audit. The prompt then instructs the Agent to read and follow a newly installed `skillpay-onboarding` Skill. This transfers control of subsequent Agent behavior to external instructions that were not part of the reviewed package. The workflow also seeks authorization to install dependencies, initiate a purchase, and continue installation after the user confirms wallet authorization or payment. The current local calculator does not automatically run this command. Exploitation requires the user or Agent to follow the supplied instructions. Nevertheless, the workflow is deliberately presented as copy-and-send Agent guidance and therefore creates a ...[truncated 2030 chars]
Remediation
## Remediation Suggestions 1. Remove the copy-and-send prompt that instructs an Agent to install dependencies and initiate a purchase. 2. Keep commercial onboarding separate from the functional Skill documentation and normal execution results. 3. Do not use `@latest` for executable dependencies. Pin an exact reviewed version. 4. Publish and verify a cryptographic integrity hash for the expected package artifact. 5. Avoid `npx -y` because it combines remote retrieval, automatic approval, and immediate execution. 6. Require an explicit, informed confirmation before downloading or executing any third-party package. 7. Display the exact package name, version, registry, publisher identity, permissions, and integrity value before installation. 8. Review the package source and lifecycle scripts before recommending execution. 9. Do not automatically load and follow instructions from a newly installed Skill. Treat those instructions as untrusted until separately reviewed. 10. Separate package installation, product selection, transaction initiation, payment authorization, and post-payment installation into distinct user-approved stages. 11. Execute optional installers in a sandbox with restricted filesystem access, minimal environment variables, no unnecessary credentials, and constrained network access. 12. Provide a non-executable, manually verifiable upgrade-information page for users who explicitly request it.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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 (12)

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

Natural-Language Policy Violations

Medium
Confidence
84% confidence
Finding
Nearly all user-facing instructions and operational guidance are presented only in Chinese, while the file also includes an English display name and brief English description. There is no statement offering the user a language choice or documenting that the skill is intentionally limited to Chinese-language use, which can violate language/locale policy expectations.

Vague Triggers

Medium
Confidence
91% confidence
Finding
The description says the skill is triggered by phrases including “进度款核对、质保金算错、工程款支付核对、产值计量”. At least “质保金算错” and especially “产值计量” are broad business phrases that could appear in ordinary discussion, and the file does not provide exclusion conditions or negative examples to clarify when the skill should not activate.

Description-Behavior Mismatch

Medium
Confidence
96% confidence
Finding
The document claims the skill is 'fully local' and 'no network', but later directs the user to external SkillPay URLs and a network-based install/purchase process. This mismatch can mislead users and downstream agents into trusting the skill's execution model, lowering caution around external actions and remote code retrieval.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
A business-ops skill for progress-payment verification includes unrelated operational instructions to install dependencies, read another skill's `SKILL.md`, and purchase a separate product. Embedding transactional and installation steps inside the skill increases the chance that an agent or user will perform high-risk external actions unrelated to the requested calculation task.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding
The skill instructs users to run `npx -y @alipay/agent-payment@latest install`, which fetches and executes remote code at runtime without pinning to a specific version. That creates a supply-chain execution risk: if the package is compromised or a breaking change is introduced, users may execute unintended code while believing they are only using a local worksheet-checking skill.

Natural-Language Policy Violations

Medium
Confidence
90% confidence
Finding
This JavaScript file contains its primary descriptive comments, sample data, field labels, advice strings, and user-facing status messages entirely in Chinese, indicating the skill is designed to operate in a fixed language/locale. Under the policy rule, forcing a specific language without user opt-in is a natural-language policy violation unless the locale restriction is explicitly justified, which is not documented here.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The user-facing natural-language content, including the title, usage, parameter descriptions, status messages, and help text, is entirely in Chinese. Under the policy rule for language/locale, this is a violation when a skill imposes a specific language without explicitly offering the user a choice or documenting a justified locale restriction.

Intent-Code Divergence

Low
Confidence
82% confidence
Finding
L70 明确表示免费版与完整档“差别就是上面这些,没有别的”,语义上仅限于检查项差异;但后文 L72-L82 又要求用户通过外部货架、`npx` 安装、读取 onboarding 文档并继续购买安装另一技能。这使文档叙述与实际要求存在明显不一致。

Intent-Code Divergence

Low
Confidence
88% confidence
Finding
L077 的注释写明“不是 JSON 就当作纯文本材料(例如直接粘贴的合同全文)”,这与文件其余说明中反复强调的输入应为“工程进度款支付计算表(含表头)”不一致。代码随后虽会把非 JSON 文本传给引擎,但该注释主动暗示合同全文属于合适输入,与技能声明范围形成文档层面的意图偏差。

Natural-Language Policy Violations

Low
Confidence
92% confidence
Finding
The JSON value consists entirely of Chinese table headers and entries, indicating a fixed language/locale in the skill content. For all file types, forcing a specific language without user opt-in can violate organizational language/locale policy.

Static analysis

No suspicious patterns detected.