T08 · Insecure Dependencies
- Location
scripts/main.py:13- Finding
Unverified and Unpinned External Executable Dependency
- Content
View full analysis
Vulnerability Details
File Location:
scripts/main.py:13-15, 54-61; related installation guidance inSKILL.md:14-20,README.md:18-24, and unpinned dependencies inrequirements.txt:1-4
Vulnerability Type: Supply-chain exposure through an unverified package, placeholder source repository, open-ended dependency constraints, and PATH-based executable resolution
Risk Level: HighComplete Code Snippets
scripts/main.py:13-15:python def check_installation(): """Check if watermark-remover is installed""" return shutil.which("watermark-remover") is not Nonescripts/main.py:54-61:python # Check if installed if not check_installation(): print_installation_help() sys.exit(1) # Run the CLI try: result = subprocess.run( ["watermark-remover"] + sys.argv[1:], check=False )SKILL.md:14-20:bash # Install from PyPI (when published) pip install watermark-remover # Or install from source git clone https://github.com/yourusername/watermark-remover.git cd watermark-remover pip install -e .README.md:18-24:bash # Option A: Install from PyPI (when published) pip install watermark-remover # Option B: Install from source git clone https://github.com/yourusername/watermark-remover.git cd watermark-remover pip install -e .requirements.txt:1-4:text opencv-python>=4.8 numpy>=1.24 Pillow>=10.0 iopaint>=1.5Technical Analysis
The skill does not contain the advertised watermark-removal implementation. Instead, it resolves an executable named
watermark-removerfrom the process environment'sPATHand forwards all command-line arguments to that executable.The installation documentation compounds this trust-boundary issue by recommending a package described as not yet published and a source repository under the placeholder account
yourusername. The dependenc ...[truncated 2096 chars]- Remediation
View remediation
Remediation Suggestions
- Replace the placeholder repository URL with a verified repository controlled by an identified and trusted publisher.
- Do not recommend installation from PyPI until package ownership and provenance have been verified.
- Pin the external package and every direct dependency to reviewed versions. Use a lock file and require cryptographic hashes for downloaded distributions.
- Pin source installations to an immutable commit digest rather than a mutable branch or tag.
- Run the dependency in a dedicated virtual environment and invoke it through an absolute, validated path or a verified Python module instead of resolving an arbitrary executable from
PATH. - Before execution, verify the executable's canonical path, expected version, owner, and integrity.
- Audit and lock transitive dependencies, including model-loading components.
- If the LaMa model is downloaded automatically, document the exact trusted source and verify the model artifact with a pinned checksum or signature.
- Apply runtime isolation and least privilege: restrict filesystem access to required input and output locations, remove unnecessary credentials from the environment, and limit network access.
- Prefer including a reviewable implementation in the skill or vendoring a cryptographically verified release so that actual behavior can be audited with the wrapper.
