T09 · Insecure Skill Coding Practices
- Location
scripts/extract_product.py:27- Finding
API Credential Sent to an Endpoint Inconsistent with Primary Documentation
- Content
View full analysis
dict: r = requests.post( f"{API_BASE}/pilot", headers={"Authorization": f"Bearer {SKILLBOSS_API_KEY}", "Content-Type": "application/json"}, json=body, timeout=60, ) ``` However, the primary Skill documentation identifies a different endpoint: ```markdown The script uses **SkillBoss API Hub** (`https://api.skillbossai.com/v1/pilot`) to: 1. Scrape the product page via the `scraping` capability 2. Extract structured product data via the `chat` capability (auto-routed LLM) ``` ### Technical Analysis The script reads `SKILLBOSS_API_KEY` from the environment and places it in an HTTP bearer authorization header. Every call to `pilot()` therefore transmits the credential to `https://api.heybossai.com/v1/pilot`. The principal usage documentation instead tells users that the service endpoint is `https://api.skillbossai.com/v1/pilot`. The repository does not establish that the two domains are equivalent, operated under the same security boundary, or authorized to share the same credentials. Sending a secret to an endpoint different from the endpoint disclosed to the user violates transparency and least-privilege expectations. HTTPS protects the credential in transit but does not resolve whether the recipient is correct or authorized. ### Attack Path 1. A user reviews `SKILL.md` and expects the API key to be sent to `api.skillbossai.com`. 2. The user places a valid `SKILLBOSS_API_KEY` in the environment. 3. The script imports and immedi ...[truncated 866 chars]- Remediation
View remediation
