T09 · Insecure Skill Coding Practices
- Location
scripts/generate.sh:120- Finding
Arbitrary Python Code Execution Through the Output Filename
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill does what it claims, but its generation script has a real filename-based code execution flaw and weak credential handling guidance.
Review before installing. Use this only with non-sensitive prompts or lyrics, keep the API key in a proper secret store rather than TOOLS.md or chat history, do not set ACE_MUSIC_BASE_URL unless you fully trust the endpoint, and avoid user-supplied or unusual output filenames until the script is fixed.
scripts/generate.sh:120Arbitrary Python Code Execution Through the Output Filename
scripts/generate.sh:7API Key Disclosure and Server-Side Request Abuse Through an Unrestricted Base URL
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
echo " Language: $LANGUAGE" >&2
# API call
RESPONSE=$(curl -s -X POST "${BASE_URL}/v1/chat/completions" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d "$BODY")
The skill invokes shell scripts (scripts/generate.sh) but does not declare any tool scope or allowed-tools boundary. In agent environments, undeclared shell capability increases the chance of unintended command execution or overly broad tool access, especially if the skill is auto-selected for common requests.
The description uses very broad activation language like 'create, generate, or compose music, songs, beats, instrumentals, or audio tracks,' which can cause the skill to trigger on many ordinary music-related prompts. Overbroad routing is dangerous because it may invoke shell-backed behavior and external API workflows when the user only wanted advice, lyrics, or discussion rather than tool execution.
The setup instructions tell the agent to have the user paste an API key and store it in an environment variable or TOOLS.md without warning that this is sensitive credential material. This creates a realistic risk of credential exposure through logs, shared files, repo commits, or future tool reads, especially because TOOLS.md is often not a secure secret store.
The script sends user-provided prompts, lyrics, and generation parameters to an external third-party API endpoint along with an API key. This is an intentional network behavior for the skill, but it still creates a real data-exposure boundary because potentially sensitive user content is transmitted off-host and the destination can be changed via the ACE_MUSIC_BASE_URL environment variable.
echo " Language: $LANGUAGE" >&2
# API call
RESPONSE=$(curl -s -X POST "${BASE_URL}/v1/chat/completions" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
-d "$BODY")
The API reference specifies vocal_language defaulting to "en", which imposes a language choice by default. This can violate language/locale policy expectations when users are not explicitly offered a choice or informed of the default behavior.
No suspicious patterns detected.