T01 · Skill Instruction Hijacking
- Location
SKILL.md:61- Finding
Agent Workflow Hijacking Through Priority and Mandatory-Output Instructions
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill performs invoice OCR as advertised, but it asks users to share an API key in chat and persistently writes it into shell configuration without clear consent or safe secret handling.
Review before installing. Use only with invoices you are allowed to send to skill.quandianfapiao.com, and avoid pasting long-lived API keys into chat or writing them into shell startup files. Prefer a platform secret manager or a per-run environment variable, and do not let the agent automatically modify ~/.bashrc, ~/.zshrc, or persistent user environment settings.
SKILL.md:61Agent Workflow Hijacking Through Priority and Mandatory-Output Instructions
SKILL.md:70Unsafe API-Key Interpolation and Plaintext Persistence in Shell Startup Configuration
The skill invokes environment-variable access and a remote OCR API, but it does not declare any explicit tool scope or allowed-tools boundary. This increases the chance an agent can use broader-than-necessary capabilities for file handling, shell access, or network exfiltration without clear user-visible constraints.
The skill directs users to upload invoice files to a third-party OCR service without clearly warning that invoices commonly contain sensitive personal, financial, tax, and business information that will leave the local device. Users may unknowingly transmit regulated or confidential data to an external processor.
The skill explicitly instructs the agent to request an API key from the user in chat and then store it in environment variables, creating a plain-text secret collection and persistence workflow. Chat channels and environment variables are often insufficiently protected for credential handling, creating risks of disclosure, reuse, or later compromise.
The skill tells the agent to persist a user-supplied API key into shell profiles or user environment variables, modifying system configuration and storing a secret locally without an explicit consent or warning. This can leave credentials exposed to other local processes, future sessions, shell history, or unintended users on the machine.
清单描述聚焦于上传发票文件并返回票面信息,而这里实现了一个可对固定远程域名任意路径发起 JSON POST 的通用客户端,不限于文件 OCR 上传。对于“发票识别”这一受限目的来说,这比描述中声明的能力更宽,属于描述与实际行为不完全一致。
对于一个发票 OCR 技能,上传文件到识别服务是合理实现细节;但额外暴露按任意路径发送 JSON 的通用网络能力,并非“上传发票文件识别”这一目的的直接最小需求。该能力可被复用于其他远程操作,缺乏从清单目的中得到的充分正当性。
post_file sends the full local file contents and an API key to an external service, which can include highly sensitive invoice data and credentials. In the context of an invoice OCR skill this transmission is expected, but the code provides no consent notice, destination verification beyond a fixed URL, redaction option, or controls to limit accidental exposure of confidential business information.
The skill uploads invoice files to a remote API endpoint, but the user-facing flow does not clearly warn that potentially sensitive financial documents will leave the local environment. Because invoices often contain company, tax, banking, and personal data, lack of explicit transmission notice can cause unintentional disclosure to a third party.
The setup text instructs the user to send their API key to the agent so the agent can configure and run the skill. Encouraging users to disclose long-lived credentials to an intermediary increases the risk of secret exposure, reuse outside intended scope, logging retention, or misuse if the agent environment is compromised.
The natural-language instructions, prompts, and user interaction text are all presented only in Chinese. This can amount to a language policy issue when a skill effectively forces a specific language without offering user opt-in or documenting that it is region-specific.
The module docstring is written only in Chinese and presents the skill as a Chinese-language invoice utility, with no indication that users can opt into another language or that the locale restriction is required. Under the policy, fixed language behavior without user opt-in or clear justification is a natural-language policy concern.
Natural-language strings throughout the file, including the module docstring, CLI description, help text, and error/setup guidance, are all fixed in Chinese. This can violate language/locale policy when no user opt-in or justified region-specific limitation is provided.
The manifest describes a skill for uploading invoice files and returning OCR-extracted invoice data. Reading credentials from process environment is an additional capability unrelated to invoice parsing itself and is not mentioned in the stated purpose.
No suspicious patterns detected.