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.pyinvokes thecodexbinary and system utilities such aslsof,zstd, andgitusingsubprocess.runandsubprocess.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 theexcludeTurns: trueflag during session resumption and a dedicatedcanarycheck that validates model responsiveness against a random token while explicitly monitoring for and blocking unauthorized tool calls. - [CREDENTIALS_UNSAFE]: The skill implements a
redact_textfunction 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 (
0700for directories,0600for files) for all session backups.
Audit Metadata