huggingface-lora-space-builder
Pass
Audited by Gen Agent Trust Hub on Aug 15, 2026
Risk Level: SAFECREDENTIALS_UNSAFEEXTERNAL_DOWNLOADSCOMMAND_EXECUTIONDATA_EXFILTRATIONPROMPT_INJECTION
Full Analysis
- [INDIRECT_PROMPT_INJECTION]: The skill ingests untrusted metadata and documentation (READMEs, model cards) from arbitrary Hugging Face repositories using
huggingface_hub.ModelCard.load(repo_id). This information is used to generate inference code and UI logic in the producedapp.pyscript. An attacker could craft a malicious model card to influence the generated code or attempt to manipulate the agent's behavior during the setup phase. - Ingestion points: Hugging Face repository files and Model Cards via the
huggingface_hubAPI (Phase 1 and Phase 2). - Boundary markers: The instructions do not define specific delimiters or instructions for the agent to ignore instructions embedded within the processed model cards.
- Capability inventory: The agent has capabilities to write files, execute shell commands, and interact with the Hugging Face API with write permissions.
- Sanitization: No specific sanitization or validation procedures are described for data extracted from external repositories before it is used in the code generation process.
- [CREDENTIALS_UNSAFE]: The skill requests a Hugging Face access token with write scope and instructs the agent to store it as a Space secret (
HF_TOKEN) within the newly created repository. While this is a standard workflow for model deployment, it involves the agent handling and persisting highly sensitive long-lived credentials. - [COMMAND_EXECUTION]: The agent uses the
gradioCLI to verify the Space's endpoint signature and perform test inferences. These commands, such asgradio predict, are executed in the agent's environment and include the authentication token as a parameter. - [EXTERNAL_DOWNLOADS]: The skill recommends installing dependencies and fetching configuration from external repositories, including
git+https://github.com/huggingface/diffusersandgit+https://github.com/Lightricks/LTX-Video.git. These references target established organizations and well-known services in the machine learning ecosystem.
Audit Metadata