T09 · Insecure Skill Coding Practices
- Location
scripts/agnes-image.sh:110- Finding
Unrestricted Download from a Server-Controlled URL
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a coherent image-generation skill, but it sends user prompts and image URLs to a third-party API and then downloads an unvalidated API-supplied URL to a local file.
Install only if you are comfortable sending prompts and public image URLs to Agnes AI. Avoid confidential prompts or private/proprietary images, and prefer using it in a constrained environment because the script saves output from an API-supplied URL without validating the download target or file type.
scripts/agnes-image.sh:110Unrestricted Download from a Server-Controlled URL
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
fi
# Send request
RESPONSE=$(curl -sf --max-time 360 \
-H "Authorization: Bearer ${API_KEY}" \
-H "Content-Type: application/json" \
-d "$BODY" \
The trigger keywords include broad, everyday phrases such as '合并' and '创建图像' that can match routine user requests outside the intended image-generation context. This increases the chance of accidental skill activation, causing unintended external API use, unnecessary processing, or disclosure of prompts and image inputs to the remote service.
The skill documents sending prompts and public image URLs to an external image-generation API but does not clearly warn users that their content will be transmitted to a third-party service. In this context, accidental triggering is more dangerous because users may unknowingly expose sensitive prompts, proprietary images, or personal data during generation or editing workflows.
The curl request transmits constructed request data, including prompt content and image references, to an external endpoint using an API key. While this is core functionality, it is still a true external data exfiltration path from the local environment to a remote service, which is security-relevant if users may pass confidential data.
fi
# Send request
RESPONSE=$(curl -sf --max-time 360 \
-H "Authorization: Bearer ${API_KEY}" \
-H "Content-Type: application/json" \
-d "$BODY" \
The script sends the user-supplied prompt and any provided image URLs to a third-party API service without any explicit notice, consent check, or data-classification guardrail. In an agent-skill context, prompts and URLs may contain sensitive internal data, making unintended external disclosure a real privacy and compliance risk.
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 '{
This markdown file presents headings, instructions, and best practices in Chinese throughout, but does not indicate that the language is optional or limited to a specific regional audience. Under the policy rule for natural-language violations, forcing a specific language without user opt-in is reportable.
This markdown file is primarily presented for Chinese-speaking users, but nearly all example prompts are fixed in English and the document does not indicate that users may choose their preferred language. Because the policy scope includes language or locale constraints in natural-language content, this can be treated as a mild language-policy issue.
The entire guide is written in Chinese and does not indicate that other languages are supported or that the user may choose a preferred locale. Under the policy for natural-language violations, forcing a specific language without opt-in can be considered a locale-policy issue.