T09 · Insecure Skill Coding Practices
- Location
scripts/billing_config.py:1- Finding
Hardcoded SkillPay API Credential and Sensitive Billing Data Transmission
- Content
View full analysis
Dict: """Charge user for skill usage""" amount = amount or DEFAULT_PRICE try: response = requests.post( f"{self.base_url}/charge", json={ "api_key": self.api_key, "skill_id": self.skill_id, "user_id": user_id, "amount": amount }, timeout=10 ) return response.json() except Exception as e: return {"success": False, "error": str(e)} ``` ### Technical Analysis A secret-looking SkillPay API key is embedded directly in a source file distributed with the Skill. Anyone who can download, inspect, or otherwise access the package can recover the credential without needing additional privileges. The billing client transmits that API key in a JSON request body alongside a user identifier, Skill identifier, and charge amount. HTTPS protects the request in tran ...[truncated 2640 chars]- Remediation
View remediation
