T09 · Insecure Skill Coding Practices
- Location
main.py:42- Finding
Prompt Injection Through Chained LLM Prompts
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it says: it sends brand and category inputs to DeepSeek for GEO analysis and returns a report, with no persistence or local privilege behavior found.
Before installing, confirm you are comfortable sending brand names, category keywords, and generated analysis text to DeepSeek and incurring API costs. Use non-sensitive inputs, consider pinning dependencies in a lock file, and treat the generated GEO conclusions as advisory because prompt injection can affect LLM-based judgments.
main.py:42Prompt Injection Through Chained LLM Prompts
requirements.txt:1Unbounded Third-Party Dependency Versions
The natural-language instructions and usage guidance are presented in Chinese throughout the skill file, while the file does not state that the skill is China-specific or that users may choose another language. This can amount to forcing a specific language without user opt-in, which matches the policy category for language or locale violations.
The trigger phrases are broad enough to match ordinary user questions about brand visibility or recommendation behavior, which can cause the skill to activate when the user did not explicitly consent to sending brand/category data to an external API. In this skill, unintended activation is more concerning because execution causes outbound transmission to DeepSeek and incurs token costs, creating privacy and cost risks rather than direct code-execution risk.
The skill transmits user-supplied inputs and model-generated content to a third-party external API endpoint (DeepSeek). This creates a real data exposure boundary: sensitive brand names, category terms, and generated analysis text leave the local trust boundary, and if operators assume local-only processing, confidential data could be disclosed to an external service.
# 初始化 OpenAI 客户端,Base URL 指向 DeepSeek API
client = OpenAI(
api_key=api_key,
base_url="https://api.deepseek.com/v1"
)
try:
This code contains a natural-language instruction requiring the model to generate the report in Chinese ("使用中文"). Under the policy, forcing a specific language without user opt-in is a locale/language policy violation, and there is no alternative language option or justification shown in the file.
The manifest description is entirely in Chinese and presents the skill's behavior and user interaction in that language, with no indication that users can choose another language or that the skill is intentionally limited to a Chinese-speaking or region-specific context. This creates a natural-language locale policy concern because it implicitly fixes the interaction language without opt-in or justification.
The dependency is specified with a lower bound only, which allows future incompatible or vulnerable releases to be installed and makes builds non-reproducible. In a security-sensitive agent skill, this weakens supply-chain control and can unexpectedly introduce vulnerable package versions.
openai>=1.0.0
pydantic>=2.0.0
python-dotenv>=1.0.0
Using pydantic>=2.0.0 leaves resolution open to any later release, including versions affected by known advisories or future regressions. Because pydantic commonly processes untrusted input, an unsafe resolved version could expose the skill to denial-of-service or parsing-related issues.
openai>=1.0.0
pydantic>=2.0.0
python-dotenv>=1.0.0
The manifest does not pin pydantic, and the package has known advisories, so the actual installed version may be vulnerable without any visibility from this file alone. Given pydantic's role in parsing and validating input, an affected version could enable denial-of-service or other parser-related abuse when handling attacker-controlled data.
The unpinned python-dotenv dependency permits installation of arbitrary later versions, making it impossible to guarantee that known-vulnerable releases are excluded. Since dotenv tooling may read or modify local configuration files, version drift can increase the risk of file-handling vulnerabilities affecting the runtime environment.
openai>=1.0.0
pydantic>=2.0.0
python-dotenv>=1.0.0
python-dotenv has known advisories, and because the requirement is unpinned, there is no assurance that installations will avoid affected releases. If the skill uses dotenv file-writing or file-resolution features, a vulnerable version could contribute to local file overwrite or unsafe file access scenarios.
No suspicious patterns detected.