T08 · Insecure Dependencies
- Location
SKILL.md:134- Finding
Unpinned Remote JavaScript Dependencies Permit Mutable Code Execution
- Content
View full analysis
``` `references/tool-usage.md:112`: ```html ``` ### Technical Analysis The Skill instructs the agent to generate standalone HTML documents that load executable JavaScript directly from `unpkg.com`. These URLs do not specify immutable package versions and do not provide Subresource Integrity hashes. Because package resolution is mutable, HTML generated from the same reviewed Skill can execute different JavaScript in the future. The browser trusts and executes the CDN response within the generated document's JavaScript context. The effective executable payload is therefore outside the reviewed project and may change after the audit. Exploitation depends on an upstream supply-chain event, such as: - Compromise of the referenced npm package or publisher account. - Publication of a malicious package version selected by the unpinned URL. - Compromise of the CDN or its dependency-resolution infrastructure. - Unexpected changes in package contents or dependency resolution. This issue does not demonstrate that the current VisActor packages are malicious. The risk arises from mutable remote code execution without integrity verification. ### Attack Path 1. A user requests a chart or business-analysis visualization ...[truncated 1437 chars]- Remediation
View remediation
``` 3. Generate the integrity hash from the exact reviewed artifact and verify it whenever the dependency is intentionally upgraded. 4. Prefer bundling a reviewed local copy of the visualization library when charts may contain confidential business information. 5. Apply a restrictive Content Security Policy that permits scripts only from explicitly approved sources and restricts outbound connections, for example through `script-src` and `connect-src`. 6. Establish a dependency-update process that includes version review, checksum verification, vulnerability scanning, and documented approval. 7. Avoid embedding credentials, personal data, unpublished financial information, or other sensitive material in pages that execute remotely hosted scripts. ]]>
