T09 · Insecure Skill Coding Practices
- Location
scripts/enhance_prompt.sh:48- Finding
Arbitrary Python Code Execution Through Untrusted Heredoc Interpolation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill largely matches its video-generation purpose, but it ships unsafe credential handling and a script flaw that can turn user input into local code execution.
Review before installing. Do not use the embedded Kameo key; it should be removed and rotated by the publisher. Avoid passing passwords on the command line, prefer a secret manager over plaintext config, and do not run the enhanced prompt script on untrusted image paths or dialogue until the heredoc injection issue is fixed. Be aware that portraits and prompts are uploaded to Kameo and, for enhanced generation, Google Gemini.
scripts/enhance_prompt.sh:48Arbitrary Python Code Execution Through Untrusted Heredoc Interpolation
SKILL.md:31Concrete Kameo API Credential Published in Documentation
scripts/register.sh:7Registration Password Exposure and Unsafe Authentication JSON Construction
Account registration, login, API-key creation, and local credential storage are materially different from generating videos and introduce sensitive authentication workflows. If bundled into a simple media skill without clear disclosure, users may unintentionally expose credentials or authorize persistent account changes.
Account registration, login, API-key creation, and local credential storage are materially different from generating videos and introduce sensitive authentication workflows. If bundled into a simple media skill without clear disclosure, users may unintentionally expose credentials or authorize persistent account changes.
Account registration, login, API-key creation, and local credential storage are materially different from generating videos and introduce sensitive authentication workflows. If bundled into a simple media skill without clear disclosure, users may unintentionally expose credentials or authorize persistent account changes.
Account registration, login, API-key creation, and local credential storage are materially different from generating videos and introduce sensitive authentication workflows. If bundled into a simple media skill without clear disclosure, users may unintentionally expose credentials or authorize persistent account changes.
The documentation exposes what appears to be a real API key and instructs users to store it in a plaintext local credentials file. This creates two issues: immediate secret leakage in the repository and encouragement of insecure at-rest secret handling on user systems.
export KAMEO_API_KEY="kam_I3rdx43IymFNbfBw1c0ZbSc7o3aUfQgz8cljZA6T7fs"
Or store in `~/.config/kameo/credentials.json`:
```json
{
"api_key": "kam_I3rdx43IymFNbfBw1c0ZbSc7o3aUfQgz8cljZA6T7fs"
The documentation exposes a hard-coded Kameo API key and explicitly instructs users to export it or write it to a persistent credentials file. This can lead to unauthorized use of the account, billing abuse, and downstream compromise if users assume the embedded secret is legitimate and reusable.
The guide shows a real-looking API key and instructs users to place it in an exported shell variable or plaintext config file, but gives no warning about credential exposure, local file permissions, or shell history leakage. This increases the chance of secrets being disclosed through screenshots, logs, backups, or shared environments.
The documentation directs users to store an API key in a plaintext credentials.json file under the home directory, using a real-looking secret. Persisting secrets this way without permission hardening or secure storage guidance increases the risk of local credential theft, accidental sync/backup leakage, and misuse of the exposed account.
# 或保存到配置文件
mkdir -p ~/.config/kameo
cat > ~/.config/kameo/credentials.json << EOF
{
"api_key": "kam_I3rdx43IymFNbfBw1c0ZbSc7o3aUfQgz8cljZA6T7fs"
}
The API examples use an actual-looking secret in request headers and do not warn users not to expose, reuse, or share it. This normalizes unsafe secret handling and can result in credential compromise and account abuse.
The API reference includes an authenticated curl example containing a real-looking API key in the HTTP header. Publishing a usable secret in docs enables direct credential theft and makes accidental reuse by readers likely.
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Check Kameo credit balance
API_KEY="${KAMEO_API_KEY:-}"
if [ -z "$API_KEY" ] && [ -f ~/.config/kameo/credentials.json ]; then
API_KEY=$(jq -r '.api_key' ~/.config/kameo/credentials.json)
fi
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Check Kameo credit balance
API_KEY="${KAMEO_API_KEY:-}"
if [ -z "$API_KEY" ] && [ -f ~/.config/kameo/credentials.json ]; then
API_KEY=$(jq -r '.api_key' ~/.config/kameo/credentials.json)
fi
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Check Kameo credit balance
API_KEY="${KAMEO_API_KEY:-}"
if [ -z "$API_KEY" ] && [ -f ~/.config/kameo/credentials.json ]; then
API_KEY=$(jq -r '.api_key' ~/.config/kameo/credentials.json)
fi
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Check Kameo credit balance
API_KEY="${KAMEO_API_KEY:-}"
if [ -z "$API_KEY" ] && [ -f ~/.config/kameo/credentials.json ]; then
API_KEY=$(jq -r '.api_key' ~/.config/kameo/credentials.json)
fi
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Check Kameo credit balance
API_KEY="${KAMEO_API_KEY:-}"
if [ -z "$API_KEY" ] && [ -f ~/.config/kameo/credentials.json ]; then
API_KEY=$(jq -r '.api_key' ~/.config/kameo/credentials.json)
fi
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
# Check Kameo credit balance
API_KEY="${KAMEO_API_KEY:-}"
if [ -z "$API_KEY" ] && [ -f ~/.config/kameo/credentials.json ]; then
API_KEY=$(jq -r '.api_key' ~/.config/kameo/credentials.json)
fi
The script writes a usable API key to ~/.config/kameo/credentials.json in plaintext, creating a local secret that can be harvested by malware, other processes running as the user, insecure backups, or accidental disclosure. Because the key enables API access without the user's password, compromise of this file can directly enable unauthorized use of the account.
# Save to config
mkdir -p ~/.config/kameo
cat > ~/.config/kameo/credentials.json << EOF
{
"api_key": "$KAMEO_KEY",
"email": "$EMAIL"
Although this line sets restrictive permissions, it is part of the credential-persistence flow that leaves a long-lived API key stored on disk. The file remains accessible to any code executing as the user and may still be captured via backups or post-compromise collection.
"email": "$EMAIL"
}
EOF
chmod 600 ~/.config/kameo/credentials.json
echo "✅ Saved to ~/.config/kameo/credentials.json"
echo ""
The script announces the location of the credential file and then suggests exporting the API key into the current shell session, increasing the chance the secret will appear in shell history, environment dumps, subprocess environments, or support logs. This compounds the risk created by generating and storing a persistent API credential.
EOF
chmod 600 ~/.config/kameo/credentials.json
echo "✅ Saved to ~/.config/kameo/credentials.json"
echo ""
echo "Export for current session:"
echo " export KAMEO_API_KEY='$KAMEO_KEY'"
The skill declares no explicit tool permissions while clearly describing use of shell commands, environment variables, local credential files, and outbound network access. This weakens security review and consent boundaries because consumers cannot easily see that the skill can read secrets and transmit data off-host.
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
---
name: kameo
description: Generate expressive talking-head videos from static images using Kameo AI. Converts static avatars/portraits into dynamic 5-second videos with realistic facial expressions, lip-sync, and motion. Use when you need to bring static images to life, create AI character videos, demonstrate visual communication, or generate talking avatars from photos.
---
# Kameo AI - Talking Head Video Generation
The skill does not prominently warn that uploaded images and prompts are sent to an external API and resulting videos are hosted on a CDN. Users may provide sensitive biometrics, portraits, or confidential text without understanding the external transmission and storage implications.
Including a registration helper and JWT/API-key creation path broadens the skill from content generation into identity and secret-management operations. That added scope increases risk of credential misuse and makes the skill more sensitive than its description suggests.
The example embeds what appears to be a live API key directly in documentation and in an outbound request header. Hardcoded secrets can be harvested from the repository, reused by unauthorized parties, and may expose the associated account to abuse or charges.
curl -X POST https://api.kameo.chat/api/public/generate \
-H "X-API-Key: kam_I3rdx43IymFNbfBw1c0ZbSc7o3aUfQgz8cljZA6T7fs" \
-H "Content-Type: application/json" \
-d '{
The example embeds what appears to be a live API key directly in documentation and in an outbound request header. Hardcoded secrets can be harvested from the repository, reused by unauthorized parties, and may expose the associated account to abuse or charges.
curl -X POST https://api.kameo.chat/api/public/generate \
-H "X-API-Key: kam_I3rdx43IymFNbfBw1c0ZbSc7o3aUfQgz8cljZA6T7fs" \
-H "Content-Type: application/json" \
-d '{
Detected: suspicious.exposed_secret_literal, suspicious.potential_exfiltration