T08 · Insecure Dependencies
- Location
requirements.txt:2- Finding
Unpinned Third-Party Dependencies Permit Unreviewed Supply-Chain Changes
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1-2;scripts/packages/cadpy/pyproject.toml:1-11
Vulnerability Type: Unpinned third-party dependencies
Risk Level: MediumVulnerable Code
requirements.txt:1-2:text --editable ./scripts/packages/cadpy ezdxfscripts/packages/cadpy/pyproject.toml:1-11:toml [build-system] requires = ["setuptools>=68"] build-backend = "setuptools.build_meta" [project] name = "cadpy" version = "0.3.5" description = "Shared STEP/GLB topology artifact generation runtime for CAD skills." requires-python = ">=3.11" dependencies = [ "build123d", "cadquery-ocp", ]Technical Analysis
The project installs
ezdxf,build123d, andcadquery-ocpwithout exact version constraints or integrity hashes. The build dependency also permits anysetuptoolsrelease at or above version 68.Consequently, identical installation commands can resolve to different package versions over time. Those versions have not necessarily undergone the same review as the project source. Python packages and build backends can execute code during installation, import, or normal runtime. If a dependency release is compromised, malicious, or introduces a critical regression, the affected code may execute within the Skill's environment.
The audit found no evidence that the currently named packages are malicious. The vulnerability is the absence of deterministic version and integrity controls.
Attack Path
- An attacker compromises a maintainer account, distribution infrastructure, or release process for one of the unconstrained dependencies.
- The attacker publishes a malicious version under the legitimate package name.
- A user or deployment process installs the project using
requirements.txtor builds the localcadpypackage. - The package resolver selects the malicious version because no exact reviewed version or hash is req ...[truncated 755 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to a reviewed version, including
ezdxf,build123d,cadquery-ocp, and the build backend. - Generate a lock file that also fixes all transitive dependency versions.
- Require package hashes, such as through a hash-locked requirements file installed with
pip --require-hashes. - Build and install exclusively from a trusted package index or an internally controlled artifact repository.
- Disable fallback to public indexes when using a private package source to reduce dependency-confusion exposure.
- Update dependencies through a controlled process that includes changelog review, vulnerability scanning, and functional testing.
- Consider producing reproducible wheels in an isolated build environment and promoting only verified artifacts into production.
- Pin every direct dependency to a reviewed version, including
