T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:64
- Finding
- Unpinned Third-Party Dependencies Installed During Project Initialization<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 64–68 **Vulnerability Type**: Uncontrolled third-party dependency resolution **Risk Level**: Medium ### Vulnerable Code ```markdown 2. **Environment Setup via `uv`:** - **Location:** Dependencies are defined in `pyproject.toml` at the **repository root** (not inside the skill folder). Scripts expect `uv sync` to have been run from that root. - Check if `pyproject.toml` exists at the repo root. If not, run `uv init` there. - Install/verify dependencies: `uv add docling openpyxl` (or `uv sync` from repo root). - This ensures a lightning-fast setup and handles all sub-dependencies (e.g. `torch` for `docling`) automatically. ``` ### Technical Analysis The initialization instructions direct the agent to install `docling` and `openpyxl` without specifying reviewed versions, hashes, or a mandatory lockfile. Running `uv add` resolves the current versions of these packages and their transitive dependencies from the configured package index. Consequently, the code installed during initialization can differ from the code originally reviewed. The risk includes upstream package compromise, malicious transitive dependencies, dependency confusion caused by an untrusted package index, and unexpected security regressions in later releases. The fallback instruction to run `uv init` may also create or alter dependency configuration in the repository before dependencies are resolved. This is a supply-chain weakness rather than evidence that either named package is currently malicious. ### Attack Path 1. A user invokes the skill's `/init` workflow. 2. The agent follows `SKILL.md` and runs `uv init` where needed. 3. The agent runs `uv add docling openpyxl`, or runs an unlocked synchronization against mutable dependency constraints. 4. The package manager contacts its configured package index and resolves current package and transitive-dependency versions. 5. If the index, an upstream release, ...[truncated 716 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Define dependencies in a committed and reviewed `pyproject.toml`. 2. Pin direct dependencies to approved versions and review relevant transitive dependencies. 3. Commit a generated `uv.lock` file and use a locked installation command such as: ```bash uv sync --locked ``` 4. Do not run `uv init` or `uv add` as part of the normal skill workflow. 5. Fail initialization if the approved manifest or lockfile is absent rather than dynamically creating dependency configuration. 6. Configure an explicit trusted package index and prevent fallback to unapproved indexes. 7. Where supported, verify package artifacts using hashes or signed provenance. 8. Run dependency installation and document conversion in an isolated environment with minimal filesystem and network permissions. 9. Add automated dependency vulnerability and provenance scanning to the release process. ]]>
