codex-session-recovery

Pass

Audited by Gen Agent Trust Hub on Oct 19, 2026

Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTION
Full Analysis
  • [COMMAND_EXECUTION]: The script codex_session_recovery.py invokes the codex binary and system utilities such as lsof, zstd, and git using subprocess.run and subprocess.Popen. These calls are implemented using argument lists rather than shell strings, which prevents command injection. The use of these tools is central to the skill's purpose of session recovery and diagnostics.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes session history files (rollout.jsonl), creating a potential surface for indirect prompt injection. However, the implementation includes multiple safeguards, such as the excludeTurns: true flag during session resumption and a dedicated canary check that validates model responsiveness against a random token while explicitly monitoring for and blocking unauthorized tool calls.
  • [CREDENTIALS_UNSAFE]: The skill implements a redact_text function that uses regular expressions to identify and remove OpenAI API keys and Bearer tokens from diagnostic outputs and logs. This is a security-enhancing feature designed to prevent the accidental exposure of sensitive credentials during the recovery process.
  • [SAFE]: The tool employs robust file security measures, including the use of advisory per-session locks to prevent race conditions, verification of file integrity through inode and SHA-256 hash checks, and the enforcement of private file permissions (0700 for directories, 0600 for files) for all session backups.
Audit Metadata
Risk Level
SAFE
Analyzed
Oct 19, 2026, 06:28 PM