T08 · Insecure Dependencies
- Location
requirements.txt:1- Finding
Unpinned Third-Party SDK Dependency
- Content
View full analysis
Vulnerability Details
File Location:
requirements.txt:1
Vulnerability Type: Unpinned dependency / supply-chain exposure
Risk Level: MediumVulnerable Code
text tosThe installation instructions also resolve the package without a version constraint:
bash pip install tosTechnical Analysis
The project installs the
tospackage without specifying an exact version or verifying an artifact hash. Consequently, the code installed during deployment can differ from the code tested during the audit.Because every executable script imports
tosand passes TOS access credentials totos.TosClientV2, a compromised, malicious, or unexpectedly incompatible future package release would execute in the same Python process and gain access to:TOS_ACCESS_KEYTOS_SECRET_KEYTOS_SECURITY_TOKEN- TOS bucket and object identifiers
- Local files and other environment variables available to the process
No evidence shows that the currently resolved
tospackage is malicious. The vulnerability is the absence of reproducible dependency controls, which unnecessarily increases supply-chain risk.Attack Path
- An attacker compromises a future release of the
tospackage, a configured package index, or the dependency publication process. - A user follows the documented
pip install toscommand or deploys fromrequirements.txt. - The package installer retrieves the attacker-controlled release because no version or hash is constrained.
- A skill script imports the installed package.
- Malicious package initialization or SDK code executes locally and receives the TOS credentials passed to
TosClientV2. - The compromised dependency can exfiltrate credentials, access TOS objects within the credential scope, or execute arbitrary code with the invoking user's operating-system permissions.
Impact Assessment
Successful exploitation provides arbitrary Python cod ...[truncated 274 chars]
- Remediation
View remediation
Remediation Suggestions
- Pin the SDK to a reviewed exact version, for example
tos==<reviewed-version>. - Generate a lock file containing transitive dependency versions.
- Require package hashes during installation, such as with
pip install --require-hashes -r requirements.txt. - Install only from an explicitly trusted package repository.
- Add automated dependency vulnerability and provenance scanning.
- Review and deliberately update the lock file instead of automatically resolving the latest release.
- Continue using narrowly scoped, short-lived STS credentials to limit the impact of dependency compromise.
- Pin the SDK to a reviewed exact version, for example
