T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:69
- Finding
- Unpinned Third-Party Skill Installation and Execution<` 4. Keep both the `.json` (source of truth) and `.svg` (rendered) in the research folder ``` ### Technical Analysis The workflow directs the user or agent to install the third-party `diagrams` skill by a mutable package name and then execute its JavaScript renderer with Node.js. No immutable version, commit digest, integrity hash, trusted publisher identity, or mandatory source review is specified. The `diagrams` dependency is not included in the audited project, so its implementation and behavior could not be inspected. If the package source, publisher account, registry entry, or dependency-resolution process is compromised, the installed `render-elk.mjs` file could contain attacker-controlled code. Node.js executes that code with the permissions and environmental access of the invoking user or agent. ...[truncated 1727 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Pin the `diagrams` skill to an audited immutable release, commit digest, or equivalent content-addressed identifier. 2. Publish and verify a cryptographic integrity hash or signed provenance record before installation and execution. 3. Document the authoritative package source and expected publisher identity; reject dependencies obtained from unapproved sources. 4. Review the dependency's `SKILL.md`, renderer scripts, installation hooks, and transitive dependencies before use. 5. Disable or tightly control lifecycle and installation scripts where the package manager supports doing so. 6. Execute the renderer in a restricted sandbox or container with: - Read access limited to required diagram inputs. - Write access limited to a dedicated output directory. - No access to credential stores, SSH keys, or unrelated repositories. - No outbound network access unless rendering explicitly requires it. - A non-privileged operating-system account. 7. Pin and integrity-check transitive runtime packages, including `elkjs`. 8. Add a documented failure mode that stops rendering rather than automatically installing or executing an unverified dependency. ]]>
