T08 · Insecure Dependencies
- Location
references/page-challenge.md:24- Finding
Generated Prototypes Are Required to Load an Unpinned Runtime CDN Dependency
- Content
View full analysis
Vulnerability Details
File Location:
references/page-challenge.md:24-30
Additional Location:SKILL.md:145
Vulnerability Type: Unpinned third-party runtime dependency
Risk Level: MediumVulnerable Code
markdown ## 技术栈红线 - 单文件 HTML + Tailwind CDN + 原生 JS - 无外部 JS 库(除 Tailwind CDN) - 无 emoji、无渐变、单强调色(推荐 `#F97316`) - 图标一律内联 SVG(Heroicons 24 outline 风格) - 中文字体栈,slate 中性色The main workflow reinforces this requirement at
SKILL.md:145:markdown **页面题**:读 `references/page-challenge.md`,按"页面 v1 分三次生成"和"技术栈红线"执行,产出 `index.html`。Technical Analysis
The Skill requires generated HTML prototypes to load Tailwind through a CDN at runtime. It does not prescribe an official host, an immutable version, a cryptographic integrity hash, or an allowlist of acceptable dependency locations.
A Tailwind browser CDN integration commonly involves loading executable JavaScript rather than only static CSS. Such a script runs in the generated page's browser context and can access the DOM, user-entered prototype data, and browser networking APIs. Because the effective dependency content is retrieved after this Skill has been reviewed, its behavior can change independently of the audited files.
The requirement also permits the generating Agent to select an unspecified CDN URL. This increases the risk of using an unofficial mirror, mutable latest-version endpoint, mistyped domain, or otherwise unsafe source. The issue is classified as an insecure dependency rather than confirmed malicious remote-payload execution because the audited project does not itself identify a malicious URL or directly fetch and execute a payload.
Attack Path
- A user invokes the Skill for a page or prototype challenge.
- Following the mandatory technology rules, the Agent creates an
index.htmlfile containing a Tailwind CDN script reference. - The user opens the generated file in a browser, causing the b ...[truncated 1313 chars]
- Remediation
View remediation
Remediation Suggestions
- Remove the mandatory runtime CDN requirement. Generate or compile Tailwind CSS in advance and embed the resulting CSS in the single-file HTML artifact.
- If an external dependency is unavoidable, require an official HTTPS source pinned to an exact immutable version. Do not permit floating tags such as
latest. - Require Subresource Integrity and anonymous CORS where the selected artifact supports them:
html <link rel="stylesheet" href="https://approved.example/tailwind-exact-version.min.css" integrity="sha384-EXPECTED_HASH" crossorigin="anonymous" > - Define an explicit allowlist of approved dependency domains and prohibit arbitrary mirrors, URL shorteners, user-provided package sources, and dynamically constructed dependency URLs.
- Prefer static CSS over a browser-side Tailwind compiler because static CSS does not introduce executable third-party JavaScript into the page.
- Add a validation step that rejects generated HTML containing unapproved remote scripts, unpinned dependency URLs, or external resources without required integrity metadata.
- Document any unavoidable network dependency and warn users not to enter sensitive or production data into prototypes that execute third-party code.
- Align the implementation with the stated offline, directly-openable single-file objective by embedding all required styles and assets locally.
