magpie-optimizer
Pass
Audited by Gen Agent Trust Hub on Nov 4, 2026
Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The skill frequently uses the
subprocess.runfunction across multiple scripts (magpie_route.py,magpie_preflight.py, etc.) to interact with the externalmagpieCLI and system utilities likeps. These interactions are used to query environment state and apply routing configurations. The calls are implemented using argument lists rather than shell strings, which mitigates standard shell injection risks. - [INDIRECT_PROMPT_INJECTION]: The skill script
magpie_observe.pyingests telemetry data—including prompt metadata and tool call counts—from a local gateway API. While this data is used for diagnostic visualization, it represents an attack surface where malicious data returned by the local API could influence the agent's interpretation of work efficiency. - [DYNAMIC_EXECUTION]: The unit test utility
scripts/test_preflight_inventory.pyemploys the__import__function to dynamically load the skill's logic modules for verification. This is limited to local file loading for testing purposes. - [SENSITIVE_FILE_ACCESS]: The skill accesses sensitive local paths including
~/.config/magpie/providers.json(which contains API keys) and/etc/hosts. This access is essential for its primary purpose of model routing management. To ensure security, the skill implements a strict desensitization layer that projects only non-sensitive fields and redacts all credential material before processing or reporting.
Audit Metadata