T08 · Insecure Dependencies
- Location
references/templates/prototype-template.html:11- Finding
Unpinned Third-Party Scripts Without Subresource Integrity
- Content
View full analysis
Vulnerability Details
File Location:
references/templates/prototype-template.html, lines 11–14
Vulnerability Type: Third-party dependency supply-chain risk
Risk Level: MediumVulnerable Code
html <script crossorigin src="https://unpkg.com/react@18/umd/react.production.min.js"></script> <script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.production.min.js"></script> <script src="https://unpkg.com/@babel/standalone/babel.min.js"></script> <script src="https://cdn.tailwindcss.com"></script>Technical Analysis
The executable prototype template imports four JavaScript resources from external CDNs. React and ReactDOM use mutable major-version selectors, while Babel and Tailwind do not specify versions. None of these resources has a Subresource Integrity hash.
When a generated prototype is opened, the browser retrieves and executes the current content returned by these external services. Consequently, the effective executable code can change after the Skill package has been reviewed. A compromised CDN, upstream package, maintainer account, DNS route, or mutable release selector could cause attacker-controlled JavaScript to execute in the prototype page.
This is limited to prototypes generated from or based on this template. The audit found no evidence that the current external dependencies are intentionally malicious.
Attack Path
- An attacker compromises an upstream package account, CDN asset, delivery infrastructure, or other component in the dependency supply chain.
- The attacker modifies a referenced script or causes a mutable version selector to resolve to a malicious release.
- A user generates or opens a prototype based on this template while connected to the network.
- The browser downloads the modified JavaScript because the template does not enforce an expected integrity hash.
- The malicious script executes in the prototype's browser context.
- It can modify the displayed prototype, read i ...[truncated 907 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every dependency to an exact, reviewed version rather than using a major-version selector or an unversioned URL.
- Add cryptographic Subresource Integrity hashes and appropriate
crossorigin="anonymous"attributes to externally hosted static resources. - Prefer vendoring reviewed dependencies locally so generated prototypes do not execute mutable remote code.
- Replace runtime Babel transformation and Tailwind CDN compilation with a controlled build process that produces static JavaScript and CSS artifacts.
- Regularly review and update pinned dependencies through a documented dependency-management process.
- Host generated prototypes on an isolated origin that does not share cookies, storage, or privileges with sensitive applications.
- Apply a restrictive Content Security Policy that permits scripts only from approved sources and blocks unexpected outbound connections.
