T09 · Insecure Skill Coding Practices
- Location
script/ocr.sh:7- Finding
Arbitrary Shell Execution Through Sourced Configuration File
- Content
View full analysis
- Remediation
View remediation
&2 exit 1 fi ``` ]]>
Security audit
Security checks for vulnerabilities and agentic risk
This OCR skill appears purpose-built, but it needs Review because it uploads image contents and an API key to a configurable remote endpoint and executes a local env file as shell code.
Install only if you are comfortable sending selected images to the configured remote OCR API. Avoid using it on IDs, invoices, secrets, private screenshots, or regulated data unless you have approved that provider. Check DEEPSEEK_OCR_API_URL before use, keep the API key narrowly scoped, and treat ~/.openclaw-env as executable shell code rather than a passive config file.
script/ocr.sh:7Arbitrary Shell Execution Through Sourced Configuration File
script/ocr.sh:54API Credential and Image Exfiltration Through Unrestricted Endpoint Override
The skill documents execution of a shell script and requires command-line binaries, but it does not declare any explicit tool scope such as allowed tools or permissions. That makes the runtime capabilities broader and less auditable, increasing the chance that an agent can invoke shell access unexpectedly or with more privilege than intended.
The skill description presents OCR functionality without clearly warning that supplied images are transmitted to a third-party remote API for processing. Users may provide screenshots, IDs, invoices, or other sensitive images under the assumption of local processing, creating a privacy and data-handling risk through uninformed disclosure.
The skill sends image data to an external endpoint, which is a real data egress pathway because OCR requires uploading base64-encoded image contents to a remote service. In this skill's context, external transmission is expected functionality, but it still poses confidentiality and compliance risks if sensitive images are processed or if the endpoint is overridden to an untrusted URL.
}
Default API URL: `https://api.modelverse.cn/v1/chat/completions`
Override with `DEEPSEEK_OCR_API_URL` if needed.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
IMAGE_BASE64=$(base64 -w 0 "$IMAGE_PATH" 2>/dev/null || base64 "$IMAGE_PATH" | tr -d '\n')
# API 地址
API_URL="${DEEPSEEK_OCR_API_URL:-https://api.modelverse.cn/v1/chat/completions}"
# 构建提示词
PROMPT="convert to $FORMAT"
The script uploads the full image contents to a remote OCR endpoint, but provides no explicit warning, consent step, or data-handling notice to the user. Because OCR inputs often contain sensitive screenshots, IDs, documents, or secrets, silent transmission to a third-party service creates a real privacy and data-exposure risk in this skill context.
The script performs external transmission of user-supplied image data and an authorization token to a remote API via curl. In an OCR skill, this behavior is expected functionally, but it remains security-relevant because sensitive image contents leave the local environment and are processed by a third party, especially without validation of endpoint trust beyond a configurable URL.
PROMPT="convert to $FORMAT"
# 发送请求
RESPONSE=$(curl -s "$API_URL" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $DEEPSEEK_OCR_API_KEY" \
-d @- <<EOF
The script's comments, usage guidance, and error messages are presented in Chinese only, which imposes a specific language on users. There is no opt-in, alternate locale, or documented justification that this skill is intended solely for a Chinese-speaking or region-specific environment.
No suspicious patterns detected.