git-snapshot-rollback
Fail
Audited by Gen Agent Trust Hub on Mar 1, 2026
Risk Level: HIGHCOMMAND_EXECUTIONPROMPT_INJECTION
Full Analysis
- [COMMAND_EXECUTION]: The Python script
scripts/rollback.pyusessubprocess.run(cmd, shell=True)to execute Git operations. The use ofshell=Truecombined with string interpolation of external variables is a high-risk pattern that facilitates command injection. - [COMMAND_EXECUTION]: User-controlled inputs, specifically the
reasonandtarget_commitarguments, are directly embedded into shell command strings (e.g.,run_cmd(f"git commit -m '... due to {reason}'")). An attacker can provide a string containing shell metacharacters such as;,&, or|to terminate the intended command and execute unauthorized system commands. - [PROMPT_INJECTION]: The skill is highly vulnerable to indirect prompt injection because it processes natural language descriptions (the 'reason' for rollback) and passes them directly to a shell execution context without sanitization.
- Ingestion points: The
reasonandtarget_commitparameters inscripts/rollback.pysourced from user input. - Boundary markers: Absent. There are no delimiters or instructions to the agent or script to treat the input as literal data rather than executable shell content.
- Capability inventory: The script has the capability to perform any Git operation and, via injection, any shell command available to the user running the agent.
- Sanitization: Absent. The script does not use utilities like
shlex.quote()to escape the input before passing it to the shell.
Recommendations
- AI detected serious security threats
Audit Metadata