T08 · Insecure Dependencies
- Location
SKILL.md:21- Finding
Unpinned Prerelease Dependencies and Mutable Model Artifacts
- Content
View full analysis
- Remediation
View remediation
" pip install "mflux==" ``` 2. Remove `--prerelease=allow` from the default installation workflow. If prerelease functionality is necessary, isolate it in an explicitly experimental section and pin a specific prerelease version. 3. Pin optional packages such as `hf_transfer` to reviewed versions and maintain a lockfile containing resolved transitive dependencies. 4. Require package hashes where supported, such as a hash-locked requirements file installed with: ```bash pip install --require-hashes -r requirements.txt ``` 5. Pin each Hugging Face model to an immutable commit revision rather than only a mutable repository name. Record expected file names, sizes, and SHA-256 hashes. 6. Verify model artifacts before loading them. Prefer non-executable data formats such as `safetensors`, and configure loaders to reject formats capable of arbitrary object deserialization where possible. 7. Document all network access clearly, including package registries and model-hosting endpoints. Clarify that model and dependency downloads leave the local machine even though image generation itself is local. 8. Test dependency updates in an isolated environment and repeat security review before changing pinned versions or model revisions. ]]>
