T09 · Insecure Skill Coding Practices
- Location
scripts/invoice_service.js:185- Finding
Bearer Credential Stored Without Restrictive File Permissions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill appears to do the invoice-checking work it advertises, but it handles sensitive invoice data and credentials with under-scoped controls that users should review before installing.
Install only if you are comfortable sending invoice text, images, and optional sidecar .txt contents to the documented remote service. Review the configured API base URL before use, avoid custom endpoints unless you trust them, protect or delete ~/.openclaw/invoice-skill when no longer needed, and require explicit confirmation before batch uploads or recharge orders.
scripts/invoice_service.js:185Bearer Credential Stored Without Restrictive File Permissions
scripts/invoice_service.js:202Arbitrary API Endpoint Can Receive Bearer Credentials and Sensitive Invoice Data
scripts/invoice_service.js:1528Recharge Order Terms Are Accepted by Default Without Executable Consent Enforcement
All example invocations and operational instructions are written as mandatory Chinese phrases such as “帮我初始化” and “帮我核验…”, with no indication that other languages are supported or that Chinese is a required locale. This creates a natural-language locale constraint without user opt-in, which matches the language-policy violation criteria.
The skill explicitly discloses network use to a third-party endpoint and local writes to ~/.openclaw/invoice-skill/, but it does not declare any tool scope such as allowed-tools or permissions. That mismatch weakens platform-level consent and containment, because a user or runner cannot reliably see or enforce that the skill needs network and local file/config access before execution.
The skill enables implicit invocation without a tightly scoped activation description, which increases the chance the agent will auto-select this skill for loosely related invoice, billing, image, or order-management requests. In this skill's context, that matters because invocation can trigger external data transmission and local configuration writes, so an overly broad auto-activation path raises the risk of unintended sensitive data exposure or unintended commercial actions.
The code sends invoice text and image content to an external service via /api/v4/plugin/verify, including potentially sensitive billing data and uploaded invoice images. Although the skill description mentions external service disclosure, the runtime code provides no explicit consent prompt, warning, destination confirmation, or redaction controls before transmitting financial documents off-host.
Batch verification persists per-file results and summaries to disk, potentially including invoice metadata, verification outcomes, paths, and API response content in predictable locations under the source directory. This creates a local data exposure risk because sensitive financial information may remain on disk longer than expected and be accessible to other local users, backup systems, or later processes.
The usage section presents all activation and operation phrases exclusively in Chinese, such as “帮我初始化” and “帮我核验这张发票图片,” with no indication that users may interact in other languages. The policy for this audit flags language or locale constraints when they are imposed without user opt-in or explicit justification.
The file hardcodes Chinese invoice type descriptions, Chinese field labels, and China-specific invoice parsing logic, making the skill operate around a specific language/locale. There is no natural-language notice in the file that this is a China-specific skill or that users are opting into a Chinese locale constraint.
No suspicious patterns detected.