T08 · Insecure Dependencies
- Location
scripts/voice_identify.py:91- Finding
Unpinned Python Dependencies and Mutable Model Artifacts
- Content
View full analysis
- Remediation
View remediation
" feature_extractor = AutoFeatureExtractor.from_pretrained( MODEL_NAME, revision=MODEL_REVISION, cache_dir=MODEL_CACHE, ) model = UniSpeechSatForXVector.from_pretrained( MODEL_NAME, revision=MODEL_REVISION, cache_dir=MODEL_CACHE, use_safetensors=True, ) ``` 4. Prefer reviewed safe-serialization model artifacts and avoid loading models that require remote custom code. 5. Record expected artifact checksums and verify them before use. 6. Use a controlled dependency mirror or prebuilt, reviewed environment for production deployment. 7. Store the model cache in a user-private directory with restrictive permissions rather than a broadly shared temporary location. ]]>
