T08 · Insecure Dependencies
- Location
SKILL.md:191- Finding
Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 191–197
Vulnerability Type: Unpinned and insufficiently verified third-party dependencies
Risk Level: MediumVulnerable Code
markdown ## Dependencies Required dependencies (install if not available): - **pandoc**: `sudo apt-get install pandoc` (for text extraction) - **docx**: `npm install -g docx` (for creating new documents) - **LibreOffice**: `sudo apt-get install libreoffice` (for PDF conversion) - **Poppler**: `sudo apt-get install poppler-utils` (for pdftoppm to convert PDF to images) - **defusedxml**: `pip install defusedxml` (for secure XML parsing)Technical Analysis
The skill directs the agent to install dependencies without fixed versions, integrity hashes, lockfiles, or provenance validation. The commands
npm install -g docxandpip install defusedxmlresolve mutable package versions from third-party registries at installation time. Consequently, the code reviewed during one audit may differ from the code installed later.The global npm installation also expands the affected scope by placing package files and executables into a shared environment. Depending on local npm configuration, this command may require elevated permissions. Package installation can execute package-controlled lifecycle hooks, meaning compromise does not necessarily require the agent to import or invoke the installed library afterward.
The operating-system packages are obtained from configured repositories and therefore generally have stronger repository-level verification. However, the use of
sudomeans their installation occurs with root privileges and should not be performed automatically without explicit authorization and trusted repository configuration.Attack Path
- An attacker compromises a referenced registry package, its maintainer account, or the package publication pipeline.
- The attacker publishes a malicious version under the expected package name.
- An ag ...[truncated 1438 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin every registry dependency to a reviewed exact version rather than allowing the latest release:
bash npm install --save-exact docx@REVIEWED_VERSION pip install defusedxml==REVIEWED_VERSION -
Use lockfiles and integrity controls:
- Commit
package-lock.jsonand usenpm ci. - Maintain a hashed Python requirements file and install with:
bash pip install --require-hashes -r requirements.txt
- Commit
-
Install dependencies in an isolated, non-privileged environment:
- Use a Python virtual environment.
- Use a project-local npm installation instead of
npm install -g. - Run document-processing tools in a restricted container or sandbox where practical.
-
Require explicit user approval before running
sudoor modifying the global environment. -
Verify package provenance, publisher identity, repository configuration, and signatures where supported. Periodically scan pinned dependencies for known vulnerabilities.
-
Disable package lifecycle scripts during installation when they are unnecessary:
bash npm ci --ignore-scriptsIf lifecycle scripts are required, review them before enabling execution.
-
Document known-compatible versions so the skill produces reproducible behavior and does not silently consume newly published dependency code.
-
