hugging-face-stat

Warn

Audited by Gen Agent Trust Hub on Sep 16, 2026

Risk Level: MEDIUMDYNAMIC_EXECUTIONCOMMAND_EXECUTIONEXTERNAL_DOWNLOADSINDIRECT_PROMPT_INJECTION
Full Analysis
  • [DYNAMIC_EXECUTION]: The hf_stats.sh script dynamically constructs a Python command by interpolating shell variables into a string passed to python3 -c.
  • Evidence: The script uses the pattern repo_id = '$REPO_ID' inside a block of Python code executed via the shell. Because $REPO_ID (derived from agent/user input) is not sanitized, a value containing a single quote could be used to break out of the string literal and execute arbitrary Python code (e.g., ' + __import__('os').system(...) + ').
  • [COMMAND_EXECUTION]: The skill relies on executing system binaries to fulfill its primary purpose.
  • Evidence: The script hf_stats.sh invokes curl for network requests and python3 for JSON processing.
  • [EXTERNAL_DOWNLOADS]: The skill retrieves data from a well-known external service.
  • Evidence: It uses curl to fetch metadata from official Hugging Face API endpoints such as https://huggingface.co/api/models/. This is documented as functional behavior for interacting with a recognized service.
  • [INDIRECT_PROMPT_INJECTION]: The skill acts as a conduit for untrusted data from an external API, which could potentially contain malicious instructions targeting the agent.
  • Ingestion points: Data is fetched from the Hugging Face API and saved to a temporary file in hf_stats.sh.
  • Boundary markers: Absent. The script outputs formatted text directly to the agent's context without clear delimiters or instructions to ignore embedded commands.
  • Capability inventory: The skill has the ability to execute shell commands (curl, python3) and perform file operations.
  • Sanitization: While the script parses data as JSON, the resulting string values are printed to standard output without further sanitization before being processed by the AI agent.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Sep 16, 2026, 02:52 PM