T09 · Insecure Skill Coding Practices
- Location
scripts/seedream-generate.sh:4- Finding
Executable Credential Configuration Enables Shell Command Execution
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it claims, but it handles credentials and output files in ways users should review before installing.
Install only if you are comfortable sending prompts to BytePlus Ark and using this script with a local API key. Avoid putting sensitive text in prompts, prefer passing SEEDREAM_API_KEY through the environment instead of relying on /root/.clawdbot/.env, and do not let untrusted input control the output filename.
scripts/seedream-generate.sh:4Executable Credential Configuration Enables Shell Command Execution
scripts/seedream-generate.sh:14Caller-Controlled Output Path Allows Arbitrary File Overwrite
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
#!/usr/bin/env bash
set -euo pipefail
if [[ -f /root/.clawdbot/.env ]]; then
# shellcheck disable=SC1091
source /root/.clawdbot/.env
fi
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
#!/usr/bin/env bash
set -euo pipefail
if [[ -f /root/.clawdbot/.env ]]; then
# shellcheck disable=SC1091
source /root/.clawdbot/.env
fi
The skill invokes a shell script but does not declare any tool scope or allowed-tools boundary. That omission weakens execution controls and reviewability, increasing the chance the agent can run shell-based actions without explicit authorization or least-privilege constraints.
The trigger conditions are broad enough to fire on generic mentions of Seedream or BytePlus Ark, which can cause unintended invocation of a shell-backed skill. In practice, this may lead to accidental transmission of user prompts to an external service or unexpected local file downloads when the user did not explicitly request image generation.
The skill documentation does not clearly warn users that their prompts are sent to a third-party image-generation provider and that generated content is downloaded to local storage. This creates a privacy and data-handling risk, especially if users include sensitive, regulated, or proprietary information in prompts.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
PY
)
RESP=$(curl -sS -X POST 'https://ark.ap-southeast.bytepluses.com/api/v3/images/generations' \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer ${SEEDREAM_API_KEY}" \
-d "$PAYLOAD")
The script sends the user-supplied prompt and model parameters to a remote HTTP endpoint via curl, which is a network operation that transmits user data off-system. While the code checks for the API key and reports errors, it does not include a confirmation prompt, user-facing notice, or explanatory comment warning that prompt content will be sent to a third-party service.
The script downloads the generated image and writes it to the specified output path, which is a file-write operation. Although echoing the resulting path provides some visibility after the fact, there is no prior warning, confirmation, or inline documentation telling users that a local file will be created automatically.