diffusers-ascend-weight-prep
Pass
Audited by Gen Agent Trust Hub on Oct 22, 2026
Risk Level: SAFECOMMAND_EXECUTIONDYNAMIC_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/download_weights.pyuses thesubprocessmodule to executehf(huggingface-cli) andmodelscopecommands. While it uses argument lists which prevents shell injection, it still grants the agent the ability to invoke these external binaries on the host system. - [DYNAMIC_EXECUTION]: In
scripts/generate_fake_weights.py, thetransformers.AutoConfig.from_pretrainedfunction is called withtrust_remote_code=True. This allows the library to execute Python code defined in the model's configuration directory if the model uses a custom architecture. If a user points the skill at a malicious repository, this could lead to arbitrary code execution. - [INDIRECT_PROMPT_INJECTION]: The skill has a large attack surface for indirect injection as it ingests data (model configurations, metadata) from external sources like HuggingFace and ModelScope.
- Ingestion points:
model_idprovided via CLI arguments;model_index.jsonandconfig.jsondownloaded from remote repositories. - Boundary markers: None identified; external content is processed directly.
- Capability inventory: File system writes via
save_pretrainedandshutil.copy; command execution viasubprocess.runindownload_weights.py. - Sanitization: There is no validation or sanitization of the downloaded metadata before it is used to instantiate model components.
Audit Metadata