codex-token-usage

Pass

Audited by Gen Agent Trust Hub on Sep 16, 2026

Risk Level: SAFECOMMAND_EXECUTIONINDIRECT_PROMPT_INJECTIONDYNAMIC_EXECUTION
Full Analysis
  • [COMMAND_EXECUTION]: The script scripts/codex_token_usage.py utilizes os.startfile and webbrowser.open to launch the generated HTML report in the system's default web browser.
  • [COMMAND_EXECUTION]: The test utility scripts/test_codex_token_usage.py employs subprocess.run to execute the main token usage script for validation purposes.
  • [INDIRECT_PROMPT_INJECTION]: The skill processes local Codex session logs from the user's home directory.
  • Ingestion points: scripts/codex_token_usage.py reads *.jsonl files from the ~/.codex/sessions and archived_sessions directories.
  • Boundary markers: None; the script extracts specific numeric and date fields rather than interpolating raw text directly into prompts.
  • Capability inventory: The skill can read local files, write HTML files to the workspace, and initiate browser processes.
  • Sanitization: The render_html function in scripts/codex_token_usage.py performs HTML entity escaping for &, <, and > before embedding the JSON data into the dashboard template to mitigate script injection risks.
  • [DYNAMIC_EXECUTION]: The test script scripts/test_codex_token_usage.py uses __import__('os') to dynamically access environment variables during subprocess execution setup.
Audit Metadata
Risk Level
SAFE
Analyzed
Sep 16, 2026, 02:54 AM