T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:179
- Finding
- Unpinned Executable CDN Dependency Without Integrity Verification<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md:179-183, 330` **Vulnerability Type**: Unpinned third-party dependency and missing Subresource Integrity **Risk Level**: Medium ### Vulnerable Code ```html <script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/styles/github.min.css"> <script src="https://cdn.jsdelivr.net/gh/highlightjs/cdn-release@11.9.0/build/highlight.min.js"></script> ``` The dependency guidance also states: ```text - marked.js (latest stable version) - highlight.js v11.9.0 ``` ### Technical Analysis The `marked` script URL does not specify an exact package version. Consequently, separate builds or application loads can receive different executable JavaScript without any corresponding change to the reviewed Skill. The instructions explicitly reinforce this mutable dependency policy by requesting the “latest stable version.” None of the CDN resources have a Subresource Integrity (`integrity`) attribute. Although the highlight.js URLs specify version 11.9.0, the browser has no cryptographic mechanism to confirm that the returned files match reviewed content. This creates a supply-chain trust boundary in which the generated application executes code controlled by the package publisher and CDN infrastructure. The finding does not establish that the current CDN content is malicious; the risk is that upstream changes or compromise can alter the effective application after review. ### Attack Path 1. An attacker compromises a relevant upstream package release, publishing account, CDN account, or delivery path. 2. The attacker modifies the JavaScript served through the referenced CDN URL. 3. A user opens an application generated according to the Skill. 4. The browser retrieves and executes the modified dependency because the URL is unpinned or lacks integrity enforcement. 5. The malicious dependency accesses Markdown ...[truncated 680 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin every dependency to an exact, reviewed version. For example: ```html <script src="https://cdn.jsdelivr.net/npm/marked@EXACT_VERSION/marked.min.js" integrity="sha384-REVIEWED_HASH" crossorigin="anonymous"></script> ``` 2. Add reviewed `integrity` hashes and `crossorigin="anonymous"` to every externally loaded script and stylesheet. 3. Prefer vendoring verified dependency files locally or installing them through a lockfile-controlled build process. 4. Remove guidance to use the “latest stable version.” Dependency upgrades should be explicit, reviewed, tested, and accompanied by updated integrity hashes. 5. Apply a restrictive Content Security Policy that limits script and style sources to the minimum required origins. 6. Use automated dependency monitoring, but do not automatically deploy unreviewed version updates. ]]>
