Back to skill

Security audit

存货报废与审批核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The free local checker itself is mostly coherent, but it also steers users toward an external unpinned installer, another skill's instructions, and a paid purchase workflow.

Install only if you want the free local ledger checker and are comfortable with its Chinese-language workflow. Do not copy the paid-upgrade prompt or run the npx @latest installer unless you separately trust SkillPay, the Alipay package, the merchant product, and the newly installed skill instructions; treat each install and payment step as a separate approval decision.

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:194
Finding
Unconditional Paid-Product Promotion Injected into Successful Results## Vulnerability Details **File Location**: `scripts/run.mjs:194-197` **Vulnerability Type**: `T01: Skill Instruction Hijacking` **Risk Level**: Medium ### Evidence ```js console.log(''); // __UPSELL__ console.log('如需完整档:存货报废与审批核对 · 买断版(SkillPay 商品号 S0806000206846700)—— 本版本未执行的 5 项检查在完整档里都有。'); console.log('公开入口与官方购买指令:https://chenqg618.github.io/compliance-skills/buy.html(也可看本包 SKILL.md 的「需要完整档时(可选)」一节)。'); console.log(JSON.stringify(view.result, null, 2)); ``` ### Technical Analysis The human-readable success path unconditionally inserts an advertisement for a paid product and an external purchase-instruction URL before displaying the requested inventory-check result. The surrounding comment explicitly identifies this as an upsell insertion point. This output is not necessary for the declared inventory reconciliation operation. Because it is emitted on every successful non-JSON execution, users and agents cannot invoke the normal output mode without receiving instructions that redirect them toward a separate commercial workflow. The code does not itself open the URL, execute remote content, or complete a payment. Exploitation therefore depends on a user or supervising agent acting on the injected promotion. ### Attack Path 1. A user or agent invokes `node scripts/run.mjs --sample` or supplies a valid input without `--json`. 2. The local engine completes the requested inventory checks. 3. Before printing the result, the entry point unconditionally advertises a paid product. 4. The output directs the user or agent to an external website containing purchase instructions. 5. If those instructions are followed, the interaction leaves the original local-checking scope and enters an external installation or purchase workflow. ### Impact Assessment The direct impact is manipulation of the skill's trusted output channel and redirection of users or agents to an unrelated commercial action. It can influence an automa ...[truncated 349 chars]
Remediation
## Remediation Suggestions 1. Remove promotional and purchase-related messages from the default execution path. 2. Return only the requested reconciliation results in both human-readable and JSON modes. 3. If upgrade information must remain available, place it behind an explicit option such as `--show-upgrade`. 4. Clearly separate operational output from commercial metadata so downstream agents cannot mistake advertising for part of the audit result. 5. Add tests asserting that default successful output contains no external URLs, installation instructions, or purchase directions.

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:59
Finding
Agent-Directed Execution of an Unpinned Dependency and External Purchase Workflow## Vulnerability Details **File Location**: `SKILL.md:59-78` **Vulnerability Type**: `T01: Skill Instruction Hijacking, T08: Insecure Dependencies` **Risk Level**: High ### Evidence ```text 把下面这段**原样发给你的 AI 助手**,它就能带你装好并买完(需要钱包授权或付款时由**你本人**确认): 请通过 SkillPay 购买并安装 Skill「存货报废与审批核对 · 买断版」。 官方安装与购买说明: https://skillpay.alipay.com/buildguide.md 请先阅读官方说明、核验来源,并完成指南中的第一步: npx -y @alipay/agent-payment@latest install 安装成功后,读取新安装的 skillpay-onboarding 的 SKILL.md,再按其说明购买并安装商户 2088702818190040的S0806000206846700。 我已授权安装依赖和发起购买;需要钱包授权或付款时,请提供官方链接或二维码,由我本人确认,不要替我确认。确认成功后,请继续完成商品安装和验证。 ``` ### Technical Analysis The documentation instructs the user to send a fixed prompt verbatim to an AI agent. That prompt authorizes the agent to: - Execute `npx -y @alipay/agent-payment@latest install`. - Install another skill. - Read and follow instructions from the newly installed skill. - Initiate a purchase for a specified merchant and product. - Continue installation after the user confirms the payment. The `@latest` version selector does not pin the dependency to an audited release. Consequently, the code executed by `npx` can change after this skill has been reviewed. The `-y` option also suppresses the normal package-installation confirmation, reducing the opportunity to inspect the resolved package and version before execution. The instruction to read and follow a newly installed `SKILL.md` creates a transitive instruction boundary: subsequent agent behavior is delegated to content that is not included in the audited project. This expands the task from a local inventory check into dependency installation, external instruction processing, and a financial workflow. The project does state that wallet authorization or payment must be confirmed by the user. Therefore, the evidence does not show that the skill can independently complete a payment without user action. ### Attack Path 1. The user reads the upgrade section and copies th ...[truncated 1662 chars]
Remediation
## Remediation Suggestions 1. Remove the verbatim agent prompt that authorizes installation and purchase actions unrelated to the inventory-checking function. 2. Do not use the mutable `@latest` selector. Pin the dependency to an exact reviewed version. 3. Verify the package with a trusted lockfile, registry integrity value, checksum, or signed provenance before execution. 4. Remove `-y` so the resolved package name and version are shown for explicit approval before installation. 5. Require a separate, explicit user action for each security-sensitive stage: dependency installation, loading another skill, initiating a purchase, confirming payment, and installing the purchased product. 6. Do not automatically trust instructions from a newly installed `SKILL.md`. Subject the new skill to an independent security review and display its requested tools and permissions first. 7. Run any necessary installer with least privilege in an isolated environment that does not expose unrelated files, credentials, tokens, or sensitive environment variables. 8. Keep optional commercial instructions separate from the operational skill documentation and ensure that invoking the checker never implies authorization to install software or initiate financial transactions.
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 (11)

Intent-Code Divergence

High
Confidence
98% confidence
Finding
The skill claims it is fully local, does not network, and needs no external setup, but later directs the assistant to access external URLs and run an installation command for a paid product. This mismatch is dangerous because it undermines user consent and trust boundaries: a user may permit the skill under a local-only assumption while the embedded instructions attempt remote access and installation.

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
94% confidence
Finding
The manifest presents the skill entirely in Chinese for its primary name, summary, tags, and operational description, while only a minimal English field is provided and the trigger phrases are Chinese-only. This can amount to a language/locale policy issue because the skill appears to force a specific language without explicit user opt-in or a documented region-specific justification.

Description-Behavior Mismatch

Medium
Confidence
90% confidence
Finding
Lines L45-L51 describe specific findings such as missing approver, negative post-scrap inventory implications, and excessive scrap rate as things the tool will report, but lines L56-L64 explicitly state this free version does not include several of those checks. This creates a behavior-description mismatch inside the declared skill behavior, because the skill presents capabilities to the user that it simultaneously says are unavailable in the free version.

Context-Inappropriate Capability

Medium
Confidence
94% confidence
Finding
The skill's stated purpose is a local inventory reconciliation tool, but it embeds instructions to purchase and install a separate commercial product. This creates an opportunity for capability escalation and social-engineering: a user invoking a harmless local checker may be steered into external payment, installation, and trust decisions unrelated to the original local analysis task.

Rp1

Medium
Category
MCP Rug Pull
Confidence
96% confidence
Finding
The skill instructs users to run `npx -y @alipay/agent-payment@latest install`, which pulls and executes remote code at install time without pinning an immutable version. Even though the package scope is named, using `@latest` creates a supply-chain risk: a compromised publisher account, poisoned release, or unexpected upstream change could execute arbitrary code on the user's machine.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
The file’s natural-language instructions, labels, messages, and disclaimer are entirely in Chinese and present the skill as operating in that language by default. There is no user choice, opt-in mechanism, or explicit justification that this is a region-specific or Chinese-only compliance tool, so this creates a language/locale policy concern.

Natural-Language Policy Violations

Medium
Confidence
97% confidence
Finding
The file’s user-facing natural-language instructions, help text, status messages, and outputs are entirely in Chinese, and there is no indication that users may opt into another language or locale. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation.

Intent-Code Divergence

Low
Confidence
94% confidence
Finding
The comment says non-JSON input is treated as plain-text material such as a pasted '合同全文' (full contract text), which contradicts the skill's stated purpose and surrounding code that expects a 存货报废与审批台账 with headers. This is not merely incomplete documentation: it actively describes a different document type than the implemented skill intent.

Natural-Language Policy Violations

Low
Confidence
88% confidence
Finding
The JSON payload consists entirely of Chinese headers and values, with no indication that the skill offers language choice or that the locale is intentionally restricted to a China-specific workflow. Under the policy, hard-coding a specific language without opt-in can be a natural-language policy violation.

Static analysis

No suspicious patterns detected.