T09 · Insecure Skill Coding Practices
Warning
- Location
- scripts/influencer_report.py:200
- Finding
- Analysis Results Retrieved Through an Undocumented Unauthenticated Endpoint<![CDATA[ ## Vulnerability Details **File Location**: `scripts/influencer_report.py`, lines 200-208 **Vulnerability Type**: Unauthenticated access to potentially sensitive analysis results **Risk Level**: Medium ### Vulnerable Code ```python def poll_result(task_id: str) -> Optional[dict]: """Poll webhook results endpoint for task completion.""" webhook_url = f"https://demo.memories-ai.org/webhooks/memories/result/{task_id}" print(f"[Poll] Waiting for task {task_id}...") for attempt in range(int(POLL_TIMEOUT / POLL_INTERVAL)): time.sleep(POLL_INTERVAL) try: resp = requests.get(webhook_url, timeout=15) ``` ### Technical Analysis The Skill submits videos to authenticated Memories.ai API endpoints but retrieves the resulting transcript and visual analysis from a separate `demo.memories-ai.org` endpoint. The polling request does not include an authorization credential or other proof that the requesting user owns the task. Consequently, access control appears to depend on possession and confidentiality of `task_id`. Task identifiers are embedded in URL paths and printed to standard output elsewhere in the workflow. URL paths and console output may be captured by browser history, reverse proxies, observability systems, terminal logs, CI logs, or support diagnostics. The separate result-service domain is also not disclosed in `SKILL.md`, which only documents the Memories.ai V1 and V2 API endpoints. This creates an unexpected trust boundary for transcript and visual-analysis data. ### Attack Path 1. A user submits a video for MAI transcript analysis. 2. The API returns a task identifier, which the script prints to its output. 3. The script constructs the result URL as: `https://demo.memories-ai.org/webhooks/memories/result/{task_id}`. 4. The task identifier is exposed through shared console output, application logs, proxy logs, monitoring data, or another disclosure channel. 5. A party possessing the identifier se ...[truncated 892 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Retrieve results through an authenticated, officially documented Memories.ai API endpoint. 2. Include authorization in a request header rather than relying on task-identifier secrecy. 3. Require the result service to verify that the authenticated account owns the requested task. 4. Avoid placing sensitive or reusable identifiers in URL paths where they may be logged. 5. Stop printing complete task identifiers, or redact them in application output. 6. Document every external domain that receives or returns user-related data. 7. Validate TLS certificates normally and restrict outbound requests to an explicit allowlist of approved production domains. 8. If an unauthenticated webhook-result endpoint is unavoidable, use short-lived, cryptographically random, single-use tokens and expire result records promptly. ]]>
