T08 · Insecure Dependencies
- Location
SKILL.md:18- Finding
Unpinned Runtime Dependency Installation
- Content
View full analysis
Vulnerability Details
File Location:
SKILL.md, lines 18-18, 35-35, and 44-47
Vulnerability Type: Unpinned third-party dependencies resolved and installed at runtime
Risk Level: MediumVulnerable Code
markdown Use `uv run --with Pillow --with numpy` (add `--with scipy` only when using `--region full`).bash uv run --with Pillow --with numpy python3 <skill-path>/scripts/remove_watermark.py analyze <image> --region "y0,y1,x0,x1"bash uv run --with Pillow --with numpy python3 <skill-path>/scripts/remove_watermark.py remove <input> -o <output> --region "y0,y1,x0,x1" --threshold <N> uv run --with Pillow --with numpy --with scipy python3 <skill-path>/scripts/remove_watermark.py remove <input> -o <output> --threshold <N>Technical Analysis
The documented commands instruct the Agent to use
uv run --withto resolve and installPillow,numpy, and optionallyscipywithout exact version constraints, a committed lockfile, or artifact integrity hashes.Consequently, the executable dependency set can change between otherwise identical runs. Although the package names are legitimate and no malicious package is present in the audited repository, the workflow relies on the security of the configured package index, the selected package releases, and all transitive dependencies. If any resolved artifact or distribution channel is compromised, installation hooks or import-time Python code could execute within the Agent process.
Attack Path
- A user or Agent follows the commands in
SKILL.md. uvcontacts the configured Python package source and resolves the current versions of the named packages and their transitive dependencies.- A compromised release, dependency, package-index response, or repository configuration causes a malicious artifact to be selected.
- The artifact is downloaded and installed into the runtime environment.
- Malicious installation or import-time code executes when the image-process ...[truncated 884 chars]
- A user or Agent follows the commands in
- Remediation
View remediation
Remediation Suggestions
- Pin every direct dependency to an reviewed exact version rather than resolving unconstrained current releases.
- Commit a generated
uv.lockfile that captures direct and transitive dependencies. - Execute the workflow with locked resolution, such as
uv run --locked, and fail if the lockfile is inconsistent. - Use an approved, explicitly configured package index or an internally controlled package mirror.
- Verify downloaded artifacts with cryptographic hashes or repository-supported integrity controls.
- Periodically scan and deliberately update the lockfile rather than permitting automatic version drift on every invocation.
- Where operationally practical, build a pre-approved isolated environment or container so routine Skill execution does not install packages dynamically.
- Run the image-processing command under least privilege, with access limited to required input and output paths and without unnecessary credentials in its environment.
