T08 · Insecure Dependencies
- Location
scripts/has_image.py:2- Finding
Unpinned Runtime Dependencies and Unverified Mutable Model Artifact
- Content
View full analysis
=3.10" # dependencies = [ # "requests>=2.31.0", # ] # /// ``` `scripts/has-text.sh:9`: ```bash exec uv run "$SCRIPT_DIR/has_text_entry.py" "$@" ``` `scripts/has_image.py:2-8`: ```python # /// script # requires-python = ">=3.10" # dependencies = [ # "ultralytics>=8.3.0", # "opencv-python-headless>=4.8.0", # "pillow>=10.0.0", # ] # /// ``` `scripts/has-image.sh:9`: ```bash exec uv run "$SCRIPT_DIR/has_image.py" "$@" ``` `SKILL.md:52-56`: ```json { "id": "download-image-model", "kind": "download", "url": "https://huggingface.co/xuanwulab/HaS_Image_0209_FP32/resolve/main/sensitive_seg_best.pt", "targetDir": "models", "label": "Download HaS image model FP32 (119 MB)" } ``` `scripts/has_image.py:190-200`: ```python from ultralytics import YOLO path = model_path or os.environ.get("HAS_IMAGE_MODEL", _DEFAULT_MODEL_PATH) if not os.path.isfile(path): _die( "model_not_found", f"Model file not found: {path}\n" f"Download it via: openclaw install has-anonymizer " f"(or manually from HuggingFace)" ) _verbose(f"Loading image model from {path}...") _MODEL = YOLO(path) ``` ### Technical Analysis The text and image launchers invoke `uv run` against inline dependency declarations that use open-ended minimum-version constraints. No reviewed lockfile, exact version pin, or package hash is present in the audited project. As a result, dependency resolution can select releases published after the Skill was reviewed. The image model download URL uses Hugging Face's mutable `resolve/main` reference rather than an immu ...[truncated 2629 chars]- Remediation
View remediation
