T08 · Insecure Dependencies
- Location
SKILL.md:18- Finding
Unpinned Third-Party Dependencies Create a Supply-Chain Execution Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md:18-21;scripts/kalshi_portfolio.py:23-26
Vulnerability Type: Unpinned and unverifiable third-party dependencies
Risk Level: MediumAffected code in
SKILL.md:18-21:bash Install dependencies: ```bash pip install requests cryptographytext **Affected code in `scripts/kalshi_portfolio.py:23-26`:** ```python if not HAS_SDK: print("Error: kalshi-python not installed. Run: pip install kalshi-python") sys.exit(1)Technical Analysis
The project directs users to install
requests,cryptography, andkalshi-pythonfrom the default Python package index without pinning reviewed versions, verifying cryptographic hashes, or supplying a lockfile. The documented setup also omitskalshi-python, while the portfolio script recommends installing it dynamically when an import fails.Python package installation may execute package build hooks and installs code that will later run with the privileges of the invoking user. Because package names alone resolve to mutable versions and transitive dependency graphs, the reviewed project does not guarantee that users will install the same dependency code that was evaluated during this audit.
No evidence shows that the currently named packages are malicious. The vulnerability is the absence of dependency integrity and reproducibility controls, which exposes installation to a compromised package release, maintainer account, package index, or transitive dependency.
Attack Path
- An attacker compromises a named dependency, one of its transitive dependencies, its publisher account, or the package-index delivery path.
- The attacker publishes a malicious version under a package name recommended by the project.
- A user follows
pip install requests cryptographyor the runtime recommendation to executepip install kalshi-python. - Pip resolves the unpinned dependency to the attacker- ...[truncated 890 chars]
- Remediation
View remediation
Remediation Suggestions
- Add all direct dependencies, including
kalshi-python, to a version-controlled dependency manifest. - Pin each dependency to an explicitly reviewed version rather than allowing installation of the latest available release.
- Generate and verify cryptographic hashes for direct and transitive packages, such as through a locked requirements file used with
pip install --require-hashes. - Regenerate the lockfile through a controlled review process and test dependency updates before release.
- Recommend installation inside a dedicated virtual environment with no elevated privileges.
- Replace the runtime message with installation instructions referencing the locked project dependency file, for example:
python print("Error: dependencies are missing. Install the reviewed lockfile in an isolated virtual environment.") - Use dependency scanning and provenance checks in CI to detect known vulnerabilities, unexpected ownership changes, and tampered release artifacts.
- Add all direct dependencies, including
