T09 · Insecure Skill Coding Practices
- Location
scripts/invoice_service.js:203- Finding
Unrestricted API Endpoint Allows Invoice Data and API Credential Disclosure
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is mostly coherent for invoice verification, but it can send sensitive invoice data and stored credentials to an unvalidated custom API endpoint and can create recharge orders without executable-level consent enforcement.
Review this skill before installing. It is intended for Chinese invoice verification and will send invoice text/images to an external service and store credentials locally. Do not use it with highly sensitive invoices unless you trust the publisher and service, avoid custom API endpoints, and require explicit confirmation before creating recharge orders or batch-verifying directories.
scripts/invoice_service.js:203Unrestricted API Endpoint Allows Invoice Data and API Credential Disclosure
scripts/invoice_service.js:175API and Cryptographic Material Stored and Displayed Without Adequate Protection
scripts/invoice_service.js:1510Recharge Order Creation Does Not Enforce Explicit User Consent
The verify-image action posts base64-encoded invoice image content to the remote verification API, but the code does not display any warning, confirmation, or explanatory comment that image data will leave the local system. Since invoice images can contain sensitive financial information, users should be clearly informed before upload.
The README presents all instructions, trigger phrases, and usage guidance only in Chinese. Under the policy rule, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale restriction is explicitly justified, which is not stated here.
The skill discloses network access to a remote invoice-verification service and writes local configuration/identity files, but it does not declare an explicit tool scope such as permissions or allowed-tools. This creates a permission-transparency gap: users and the host agent may not have clear policy boundaries around network and local-environment interactions, increasing the chance of unintended data exfiltration or overbroad execution.
The initialization phrase '帮我初始化' is broad and resembles normal conversational language, so it may be triggered unintentionally in routine chat. In this skill, initialization causes persistent local writes and automatic API key generation, making accidental activation more sensitive than a harmless setup step.
The skill enables implicit invocation without any visible trigger constraints, so the agent may invoke invoice-related actions in response to loosely related user requests. In this skill, that increases the chance of unintentional disclosure of invoice data to the external service and accidental progression toward state-changing actions such as configuration initialization or order workflows.
Multiple user-visible strings, labels, and descriptions are hardcoded in Chinese, including invoice type descriptions and field guidance, with no indication that the tool is region-specific or that users can choose another language. This can violate a language/locale policy when a skill imposes a specific language without opt-in or justification.
The skill persistently stores the app key and stable device identifiers in plaintext JSON files under the user's home directory. If another local process, user, backup system, or malware can read those files, it can recover authentication material and tracking identifiers, enabling unauthorized API use and long-lived correlation of the device across sessions.
The verify action sends user-provided invoice text to a remote endpoint via callApi, and the code does not provide a confirmation prompt, warning message, or comment/docstring disclosing that potentially sensitive invoice data is being transmitted off-host. Because invoice contents can include financial and personal data, this network transmission should be explicitly disclosed to users.
The default prompt requires the agent to reply with fixed Chinese phrases such as '帮我安装这个技能' and '帮我初始化' without offering the user a language choice. This is a natural-language locale policy concern because it imposes a specific language rather than allowing opt-in or documenting a justified locale restriction.
No suspicious patterns detected.