agent-restore-context-setup

Pass

Audited by Gen Agent Trust Hub on May 16, 2026

Risk Level: SAFEPROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
  • [PROMPT_INJECTION]: The skill is designed to perform indirect prompt injection as a core feature. It reads the contents of local files matching a specific pattern and injects them verbatim into the model's context during session startup.
  • Ingestion points: The agent-restore-context.sh script reads all files in the project root matching the pattern .agent-restore-context-*.
  • Boundary markers: Absent. The contents are output directly to the model without delimiters or instructions to treat the data as untrusted.
  • Capability inventory: The skill utilizes cat to read files and echo for output formatting within the bash script.
  • Sanitization: Absent. No filtering or validation is performed on the content of the matched files before injection.
  • [COMMAND_EXECUTION]: The skill modifies the agent's configuration files (.claude/settings.json or .claude/settings.local.json) to register a SessionStart hook. This hook automatically executes a local bash script (agent-restore-context.sh) whenever the conversation is cleared or compacted. Additionally, the setup process uses chmod +x to modify the execution permissions of the script.
Audit Metadata
Risk Level
SAFE
Analyzed
May 16, 2026, 05:39 AM
Security Audit — agent-trust-hub — agent-restore-context-setup