T09 · Insecure Skill Coding Practices
- Location
scripts/flower_care.py:44- Finding
Cross-provider disclosure of an OpenAI API credential to DashScope
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This plant-care skill mostly does what it advertises, but it has real review-worthy risks around credentials, local file upload, and unsafe generated HTML reports.
Review this skill before installing. Use only a dedicated DashScope API key, avoid environments where OPENAI_API_KEY is present, and only pass trusted plant image files. Be aware that images are sent to DashScope and embedded into a persistent HTML report; do not open generated reports from untrusted inputs until the HTML escaping issue is fixed.
scripts/flower_care.py:44Cross-provider disclosure of an OpenAI API credential to DashScope
scripts/flower_care.py:72Arbitrary local file disclosure through the image upload argument
scripts/flower_care.py:258Stored script injection in generated HTML reports through unescaped model output
The script reads credentials from environment variables and local config files, but that capability is not declared in the skill permissions. Undeclared secret access reduces transparency and can surprise users or hosts, especially in an agent ecosystem where least-privilege and explicit consent matter.
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
- pest_control: 病虫害风险程度
如果图片中没有植物,has_plant设为false,其他字段留空字符串或默认值。"""
return prompt
def call_dashscope(api_key, image_data_url, model="qwen-vl-max"):
The trigger list includes broad everyday phrases such as '怎么养', '帮我看看这盆花', and generic plant-identification wording, which can cause the skill to activate in contexts the user did not intend. Because the skill can read files, write reports, run Bash, and send user-supplied images to an external API, unintended activation increases privacy and action-execution risk.
The skill instructions, prompts, examples, and output schema are primarily written to operate in Chinese, and the embedded API prompt requires Chinese response fields such as "健康/一般/较差" without stating this is optional. While some English trigger terms are listed, the file does not offer users a language preference or explain that the skill is intentionally limited to a Chinese-language context.
The user-facing overview says photos can be uploaded for identification but does not clearly disclose that the image and prompt content are transmitted to the external DashScope API. This creates a privacy and consent issue because users may share personal or sensitive images without realizing third-party processing occurs.
The activation scenarios are described broadly and do not state when the skill must not run, making routing ambiguous. In an agent environment, this can lead to the skill being selected for loosely related messages and then performing filesystem access, shell execution, or external data transfer without clear user intent.
The document declares lang="zh-CN", and the template's visible headings, labels, and status text are written in Chinese throughout. This imposes a specific language/locale on users without any indication of user selection, opt-in, or documented region-specific justification.
The knowledge base recommends specific pesticides and fungicides such as 多菌灵、代森锰锌、吡虫啉、阿维菌素, but it does not include a general warning about toxicity, PPE, ventilation, label-following, dosage limits, or keeping chemicals away from children and pets. In a consumer-facing plant-care skill, users may directly act on these recommendations, so omission of baseline chemical-safety guidance can contribute to unsafe handling or exposure.
The skill is presented as a DashScope-based flower-care tool, yet it also reads OPENAI_API_KEY as a fallback credential. Accessing unrelated credentials broadens secret exposure and could unintentionally route trust to a different provider namespace, which is unnecessary for the described functionality.
The prompt requires the model to respond entirely in Chinese, including field values and care guidance, and the rest of the script also presents user-facing output in Chinese. This enforces a specific language/locale without any user opt-in or documented region-specific justification, which matches the natural-language policy violation criteria.
The script base64-encodes the supplied image and sends it to a remote third-party API without an explicit user-facing disclosure at the point of use. Photos can contain sensitive visual content or metadata-derived context, so undisclosed external transmission creates a privacy and compliance risk.
A language or locale policy issue can arise when a skill forces a specific language without user opt-in. This file presents all instructions in Chinese only, with no note that the content is region-specific or that alternative language support is unavailable.
Detected: suspicious.exposed_secret_literal