filesystem-context

Fail

Audited by Gen Agent Trust Hub on Sep 9, 2026

Risk Level: HIGHCOMMAND_EXECUTIONREMOTE_CODE_EXECUTIONDATA_EXFILTRATIONPERSISTENCEINDIRECT_PROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The implementation of TerminalCapture.run_command in references/implementation-patterns.md uses subprocess.run(command, shell=True). This pattern allows for arbitrary shell command execution, which is extremely dangerous if the command string is influenced by an AI agent or untrusted input.
  • [DATA_EXFILTRATION]: The AgentWorkspace.read_peer_findings method in references/implementation-patterns.md is vulnerable to path traversal attacks. It constructs file paths by joining a base directory with a user-supplied peer_id without validation, potentially allowing an attacker to read files on the system outside the intended workspace if a malicious ID (e.g., ../../etc) is provided.
  • [PERSISTENCE]: The "Learning Through Self-Modification" pattern (Pattern 6 in SKILL.md) and its implementation in PreferenceStore (references/implementation-patterns.md) encourage agents to update their own instruction files. This creates a persistence mechanism where malicious instructions injected during one session can permanently alter the agent's behavior in all future sessions.
  • [INDIRECT_PROMPT_INJECTION]: The skill's architecture is designed to ingest large amounts of potentially untrusted data from the filesystem into the agent's prompt context, creating a significant injection surface.
  • Ingestion points: Content is read from files in ScratchPadManager.offload, AgentWorkspace.read_peer_findings, and SkillLoader.load_skill within references/implementation-patterns.md.
  • Boundary markers: No delimiters or protective instructions are implemented in the provided patterns to isolate ingested data from the system prompt or to instruct the agent to ignore embedded commands.
  • Capability inventory: The skill provides access to high-privilege capabilities, including arbitrary shell execution via the TerminalCapture class and file modification via the PreferenceStore and AgentWorkspace classes.
  • Sanitization: There is no evidence of sanitization, escaping, or validation of the content read from files before it is processed by the agent or returned to the conversation history.
Recommendations
  • AI detected serious security threats
Audit Metadata
Risk Level
HIGH
Analyzed
Sep 9, 2026, 04:48 PM