T09 · Insecure Skill Coding Practices
- Location
SKILL.md:115- Finding
Caller-Controlled User Identifier Used as REST Authorization Credential
- Content
View full analysis
`. Get a userId by calling `POST /api/users/ensure`. | MCP Tool | REST Equivalent | |----------|----------------| | `account_login` | `POST /api/users/login` `{username, password}` | | `get_profile` | `GET /api/profile` | | `get_today` | `GET /api/today` | | `vocab_add` | `POST /api/vocab` `{word, chinese, context?}` | | `vocab_list` | `GET /api/vocab` | | `vocab_review` | `POST /api/vocab/review` `{id}` | | `articles_create` | `POST /api/user-articles` `{title, content}` | | `articles_list` | `GET /api/user-articles` | | `articles_get` | `GET /api/user-articles/:id` | | `articles_delete` | `DELETE /api/user-articles/:id` | | `tts` | `POST /api/tts` `{text, speed?}` | | `checkin_poster` | `GET /api/checkin/poster` → PNG binary | | `get_history` | `GET /api/history` | | `quiz_submit` | `POST /api/quiz` `{correctCount, totalCount, points?, articleId?}` | | `level_set` | `POST /api/level` `{level}` | | `levels_list` | `GET /api/levels` | | `diagnose` | `POST /api/diagnose` `{}` | | `copy_load` | `POST /api/copy` `{articleId, source?, action:"load"}` | | `copy_submit` | `POST /api/copy` `{articleId, source?, action:"submit"}` | | `copy_stash` | `POST /api/copy` `{articleId, draft, source?, action:"stash"}` | | `evaluate` | `POST /api/evaluate` `{text, articleId?}` | ``` ### Technical Analysis The documented REST fallback identifies requests through a caller-supplied `x-user-id` header and explicitly describes this mechanism as “Anonymous auth.” No password, authenticated session, signed token, expiration mechanism, or proof of possession is documented for subsequent requests. A user identifier is an identity attri ...[truncated 2133 chars]- Remediation
View remediation
