Back to skill

Security audit

Invoice Verification Service

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its invoice-verification purpose, but it handles sensitive invoice data, API credentials, and recharge orders with weak disclosure and unsafe defaults.

Install only if you trust the configured backend and understand that invoice text, invoice images, extracted invoice fields, API keys, and account/order data may be sent to it. Prefer HTTPS-only trusted endpoints, avoid implicit or ambiguous use, review batch folders before upload, and do not create recharge orders unless you explicitly intend to accept terms and generate a payment order.

Vulnerability Patterns
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/invoice_service.js:84
Finding

Sensitive invoice data and bearer credentials are transmitted over configurable plaintext HTTP endpoints

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/invoice_service.js:44
Finding

Application and cipher keys are persisted and disclosed without adequate secret protection

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/invoice_service.js:984
Finding

Recharge order terms are accepted implicitly instead of requiring explicit user consent

Content
View full analysis
"); const agreeTerms = options["agree-terms"] === undefined ? true : parseBooleanOption(options["agree-terms"], true); const response = await callApi( bound.apiBaseUrl, "POST", "/api/v4/plugin/orders", { amount, agreeTerms }, bound.appKey, crypto.randomUUID() ); ``` The documented command also omits an explicit consent flag: ```bash node "{baseDir}/scripts/invoice_service.js" create-order --amount 10 ``` ### Technical Analysis Creating a recharge order is a transaction-related action. The backend receives `agreeTerms: true`, representing acceptance of terms, even when the user did not provide that value. This is unsafe consent handling because absence of consent is converted into affirmative consent. Although the reviewed flow appears to create an order rather than complete payment automatically, it can create backend records and payment artifacts under a representation that the user accepted applicable terms. The behavior is not required for the declared functionality. The script can create the same order after obtaining explicit confirmation from the user. ### Attack Path 1. A user asks to create a recharge order or an implicitly invoked Agent selects the documented `create-order --amount` command. 2. The caller omits `--agree-terms` because the documentation does not require it. 3. The script converts the missing value to `true`. 4. The backend receives an order request stating that terms were accepted. 5. An order and associated payment pag ...[truncated 820 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (11)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The README documents verification of invoice text and images via backend API calls but does not clearly warn that invoice contents are transmitted off-host to a remote service. Invoice data commonly contains sensitive financial and personal information, so lack of disclosure can cause unintentional exfiltration to a backend the user may not fully trust or control.

Content

No source excerpt is available for this finding.

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · README.md (reported line 14)May include surrounding context.

md
- Verify invoice text with `POST /api/v4/plugin/verify`
- Verify invoice images with `POST /api/v4/plugin/verify`
- Verify all invoice images in a local directory and save JSON result files next to the source directory
- Create recharge orders with `POST /api/v4/plugin/orders`
- Query recharge order status with `GET /api/v4/plugin/orders/{orderNo}`

## Runtime Requirements

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
95% confidence
Finding

The skill invokes a local Node.js script that can use network and environment capabilities, but the manifest does not declare any tool scope or permission boundaries. This weakens reviewability and user consent because the skill can transmit data or access sensitive configuration without explicit disclosure in its declared interface.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The skill instructs users to verify invoice text and local invoice images against a remote service but provides no warning that invoice contents, financial data, and image files will be transmitted off-host. Because invoices commonly contain sensitive personal and business information, this omission can lead to unintended disclosure of confidential data to an external endpoint.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill advertises a very broad set of actions and also enables implicit invocation, but it does not define narrow trigger conditions or user-consent boundaries for when those actions should be activated. That creates a real risk of the agent auto-invoking a capability that can query accounts, process local directories, or create recharge orders based on ambiguous user intent, leading to unintended data exposure or unwanted account actions.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The code allows the API base URL to be overridden from config, command-line options, or environment variables, and then sends bearer app keys, device identifiers, invoice content, and images to that endpoint. This can redirect sensitive data and credentials to an attacker-controlled service or enable SSRF-like access to internal/local services, especially because the default transport is plain HTTP rather than HTTPS.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Invoice images and extracted fields such as invoice code, number, date, amount, and check code are assembled and transmitted to a remote verification API, but the code provides no disclosure, consent prompt, or minimization control. Because invoices often contain sensitive financial and business information, silent transmission creates privacy and compliance risk, and becomes more severe if the API base URL is overridden to an untrusted destination.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The script goes beyond invoice verification and includes account/quota inspection, ledger access, and commerce operations such as creating and querying recharge orders. In a skill advertised for invoice verification, this broadens the accessible attack surface and enables unintended financial or account actions if the skill is invoked with untrusted prompts or by a user who does not expect payment-related capabilities.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

Batch verification persists per-file results and summaries to disk in the source directory, including verification responses, extracted invoice fields, file paths, and error details, without warning the user. This can leave sensitive financial data and potentially credential-adjacent metadata in predictable local files that may be accessible to other users, backup systems, or later processes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
88% confidence
Finding

The README states that directory verification writes JSON files next to the source directory, but it does not clearly warn users that running the command modifies the local filesystem. In a skill context, undocumented write behavior can surprise users, lead to accidental data placement in sensitive directories, and increase operational risk if the command is run on shared or monitored folders.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The README's verification example uses Chinese invoice fields and the overall workflow appears tailored to a specific locale, but the document does not explicitly state that the skill is China-specific or give users a language/locale choice. Under the policy, forcing a specific language or locale without opt-in can be a natural-language policy issue.

Content

No source excerpt is available for this finding.