skills/modular/skills/serve-model/Gen Agent Trust Hub

serve-model

Pass

Audited by Gen Agent Trust Hub on Aug 28, 2026

Risk Level: SAFEINDIRECT_PROMPT_INJECTIONEXTERNAL_DOWNLOADSREMOTE_CODE_EXECUTIONCOMMAND_EXECUTION
Full Analysis
  • [INDIRECT_PROMPT_INJECTION]: The suggest_serve_command.py script parses untrusted user-provided architecture files (arch.py) and model metadata (config.json). It uses regular expressions to extract values such as architecture names and encodings, which are then interpolated into a shell command suggestion. A malicious model repository could contain metadata crafted to perform command injection if the agent or user executes the suggested output without manual verification.
  • Ingestion points: The script reads arch.py and config.json from the provided architecture package or the Hugging Face Hub.
  • Boundary markers: None. The script directly interpolates extracted values into a command string.
  • Capability inventory: The skill instructions involve executing the generated shell commands using setsid and interacting with the server via curl (SKILL.md).
  • Sanitization: The script performs simple regex extraction and JSON loading but does not implement shell escaping for the resulting command string.
  • [EXTERNAL_DOWNLOADS]: The skill provides instructions to download and install development tools (pixi, uv) from their official project websites. It also configures environment channels for the MAX framework using vendor-owned domains (conda.modular.com, whl.modular.com).
  • [REMOTE_CODE_EXECUTION]: The skill documents the use of the --trust-remote-code flag, which allows the execution of custom Python modeling code included in model repositories (e.g., from Hugging Face). The skill includes explicit security warnings, advising users to only use this flag with trusted repositories as it executes arbitrary code.
  • [COMMAND_EXECUTION]: The skill guides users through the execution of model serving processes, backgrounding tasks with setsid, and performing health checks via curl commands.
Audit Metadata
Risk Level
SAFE
Analyzed
Aug 28, 2026, 07:06 PM
Security Audit — agent-trust-hub — serve-model