T09 · Insecure Skill Coding Practices
- Location
handler.py:11- Finding
Hard-Coded SkillPay API Credential Exposed in Source and Documentation
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill discloses paid SkillPay use, but it ships broken executable code, an exposed payment API key, and underdocumented external sharing of user identifiers.
Review this before installing. The skill is intended to generate image prompts and charges per call, but it contains a hard-coded payment API key, sends the provided user_id to SkillPay, and currently cannot run because of a Python indentation error. Do not use it with personal identifiers as user_id, and the publisher should remove the exposed key, document the billing data flow, and fail closed when payment cannot be verified.
handler.py:11Hard-Coded SkillPay API Credential Exposed in Source and Documentation
handler.py:39Billing Exceptions Fail Open and Grant Paid Functionality
handler.py:44Undefined SKILL_ID Causes Predictable Billing Bypass
handler.py:41Indentation Error Prevents the Skill from Executing
handler.py:41User Identifiers Are Disclosed to an External Billing Service Without Adequate Privacy Documentation
This skill is presented as an AI art prompt generator, but it contains billing and outbound payment functionality that is unrelated to the core prompt-generation task. In agent ecosystems, hidden monetization or charging behavior is dangerous because it can trigger unauthorized transactions, create financial risk, and expand the attack surface through external API calls and embedded payment credentials.
The exception path in charge_user returns success=True with demo=True even when charging fails, which causes the rest of the flow to proceed as though charging was acceptable. This creates inconsistent billing behavior, can bypass monetization controls, and makes failures indistinguishable from legitimate free access, undermining auditability and policy enforcement.
The code sends user_id to an external billing service without any visible disclosure, consent flow, or minimization. Even if user_id is not highly sensitive by itself, transmitting identifiers to third parties without transparency creates privacy and compliance risks and may enable cross-service tracking.
This code performs an outbound POST request to an external service from within a skill that appears to only generate local text prompts. In this context, the transmission is more dangerous because it is not necessary for core functionality, sends user-related data off-platform, and uses embedded credentials to interact with a remote billing endpoint.
"description": "AI prompt generation"
}
headers = {"Content-Type": "application/json", "X-API-Key": SKILLPAY_API_KEY}
response = requests.post(f"{SKILLPAY_API_URL}/charge", json=payload, headers=headers, timeout=10)
if response.status_code == 200:
return {"success": True, "data": response.json()}
return {"success": False, "error": response.text}
Detected: suspicious.exposed_secret_literal