T09 · Insecure Skill Coding Practices
- Location
agent.json:42- Finding
Shell Command Injection Through Unsafely Interpolated Tool Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does what it claims, but its tool handler can turn user-supplied input into shell command execution and it uploads arbitrary local files to an external API without strong consent controls.
Review before installing. Use only with non-sensitive media or documents you are authorized to send to Zhipu/GLM, and do not pass untrusted filenames, URLs, or prompts through the current tool handler until the shell exec template is replaced with argument-array execution or equivalent escaping and validation.
agent.json:42Shell Command Injection Through Unsafely Interpolated Tool Arguments
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def sync_response(headers, payload):
"""同步请求"""
response = requests.post(API_URL, headers=headers, json=payload, timeout=120)
if response.status_code != 200:
print(f"API错误: {response.status_code}")
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
def stream_response(headers, payload):
"""流式请求"""
response = requests.post(API_URL, headers=headers, json=payload, stream=True, timeout=120)
if response.status_code != 200:
print(f"API错误: {response.status_code}")
The README encourages users to submit local files, documents, images, and video URLs to a third-party multimodal model API, but it does not disclose that the content may be transmitted off-host to an external service. This creates a real privacy and data-handling risk because users may upload sensitive files under the mistaken assumption that processing is local or self-contained.
The skill documents use of an external API and an API key, which implies network access and environment variable usage, but it declares no explicit tool scope or permissions. This creates a transparency and governance gap: an agent or user may invoke capabilities that can exfiltrate data or access secrets without clear policy constraints.
The file presents key descriptive and usage content in Chinese, which can impose a language requirement on users without opt-in. Under the language/locale policy, this is a natural-language policy concern unless the skill explicitly offers language choice or explains a justified region-specific constraint.
The skill encourages users to submit URLs and local file paths for image, video, and PDF analysis through a third-party API, but it does not warn that file contents, linked resources, or sensitive document data may be transmitted off-platform. In this context, that omission is dangerous because multimodal inputs often contain confidential information, and local-path support increases the risk of accidental external disclosure.
This manifest file says the skill analyzes images, videos, and documents and instructs the agent to call the analyze tool 'when the user provides media files,' but it does not define specific invocation boundaries, exclusions, or negative examples. That ambiguity can cause unintended activation for common file-sharing contexts where the user may not actually want analysis.
The natural-language description and system prompt are written entirely in Chinese and instruct the assistant's behavior in that locale, with no indication that users can choose another language. This can violate language/locale policy when a skill imposes a specific language without opt-in or documented regional justification.
The tool explicitly accepts both file paths and URLs as input, but the manifest does not disclose that user-supplied local or remote content may be fetched and sent for analysis. This can lead to unintentional transmission of sensitive local files or remote resources, increasing privacy and data-handling risk in a multimodal analysis context.
The script accepts arbitrary local file paths, base64-encodes the entire file, and sends the contents to an external API. In a skill context, this creates a real data exfiltration risk because users may analyze sensitive local documents or images without adequate guardrails, path restrictions, or consent messaging.
This outbound request transmits user prompts and potentially embedded local file data to an external service. External transmission is core to the skill's function, but it is still security-relevant because sensitive local content may leave the host environment and be processed by a third party.
def sync_response(headers, payload):
"""同步请求"""
response = requests.post(API_URL, headers=headers, json=payload, timeout=120)
if response.status_code != 200:
print(f"API错误: {response.status_code}")
The tool sends prompts and optionally full local file contents to an external multimodal API, but the UX does not provide a clear, unavoidable warning about third-party disclosure at execution time. This is dangerous because users may unintentionally upload confidential data, and the skill context increases risk since its purpose encourages analyzing local media and documents.
The streaming request has the same disclosure and exfiltration characteristics as the synchronous request: prompts and possibly local file contents are sent to an external provider. The skill context makes this meaningful because local multimedia/document analysis is encouraged, increasing the chance that confidential data is uploaded.
def stream_response(headers, payload):
"""流式请求"""
response = requests.post(API_URL, headers=headers, json=payload, stream=True, timeout=120)
if response.status_code != 200:
print(f"API错误: {response.status_code}")
The natural-language instructions and all example prompts are presented only in Chinese, which can amount to a language policy constraint if users are not given a choice. There is no indication that the skill supports multiple languages or that Chinese is a justified region-specific requirement.
The natural-language description is written entirely in Chinese and presents the skill purpose in a single fixed language, with no indication that users may choose another language or that the skill is intentionally limited to a Chinese-only audience. Under the stated policy, forcing a specific language without opt-in is a locale-policy concern.
Natural-language strings throughout the script, including usage examples, help text, and status/error messages, are exclusively in Chinese. This imposes a fixed language choice on users without offering an alternative or documenting that the tool is intentionally region- or language-specific.
No suspicious patterns detected.