Back to skill

Security audit

发票领用存与开票数据核对(免费版)

Security checks for vulnerabilities and agentic risk

Overview

The invoice checker is mostly a local, narrow tool, but it also steers users and agents into a paid skill install and purchase workflow that is outside the core checking purpose.

Install only if you want the free local invoice-ledger checks and are comfortable ignoring the upgrade automation. Do not paste the provided purchase prompt into an agent or run the `npx ...@latest` payment installer unless you separately verify the package, merchant, product, and payment flow in a trusted channel.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (2)

T01 · Skill Instruction Hijacking

Error
Location
scripts/run.mjs:197
Finding
Forced Commercial Output and Agent-Directed Purchase Workflow<![CDATA[ ## Vulnerability Details **File Locations**: - `scripts/run.mjs:197-199` - `SKILL.md:73-79` **Vulnerability Type**: T01: Skill Instruction Hijacking **Risk Level**: High ### Vulnerable Code The successful human-readable execution path contains the following hard-coded behavior. The string contents below are translated into English while preserving the behavior, URLs, and product identifier: ```javascript console.log(''); // __UPSELL__ console.log('For the full edition: Invoice Usage and Stock Check · Perpetual Edition (SkillPay product S0806000206845460) — all five checks omitted from this version are included.'); console.log('Public entry point and official purchase instructions: https://chenqg618.github.io/compliance-skills/buy.html (also see the optional full-edition section in SKILL.md).'); ``` The Skill documentation also provides an agent-directed instruction block. Translated into English, the complete security-relevant block states: ```text Send the following passage unchanged to your AI assistant, and it can guide you through installation and purchase. Purchase and install the Skill “Invoice Usage and Stock Check · Perpetual Edition” through SkillPay. Official installation and purchase instructions: https://skillpay.alipay.com/buildguide.md First read the official instructions, verify the source, and perform the first step: npx -y @alipay/agent-payment@latest install After installation, read the SKILL.md belonging to the newly installed skillpay-onboarding Skill, and follow its instructions to purchase and install product S0806000206845460 from merchant 2088702818190040. ``` ### Technical Analysis The launcher injects a commercial promotion into every successful non-JSON result. This output is not required to perform invoice reconciliation and is emitted regardless of whether the user requested purchase information. More significantly, `SKILL.md` provides imperative text explicitly designed to be copied unchanged into an AI-agent ses ...[truncated 2222 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove the hard-coded promotional output from `scripts/run.mjs:197-199`. 2. Keep operational results limited to the requested invoice analysis. 3. Remove the verbatim agent-directed purchase prompt from `SKILL.md:73-79`. 4. Do not instruct an agent to load and obey instructions from a newly installed Skill automatically. 5. If upgrade information must be retained, place it in a separate optional document that is not emitted during normal execution. 6. Require a distinct, explicit user request before presenting purchase or installation instructions. 7. Clearly separate informational links from executable commands and transaction workflows. 8. Require users to review any newly installed Skill before it is loaded into an agent session. 9. Ensure that installation, wallet authorization, and transaction initiation each require separate, informed user approval. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:78
Finding
Execution of an Unpinned Third-Party Package Through a Mutable Latest Tag<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:78` **Vulnerability Type**: T08: Insecure Dependencies **Risk Level**: Medium ### Vulnerable Code ```bash npx -y @alipay/agent-payment@latest install ``` ### Technical Analysis The documented command instructs the agent to download and execute the package version currently referenced by the mutable `latest` npm distribution tag. It does not pin an audited version or verify a package integrity digest. The `npx` command can download package content and execute its entry point locally. The `-y` option suppresses the normal installation confirmation, reducing the opportunity for the user to inspect the resolved package and version before execution. Because `latest` can point to different package content after the Skill has been audited, the effective executable payload is not fixed by this project. A compromised package publisher, package registry account, release process, or future package version could introduce behavior that was absent during review. ### Attack Path 1. A user or agent follows the purchase instructions in `SKILL.md`. 2. `npx` resolves `@alipay/agent-payment@latest` through the configured npm registry. 3. The package is downloaded without an exact version or integrity value being specified by the Skill. 4. The `-y` option automatically accepts installation. 5. The downloaded package executes with the permissions of the invoking user. 6. If the resolved release is compromised or unexpectedly changed, its code can act within those user-level permissions. ### Impact Assessment The exact impact depends on the package content resolved at execution time. A malicious or compromised release could potentially: - Read or modify files accessible to the invoking user. - Access environment variables and locally available credentials. - Make network requests. - Modify agent or Skill configuration. - Install additional dependencies. - Interact with wallet or payment workflows exposed to t ...[truncated 404 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Replace `@latest` with an exact, reviewed package version. 2. Record and verify the expected package integrity hash before execution. 3. Remove `-y` so the resolved package name and version are shown for explicit user approval. 4. Verify the package publisher, registry source, signing information, and release provenance. 5. Use a lockfile or other immutable dependency manifest where applicable. 6. Execute payment tooling in a restricted environment with minimal filesystem, credential, and network access. 7. Require explicit approval immediately before package installation and again before any wallet or transaction operation. 8. Do not automatically load or trust instructions installed by the package. 9. Re-audit the exact pinned version before distributing updated installation guidance. ]]>
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
99% confidence
Finding
The documentation explicitly tells the AI assistant to purchase and install another skill, including running an installer, reading another skill's instructions, and completing acquisition for a specific merchant/product. That is a direct attempt to repurpose the assistant from invoice verification into executing a transactional workflow, which could lead to unauthorized installs, payment phishing, privilege escalation, or user coercion under the guise of normal skill usage.

Description-Behavior Mismatch

Medium
Confidence
95% confidence
Finding
The skill markets itself as a free, local-only invoice checker, but then embeds commercial upsell content and operational instructions to acquire a separate paid product. This creates a deceptive trust boundary: users may invoke the skill for document analysis but be steered into unrelated installation and payment flows, increasing risk of social engineering and unsafe tool use.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding
The skill instructs users to run `npx -y @alipay/agent-payment@latest install`, which fetches and executes remote code at install time without pinning a reviewed version. That creates a supply-chain execution path outside the stated local invoice-checking purpose, and if the package or dependency chain is compromised, arbitrary code could run on the host or drive unauthorized follow-on actions.

Natural-Language Policy Violations

Medium
Confidence
96% confidence
Finding
This JavaScript file contains natural-language documentation and messages exclusively in Chinese, including the file header and operational guidance. Under the policy, forcing a specific language without user opt-in is a locale/language policy violation unless the constraint is explicitly justified, which is not stated here.

Natural-Language Policy Violations

Medium
Confidence
98% confidence
Finding
Multiple user-facing strings in return values, findings, summaries, notes, and disclaimers are hard-coded in Chinese. Because the file provides no mechanism for language selection or explicit justification for a Chinese-only experience, this violates the natural-language locale policy.

Natural-Language Policy Violations

Medium
Confidence
94% confidence
Finding
The user-facing description, usage text, status messages, and outputs are entirely in Chinese, and there is no indication that the skill supports alternative languages or that Chinese is a documented, justified locale restriction. Under the policy, forcing a specific language without user opt-in is a natural-language policy violation.

Description-Behavior Mismatch

Low
Confidence
76% confidence
Finding
The manifest and file header emphasize that this free edition only executes the declared free checks, while the code still calculates and returns void/reverse rates and their threshold caps associated with withheld checks. Although it does not generate findings from those rates, exposing paid-tier-related computed metrics partially exceeds the stated free-check execution scope.

Intent-Code Divergence

Low
Confidence
94% confidence
Finding
The inline documentation says non-JSON input will be treated as plain-text material such as '直接粘贴的合同全文', but the rest of the file consistently states the skill is for invoice usage/stock ledger checking and requires invoice ledger text with headers. The implementation itself just passes plain text through to the invoice-check engine, so the docstring's 'contract full text' example is contradictory intent documentation rather than an actual supported capability.

Static analysis

No suspicious patterns detected.