T09 · Insecure Skill Coding Practices
- Location
scripts/gen_music.py:50- Finding
Unvalidated API-Controlled Download URL Enables Blind SSRF and Resource Exhaustion
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill coherently generates music through AIMLAPI, but users should understand that prompts, lyrics, an API key, and downloaded audio pass through external network calls.
Install only if you are comfortable sending music prompts and lyrics to AIMLAPI and using an AIMLAPI_API_KEY from your environment. Avoid including private, secret, or sensitive text in lyrics or prompts, and prefer running it in a normal project directory with spending limits on the API key.
scripts/gen_music.py:50Unvalidated API-Controlled Download URL Enables Blind SSRF and Resource Exhaustion
scripts/gen_music.py:34Bearer API Key May Be Disclosed Through Cross-Origin HTTP Redirects
The skill advertises capabilities that include environment access, file writing, and network use, but it does not declare any explicit tool scope such as permissions or allowed-tools. That creates an authorization and transparency gap: an agent may invoke the skill without clear policy constraints, while the script can still access an API key, write output files, and transmit user content to an external service.
The description uses broad trigger language like requests for music, songs, or soundtracks with specific lyrics or styles, which can match many ordinary user prompts. In agent ecosystems, overly broad routing can cause unintended invocation of a networked skill, increasing the chance that user prompts or sensitive text are sent to an external provider without the user realizing it.
The README explains a network-based generation flow but does not disclose that prompts and lyrics are transmitted to an external API for processing. Because lyrics and prompts may contain copyrighted, personal, confidential, or sensitive content, lack of disclosure undermines informed consent and can lead to unintended data exfiltration to a third party.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
import urllib.request
from typing import Any
DEFAULT_BASE_URL = "https://api.aimlapi.com/v2"
DEFAULT_USER_AGENT = "openclaw-skill-aimlapi-music/1.1"
def parse_args() -> argparse.Namespace:
The script sends user-supplied prompts and optional lyrics to a third-party service for processing, but it does not provide a clear user-facing disclosure at the point of transmission. Because prompts and lyrics may contain sensitive or copyrighted content, this creates a privacy and data-handling risk, especially in an agent context where users may not realize their content leaves the local environment.
No suspicious patterns detected.