T09 · Insecure Skill Coding Practices
- Location
scripts/agnes-video.sh:89- Finding
Python Code Injection Through Untrusted Prompt and Image Arguments
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent Agnes video-generation integration, but its shell scripts contain serious unsafe coding and under-disclosed side effects that warrant Review before installation.
Install only if you are comfortable sending prompts, image URLs, and an Agnes API key to the Agnes API. Review or fix the shell scripts first, especially the heredoc injection risk, the broken extra fi in agnes-video.sh, the unvalidated video download path, and the test script that creates a real task instead of doing a read-only connection check.
scripts/agnes-video.sh:89Python Code Injection Through Untrusted Prompt and Image Arguments
scripts/agnes-video.sh:152Unvalidated API-Controlled URL Is Downloaded to a User-Selected Path
scripts/test-connection.sh:20Connection Test Creates a Potentially Billable Video Generation Task
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
sleep $POLL_INTERVAL
ELAPSED=$((ELAPSED + POLL_INTERVAL))
RESPONSE=$(curl -sf --max-time 30 \
-H "Authorization: Bearer ${API_KEY}" \
"${API_RESULT}?video_id=${VIDEO_ID}")
The script downloads a file from a URL taken directly from the remote API response and writes it to a local path without validating the URL's scheme, host, or content type. If the API is compromised or returns an unexpected URL, the script could be used to fetch arbitrary remote content, enabling SSRF-like retrieval behavior or saving malicious files locally under a trusted filename.
echo " URL: $VIDEO_URL"
if [ "$OUTPUT_FILE" != "video_output.mp4" ]; then
curl -sf -o "$OUTPUT_FILE" "$VIDEO_URL"
echo " Saved to: $OUTPUT_FILE"
fi
exit 0
The natural-language content is presented entirely in Chinese, while examples also mix in English prompt text, but the skill does not state that Chinese is required nor offer a language choice. Under the language/locale policy, a skill should not implicitly force a specific language unless the constraint is documented and justified or the user is given an opt-in choice.
The trigger list includes very broad terms such as “动画”, “动态”, and “motion”, which are common in many unrelated user requests. This can cause unintended activation of the skill, leading the agent to invoke external video-generation behavior when the user did not clearly request it, increasing the chance of misrouting, unnecessary API usage, or accidental transmission of prompts and image URLs to a third-party service.
This markdown file presents nearly all operational instructions, parameter descriptions, and workflow guidance exclusively in Chinese. Under the policy rule for natural-language violations, this can constitute a locale/language constraint because users are not offered an alternative language or any explicit opt-in/justification for the restriction.
The script sends the prompt and possibly image URLs to a remote Agnes API endpoint via curl, which is a network transmission of user-provided data. Although it prints the prompt and workflow details, it does not clearly disclose that these inputs are being sent to an external service or warn about the privacy implications.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
# Test with a simple request
echo "📡 Sending test request..."
RESPONSE=$(curl -sf --max-time 30 \
-H "Authorization: Bearer ${API_KEY}" \
-H "Content-Type: application/json" \
-d '{
The document title and section headings are written in Chinese throughout, while the file provides no indication that the skill is region-specific or that users can choose another language. This can violate a language/locale policy when a skill implicitly mandates one language without opt-in or justification.
This markdown file contains user-facing instructional content exclusively in Chinese, including the title and all guidance text. Under the policy rule for language or locale constraints, forcing a specific language without user opt-in can be a natural-language policy violation unless the restriction is clearly justified.
The inline documentation states a single required environment variable, ANGES_API_KEY, while the implementation actually reads either ANGES_API_KEY or AGENT_ANGES_API_KEY. This is a direct documentation-to-code mismatch about how authentication is supplied.
The script accesses ANGES_API_KEY or AGENT_ANGES_API_KEY from the environment, which falls under sensitive credential access for code-file warning checks. It reports when the variable is missing, but does not explicitly disclose that it will read and use these credentials to authenticate external API requests.
This code writes remote content to a user-specified local output path using curl, which is a file-write operation covered by the warning requirement for code files. While the script logs that the file was saved after completion, there is no prior disclosure, confirmation, or explanatory comment near the write operation itself.
No suspicious patterns detected.