T08 · Insecure Dependencies
Warning
- Location
- SKILL.md:17
- Finding
- Unpinned Third-Party Package Installation and Execution## Vulnerability Details **File Location**: `SKILL.md`, lines 17, 37, 51, 66, 85, 112, and 191 **Vulnerability Type**: Unpinned third-party dependencies **Risk Level**: Medium ### Vulnerable Code ```bash # SKILL.md:17 pip install black # SKILL.md:37 pip install isort # SKILL.md:51 pip install flake8 # SKILL.md:66 pip install ruff # SKILL.md:85 npm install -D prettier # SKILL.md:112 npm install -D eslint # SKILL.md:191 npm install -D markdownlint-cli ``` ### Technical Analysis The documented installation commands do not pin package versions or verify package integrity. Consequently, package managers resolve whichever compatible releases are available from their configured registries when the commands are run. The audited skill therefore cannot guarantee that the installed code is the same code that existed when the skill was reviewed. Python packages may execute packaging or build-related code during installation, depending on their distribution format and build configuration. npm packages and transitive dependencies may define lifecycle scripts that execute during installation. Subsequent `npx` commands documented elsewhere in the file also execute the resolved npm package code. No evidence shows that the named packages are malicious, misspelled, or currently compromised. The vulnerability is the unsafe, non-reproducible dependency acquisition pattern, which increases exposure to compromised releases, registry redirection, malicious transitive dependencies, and future supply-chain attacks. ### Attack Path 1. A user or AI Agent follows the installation guidance in `SKILL.md`. 2. pip or npm contacts the registry configured in the local environment. 3. Because no exact versions or integrity constraints are specified, the package manager resolves current package releases and their transitive dependencies. 4. An attacker who has compromised an upstream release, dependency, maintainer account, reg ...[truncated 1122 chars]
- Remediation
- ## Remediation Suggestions 1. Replace unversioned package specifications with exact, reviewed versions. 2. For Python, maintain a requirements or constraints file with cryptographic hashes and install it using hash enforcement, for example: ```bash python3 -m pip install --require-hashes -r requirements.txt ``` 3. For npm, declare exact development dependency versions in `package.json`, commit the generated lockfile, and use `npm ci` in automated or reproducible environments. 4. Run npm installation with lifecycle scripts disabled when scripts are unnecessary: ```bash npm ci --ignore-scripts ``` If a required package legitimately needs a lifecycle script, review that script before allowing it. 5. Prefer project-local binaries invoked through package scripts rather than allowing `npx` to resolve software dynamically. If `npx` remains necessary, require an explicitly pinned version and prevent implicit installation. 6. Configure pip and npm to use approved registries, validate TLS, and prevent untrusted registry overrides in automated environments. 7. Review direct and transitive dependencies before updating pins. Use dependency scanning, provenance information, and package-manager audit tooling as supporting controls. 8. Perform installations and formatter execution in a least-privileged container or sandbox without unnecessary credentials, sensitive filesystem mounts, or unrestricted network access.
