T08 · Insecure Dependencies
- Location
SKILL.md:18- Finding
Unpinned Third-Party SDK Creates Supply-Chain Risk
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 18-20
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: MediumThe setup instructions install the latest available version of a third-party SDK without a version constraint or integrity verification:
markdown ## Setup ```bash pip install scrapfly-sdktext ### Technical Analysis The command resolves `scrapfly-sdk` dynamically from the configured Python package index. Because neither an exact version nor a cryptographic hash is specified, the code installed by users can change after this Skill has been reviewed. If the package publisher, package registry, dependency chain, or local package-index configuration is compromised, an attacker-controlled release could be selected. Python packages may execute code during installation and will execute package code when imported. The Skill subsequently imports `ScrapflyClient` and `ScreenshotConfig`, so a malicious package version could run in the user's Python process. This is a supply-chain weakness rather than evidence that the current `scrapfly-sdk` package is malicious. The raw GitHub links elsewhere in `SKILL.md` are documentation links to enum definitions; the audited instructions do not download or execute those linked files. ### Attack Path 1. An attacker compromises the package publisher, package registry, an upstream dependency, or a package index configured in the user's environment. 2. The attacker publishes or serves a malicious version that satisfies the unrestricted package request. 3. A user follows the documented `pip install scrapfly-sdk` instruction. 4. `pip` resolves and installs the attacker-controlled release. 5. Malicious code executes during installation or when the SDK is imported by the screenshot workflow. 6. The payload operates with the privileges of the user or automation account running `pip` or Python. ### Impact Assessment Successful ...[truncated 514 chars]- Remediation
View remediation
Remediation Suggestions
- Pin the SDK to an exact, reviewed version rather than installing the latest release:
bash pip install "scrapfly-sdk==<reviewed-version>" - Maintain dependencies in a lock file or requirements file containing cryptographic hashes, and install them with hash enforcement:
bash pip install --require-hashes -r requirements.txt - Generate hashes only from artifacts obtained through a trusted package index and review transitive dependencies before approval.
- Use an isolated virtual environment or container and avoid installing the package with administrator or root privileges.
- Configure an explicit trusted package index and disable unexpected supplemental indexes to reduce dependency-confusion exposure.
- Add automated dependency scanning and controlled update review so version changes are assessed before deployment.
- Restrict the runtime environment's filesystem, environment-variable, and network access to the minimum needed for screenshot requests.
- Pin the SDK to an exact, reviewed version rather than installing the latest release:
