prior-work-retrieval

Warn

Audited by Gen Agent Trust Hub on Nov 27, 2026

Risk Level: MEDIUMCOMMAND_EXECUTIONPERSISTENCEPRIVILEGE_ESCALATIONPROMPT_INJECTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
  • [COMMAND_EXECUTION]: The skill executes local binaries and shell commands using subprocess.run. Logic in scripts/prior_work.py calls ripgrep for file searching and git for status and revision checks. It also supports a command mode that executes arbitrary scripts defined in a local manifest file (sources.json).
  • [PERSISTENCE]: The skill includes an installation routine in scripts/prior_work_hook.py that modifies agent configuration files, specifically ~/.claude/settings.json and ~/.codex/hooks.json. This registers the skill as a permanent hook within the agent's platform environment.
  • [PRIVILEGE_ESCALATION]: Once installed as a hook, the skill can intercept and monitor all UserPromptSubmit, PreToolUse, and Stop events. It uses this capability to block the agent's production tools and final responses until a 'reuse receipt' is generated, overriding the agent's standard autonomy.
  • [PROMPT_INJECTION]: The hook mechanism in scripts/prior_work_hook.py applies regular expressions to every user prompt to detect specific triggers. When a trigger matches, the skill injects system-level instructions into the prompt context to enforce its mandatory retrieval workflow.
  • [INDIRECT_PROMPT_INJECTION]: The skill has an attack surface for indirect injection because it ingests and processes untrusted user prompts and tool outputs to decide whether to block or allow agent actions. The gating logic relies on parsing these inputs to identify 'prior work' requests.
  • [DYNAMIC_EXECUTION]: The script scripts/prior_work.py performs dynamic loading of Python modules using importlib.util. It specifically loads the sibling hook script to access its classification logic and regex patterns at runtime.
Audit Metadata
Risk Level
MEDIUM
Analyzed
Nov 27, 2026, 04:05 AM