T08 · Insecure Dependencies
- Location
SKILL.md:34- Finding
Mutable Third-Party JavaScript Is Loaded Without Integrity Verification
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:34-40
Vulnerability Type: Remote, insufficiently pinned JavaScript dependencies without Subresource Integrity
Risk Level: MediumVulnerable Code
markdown ### Allowed CDN List The following libraries may be referenced through `<script src="...">` or `<link href="...">`: - **Tailwind (browser build)**: `https://cdn.tailwindcss.com` - **ECharts**: `https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js` - **Chart.js**: `https://cdn.jsdelivr.net/npm/chart.js` - **D3**: `https://cdn.jsdelivr.net/npm/d3@7` - **Google Fonts**: when a specific Chinese font is requiredThe dashboard reference provides a directly executable example:
html <script src="https://cdn.jsdelivr.net/npm/echarts@5/dist/echarts.min.js"></script>Technical Analysis
The Skill permits generated HTML documents to load and execute JavaScript from third-party CDNs. Several dependency URLs use a floating major version or omit the version entirely. None of the prescribed script tags includes a Subresource Integrity (
integrity) hash.Consequently, the code executed when a generated document is opened is not fully represented by the audited Skill package. It may change after the Skill has been reviewed because of a new package release, CDN compromise, upstream account compromise, or malicious alteration of the delivered resource.
This is primarily an insecure dependency and supply-chain issue. It also exhibits characteristics of remote payload retrieval because the effective executable payload is fetched at document-open time.
Attack Path
- A user requests an interactive dashboard or visualization.
- The Agent follows the Skill guidance and generates an HTML document containing one of the approved CDN script tags.
- An attacker compromises the relevant package release process, package owner account, CDN infrastructure, or another upstream delivery component.
- The user or another recipient opens th ...[truncated 1175 chars]
- Remediation
View remediation
Remediation Suggestions
-
Prefer inline SVG, CSS, and minimal native JavaScript so generated documents remain genuinely self-contained and offline-capable.
-
Prohibit floating dependency URLs such as
echarts@5,d3@7, and unversionedchart.js. -
If remote dependencies are unavoidable, pin every dependency to an exact reviewed version.
-
Require a cryptographic Subresource Integrity digest and CORS mode:
html <script src="https://cdn.example.invalid/library-x.y.z.min.js" integrity="sha384-REVIEWED_DIGEST" crossorigin="anonymous"></script> -
Verify that the selected CDN serves immutable content for the pinned URL.
-
Maintain an approved dependency manifest containing the exact version, URL, expected digest, review date, and update procedure.
-
Document that CDN-enabled output requires a network connection and contacts third parties when opened.
-
Offer an offline alternative in which reviewed library code is embedded into the single HTML file.
-
Add a generated Content Security Policy that restricts script sources and blocks unnecessary network capabilities. Ensure any required script hashes or nonces are explicitly enumerated.
-
Add an automated validation step that rejects generated HTML containing unversioned scripts, unauthorized domains, or external scripts without integrity metadata.
-
