T09 · Insecure Skill Coding Practices
- Location
SKILL.md:17- Finding
API Key Exposure Through Publicly Embedded Query Strings
- Content
View full analysis
tags, Markdown, CSS, or anywhere an image URL is accepted. - Images are generated on first request, then cached permanently. Same prompt + version = same image. - URL-encode the prompt value. Use + for spaces. - Do not invent parameters that are not listed above. ## Examples `````` ``` ### Technical Analysis The skill identifies `key` as an API key, places it in the URL query string, and recommends using the resulting authenticated URLs directly in HTML, Markdown, CSS, websites, presentations, and PDFs. Query-string credentials are not an appropriate mechanism for distributing long-lived secrets. The complete URL may be exposed through: - HTML or Markdown source viewed by recipients. - Published documents, presentations, and PDF source or metadata. - Browser history and bookmarks. - Web server, reverse proxy, CDN, monitoring, and analytics logs. - Collaboration systems that retrieve URLs to generate link previews. - Screenshots, support records, or copied image addresses. - Referrer information in environments whose referrer policy permits URL details to be propagated. Because every consumer must receive the complete image URL, embedding a non-anonymous key inherently distributes that credential beyond the key holder. The documented permanent caching behavior may also make prompt-derived resources persist beyond the intended use period, although the primary confirmed weakness is credential exposure. ## ...[truncated 1418 chars]
- Remediation
View remediation
