T08 · Insecure Dependencies
- Location
references/formats.md:69- Finding
Unverified and Unpinned Third-Party Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
references/formats.md:28-30, 43, 69-74, 89-91, 130-132, 156
Vulnerability Type: Unsafe installation of mutable third-party dependencies
Risk Level: HighVulnerable Code
At
references/formats.md:28-30:bash sudo dnf install jq # Fedora sudo apt install jq # Debian/Ubuntu brew install jq # macOSAt
references/formats.md:43:bash npm install -g ajv-cliAt
references/formats.md:69-74:bash wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O yq chmod +x yq sudo mv yq /usr/local/bin/ # Or via pip pip install yqAt
references/formats.md:89-91:bash # Install yamllint pip install yamllintAt
references/formats.md:130-132:bash pip install toml # or pip install tomli # Python 3.11+ built-inAt
references/formats.md:156:bash pip install yqTechnical Analysis
The Skill recommends installing third-party executables and packages without pinning exact versions or verifying artifact integrity.
The most serious instance downloads the
yqexecutable from a mutablelatestrelease URL, marks it executable, and places it in/usr/local/binusingsudo. No cryptographic checksum, signature, immutable version, or provenance verification is performed. Consequently, the downloaded bytes can change after the Skill has been reviewed.The npm and pip instructions also install mutable package versions from external registries. They do not use lockfiles, hashes, exact versions, isolated environments, or package provenance checks. Global npm installation further increases the affected scope.
This creates a supply-chain trust boundary in which compromise of an upstream project, release account, package registry, dependency, distribution channel, or package name can result in attacker-controlled code being installed and executed locally.
Attack Path
- An attacker compromises a referenced upstream release, ...[truncated 2055 chars]
- Remediation
View remediation
Remediation Suggestions
-
Pin immutable versions
- Replace
latestURLs with exact release versions. - Pin exact pip and npm package versions.
- Maintain dependency lockfiles where applicable.
- Replace
-
Verify downloaded artifacts
- Download the checksum or signature through a trusted channel.
- Verify SHA-256 or stronger digests before granting execute permission.
- Prefer signed releases and validate signatures against a pinned maintainer key.
-
Avoid privileged global installation
- Install command-line tools into a user-controlled directory or an isolated project environment.
- Avoid
sudounless system-wide installation is explicitly required and approved. - Do not overwrite an existing executable without confirming its origin and obtaining user consent.
-
Use isolated dependency environments
- Install Python dependencies in a virtual environment.
- Use project-local npm dependencies instead of
npm install -g. - Use hash-locked dependency installation, such as pip requirements with
--require-hashes.
-
Validate package provenance
- Confirm the expected publisher, repository, package name, and release metadata.
- Prefer trusted operating-system repositories where their signing and update model meets the deployment requirements.
- Review transitive dependencies and use automated dependency vulnerability scanning.
-
Harden the direct-download workflow
- Download into a securely created temporary directory.
- Fail closed if integrity verification does not succeed.
- Confirm the target architecture and operating system.
- Inspect whether
/usr/local/bin/yqalready exists before installation. - Document a safe rollback or removal procedure.
-
