Trust Assessment
hf-cli received a trust score of 0/100, placing it in the Untrusted category. This skill has significant security findings that require attention before use in production.
SkillShield's automated analysis identified 12 findings: 6 critical, 6 high, 0 medium, and 0 low severity. Key findings include Arbitrary command execution, Remote code execution: curl/wget pipe to shell, Hugging Face token exposure.
The analysis covered 4 layers: Manifest Analysis, Static Code Analysis, Dependency Graph, LLM Behavioral Safety. The LLM Behavioral Safety layer scored lowest at 0/100, indicating areas for improvement.
Last analyzed on June 1, 2026 (commit 49abf82b). SkillShield performs automated 4-layer security analysis on AI skills and MCP servers.
Layer Breakdown
Behavioral Risk Signals
Security Findings12
| Severity | Finding | Layer | Location | |
|---|---|---|---|---|
| CRITICAL | Arbitrary command execution Remote code download piped to interpreter Review all shell execution calls. Ensure commands are static (not built from user input), use absolute paths, and are strictly necessary. Prefer library APIs over shell commands. | Manifest | skills/hf-cli/SKILL.md:2 | |
| CRITICAL | Arbitrary command execution Remote code download piped to interpreter Review all shell execution calls. Ensure commands are static (not built from user input), use absolute paths, and are strictly necessary. Prefer library APIs over shell commands. | Manifest | skills/hf-cli/SKILL.md:201 | |
| CRITICAL | Remote code execution: curl/wget pipe to shell Detected a pattern that downloads and immediately executes remote code. This is a primary malware delivery vector. Never pipe curl/wget output directly to a shell interpreter. | Static | skills/hf-cli/SKILL.md:2 | |
| CRITICAL | Remote code execution: curl/wget pipe to shell Detected a pattern that downloads and immediately executes remote code. This is a primary malware delivery vector. Never pipe curl/wget output directly to a shell interpreter. | Static | skills/hf-cli/SKILL.md:201 | |
| CRITICAL | Arbitrary command execution via job definition The `hf jobs run IMAGE COMMAND` and `hf jobs scheduled run SCHEDULE IMAGE COMMAND` commands allow the direct execution of an arbitrary `COMMAND` within a job. An attacker could inject malicious shell commands into the `COMMAND` argument, leading to arbitrary code execution on the Hugging Face job infrastructure. This could be used for data exfiltration, resource abuse, or further compromise. Strictly validate and sanitize the `COMMAND` argument. Consider using a whitelist of allowed commands or sandboxing the execution environment. Avoid directly passing untrusted input to shell execution. | LLM | SKILL.md:95 | |
| CRITICAL | Arbitrary script execution from local file or URL The `hf jobs scheduled uv run SCHEDULE SCRIPT` and `hf jobs uv run SCRIPT` commands allow executing a `SCRIPT` which can be a local file or a URL. If an attacker can control the `SCRIPT` argument, they could provide a URL to a malicious script or a path to a local malicious script, leading to arbitrary code execution on the Hugging Face job infrastructure. This also introduces a supply chain risk by allowing execution of code from arbitrary external sources. Restrict `SCRIPT` to trusted sources (e.g., specific domains, pre-approved scripts). Implement strict validation for local file paths to prevent directory traversal. Sandbox the execution environment. | LLM | SKILL.md:109 | |
| HIGH | Hugging Face token exposure The `hf auth token` command prints the current Hugging Face access token to standard output. If an attacker can trick the AI agent into executing this command, the token could be captured from the agent's output logs or subsequent processing, leading to unauthorized access to the user's Hugging Face account. Implement strict input validation and confirmation prompts before executing commands that expose sensitive credentials. Ensure agent output is not logged or accessible in a way that could leak secrets. | LLM | SKILL.md:30 | |
| HIGH | Installation of arbitrary extensions from GitHub The `hf extensions install REPO_ID` command allows installing extensions from any public GitHub repository. If an attacker can trick the AI agent into providing a malicious `REPO_ID`, arbitrary code could be installed and potentially executed as part of the `hf` CLI's functionality, leading to a supply chain attack. Implement a whitelist or curated list of trusted extension repositories. Require explicit user confirmation for installing extensions from untrusted sources. | LLM | SKILL.md:80 | |
| HIGH | Direct SSH access to Spaces The `hf spaces ssh SPACE_ID` command allows direct SSH access into a Space's Dev Mode container. If an attacker can trick the AI agent into initiating an SSH connection to a controlled or compromised Space, they could gain shell access and execute arbitrary commands within that environment. The `--identity-file PATH` option further exacerbates this by potentially allowing the use of attacker-controlled SSH keys. Restrict the AI agent's ability to initiate SSH connections. If necessary, implement strict whitelisting of allowed `SPACE_ID`s and prevent the use of arbitrary `--identity-file` paths. | LLM | SKILL.md:180 | |
| HIGH | Potential for secret/environment variable exfiltration during repository creation/duplication The `hf repos create` and `hf repos duplicate` commands allow passing `--secrets TEXT`, `--secrets-file TEXT`, `--env TEXT`, and `--env-file TEXT` arguments. An attacker could craft a request to create or duplicate a repository, using these arguments to inject sensitive environment variables or secrets that the AI agent has access to into the newly created repository or a file within it, which could then be retrieved by the attacker. Implement strict validation and sanitization for `--secrets`, `--secrets-file`, `--env`, and `--env-file` arguments. Prevent the AI agent from directly passing sensitive information from its environment to these commands without explicit user confirmation. | LLM | SKILL.md:139 | |
| HIGH | Potential for secret/environment variable exfiltration via Space configuration The `hf spaces secrets add` and `hf spaces variables add` commands allow adding or updating secrets and environment variables for a Space using `--secrets TEXT`, `--secrets-file TEXT`, `--env TEXT`, and `--env-file TEXT`. An attacker could trick the AI agent into adding its own sensitive environment variables or secrets to a Space controlled by the attacker, leading to exfiltration. Implement strict validation and sanitization for `--secrets`, `--secrets-file`, `--env`, and `--env-file` arguments. Prevent the AI agent from directly passing sensitive information from its environment to these commands without explicit user confirmation. | LLM | SKILL.md:170 | |
| HIGH | Data exfiltration via arbitrary webhook URL The `hf webhooks create` command allows specifying an arbitrary `--url TEXT` for the webhook. If an attacker can control this URL, they could configure a webhook to send notifications or data (potentially including sensitive information if the webhook payload contains it) to an attacker-controlled server, leading to data exfiltration. Implement strict validation for the `--url` argument, potentially whitelisting allowed domains or requiring explicit user confirmation for external URLs. | LLM | SKILL.md:190 |
Scan History
Embed Code
[](https://skillshield.io/report/6b96e5e243b88f54)
Powered by SkillShield