T09 · Insecure Skill Coding Practices
- Location
SKILL.md:148- Finding
Unrestricted URL Retrieval Enables SSRF and Data Exfiltration
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill does the BatchJob work it advertises, but it can automatically upload local files or URL-fetched content to a configured external service with too little user confirmation or destination validation.
Install only if you trust the BatchJob endpoint and token configuration and are comfortable with the agent automatically uploading selected or context-resolved files. Prefer using explicit file_id values or clearly chosen workspace files, avoid sensitive local paths, and require operator review before using this skill with private datasets, internal URLs, or broadly privileged agent runtimes.
SKILL.md:148Unrestricted URL Retrieval Enables SSRF and Data Exfiltration
SKILL.md:185Automatic Upload of Arbitrary Readable Local Files Violates Least Privilege
SKILL.md:190Unvalidated BatchJob Base URL Can Expose Bearer Tokens and Uploaded Data
Skill contains instructions that could directly expose system prompts, internal rules, or hidden instructions to users or external parties.
- OpenAI Batch style lines containing `method` + `url` + `body` (for example `/v1/chat/completions` payload).
- This schema will fail with Vertex error: `at least one contents field is required`.
## Dataset Output Rule (Important)
When user asks you to generate a template/demo file for BatchJob image tasks:
The skill explicitly directs the agent to resolve files from message/context, download them if needed, upload their contents, and proceed to precheck/submit in full-auto mode without requiring an explicit user confirmation at the point of data transmission. This creates a real risk of unintentionally sending sensitive local files, attachments, or URL-fetched content to an external BatchJob service without sufficiently informed consent.
The instruction to always run in full-auto mode and avoid asking the user first is a genuine unsafe-autonomy issue in a skill that can fetch files, upload them externally, and submit jobs. By reducing user checkpoints, it increases the chance of unintended external actions, privacy violations, and misuse of attached or local files.
## Automation Policy (Default)
- Always run in full-auto mode.
- Do not ask user for `file_id` first.
- Resolve file source from current message/context, then upload automatically when needed.
- Ask follow-up questions only when no readable file source can be obtained.
- Accepted input file formats for upload: `jsonl`, `csv`, `xlsx`, `xls` (BatchJob normalizes to internal JSONL).
The skill includes a fixed Chinese fallback prompt for user interaction, which imposes a specific language on users. There is no indication that the skill is region-specific or that the user can opt into Chinese versus another language.
This code base64-encodes a local file and sends its full contents to an external endpoint using a bearer token. In the broader skill context, this transmission is dangerous because the skill is designed to automatically resolve local paths, attachments, and public URLs, so sensitive data could be exfiltrated to a third-party service with minimal user interaction.
test -f "${FILE_PATH}" || { echo "文件 ${FILE_PATH} 不存在"; exit 1; }
FILE_CONTENT_B64="$(base64 < "${FILE_PATH}" | tr -d '\n')"
curl -sS "${BATCHJOB_BASE_URL}/v1/batch/files:upload" \
-H "Authorization: Bearer ${BATCHJOB_BEARER_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"filename\":\"${FILE_NAME}\",\"mode\":\"fast\",\"content\":\"${FILE_CONTENT_B64}\"}"
The short description is written only in Chinese, which indicates a language-specific presentation without any visible opt-in, alternative locale, or justification in this file. The policy requires flagging language or locale constraints when the skill appears to force a specific language without user choice.
Detected: suspicious.generated_source_template_injection