T09 · Insecure Skill Coding Practices
- Location
scripts/recognize_invoices.py:59- Finding
Aliyun Access Key Secret Is Echoed and Persisted in Plaintext
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill performs the invoice OCR workflow it claims, but it handles sensitive invoices and cloud credentials with weak disclosure and insecure credential practices.
Review before installing. Use this only if you are comfortable sending invoice contents to Alibaba Cloud OCR. Do not paste cloud secrets into chat; prefer a dedicated low-privilege RAM credential configured outside the conversation, rotate/delete stored keys, monitor billing and logs, and treat generated spreadsheets from untrusted invoices cautiously.
scripts/recognize_invoices.py:59Aliyun Access Key Secret Is Echoed and Persisted in Plaintext
SKILL.md:113Documentation Recommends Excessive Aliyun OCR Permissions
scripts/recognize_invoices.py:285Untrusted OCR Results Are Written to XLSX Without Formula Neutralization
The documentation states that invoice files are sent to Alibaba Cloud OCR, but it does not clearly warn users that potentially sensitive financial documents will leave the local environment and be processed by a third party. Invoices commonly contain personal, tax, banking, and business data, so lack of disclosure undermines informed consent and can create privacy/compliance issues.
The skill directly instructs the agent to solicit cloud credentials from the user in plain conversation, which is a dangerous secret-collection pattern. In the context of an OCR skill that also performs network operations, this is more dangerous because the same workflow both acquires privileged credentials and sends sensitive documents to an external provider, increasing the blast radius if mishandled or logged.
The skill advertises capabilities that imply local file access, file writing, and network exfiltration to a third-party OCR service, but it does not declare an explicit tool/permission scope. That omission weakens transparency and reviewability, making it easier for an agent or user to invoke data-accessing behavior without clear guardrails.
The documentation states that invoice files are sent to Alibaba Cloud OCR, but it does not clearly warn users that potentially sensitive financial documents will leave the local environment and be processed by a third party. Invoices commonly contain personal, tax, banking, and business data, so lack of disclosure undermines informed consent and can create privacy/compliance issues.
The document instructs users to upload raw invoice files and use long-lived AccessKey credentials, but it does not warn that invoices commonly contain sensitive financial and personally identifiable information, nor does it provide basic credential-handling or data-protection guidance. In the context of an OCR skill that explicitly asks users for AccessKey ID/Secret and processes invoice images in bulk, this omission can lead to unsafe credential sharing, over-privileged keys, and inadvertent transmission or retention of sensitive documents.
The code stores AccessKey credentials in plaintext in a local config.json file with no permission hardening, encryption, or warning to the user. If the host is multi-user, backed up insecurely, committed to source control, or otherwise exposed, the cloud credentials can be stolen and abused.
The script uploads raw invoice files to Aliyun OCR over the network without a clear runtime warning or explicit consent step. Invoices commonly contain sensitive personal, financial, and tax data, so silent third-party transfer can create privacy, compliance, and data-handling risk even if the remote service is legitimate.
整个技能描述、使用说明和交互示例均以中文固定呈现,且未说明是否支持其他语言或允许用户选择语言。按规则,若技能强制特定语言而没有用户选择或明确的地域/合规理由,可视为自然语言策略问题。
All user-facing docstrings, prompts, usage text, and status messages are fixed in Chinese. Under the stated policy, forcing a specific language without offering user choice or clearly documenting a justified locale constraint is a natural-language policy violation.
The --list-config mode discloses whether credentials are present and prints the full AccessKey ID, which is unnecessary for OCR processing and can aid local reconnaissance or shoulder-surfing. While it masks the secret, exposing credential metadata still increases the attack surface on a shared workstation or recorded terminal session.
No suspicious patterns detected.