pexpect-cli

Warn

Audited by Gen Agent Trust Hub on Mar 31, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONCREDENTIALS_UNSAFEPROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The pexpect_exec tool allows the agent to execute arbitrary Python code. As demonstrated in the SKILL.md examples, this code can use pexpect.spawn() to initiate shell processes (like SSH), effectively giving the agent broad command execution capabilities on the host system or remote targets.
  • [CREDENTIALS_UNSAFE]: The provided workflow instructions include examples of handling passwords using child.sendline('mypassword'). This promotes the insecure practice of embedding credentials directly into the automation scripts processed by the agent.
  • [PROMPT_INJECTION]: The skill exposes an indirect prompt injection surface where untrusted data from external systems can influence agent behavior.
  • Ingestion points: Untrusted data enters the agent context through CLI output captured by child.before.decode() as described in SKILL.md.
  • Boundary markers: There are no markers or instructions to help the agent distinguish between its own logic and potentially malicious instructions embedded in the output of the programs it automates.
  • Capability inventory: The skill provides high-privilege capabilities including arbitrary Python execution and shell command spawning via pexpect_exec.
  • Sanitization: No sanitization, filtering, or validation is performed on the data read from the interactive sessions before the agent processes it.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Mar 31, 2026, 01:07 PM