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.pyutilizesos.startfileandwebbrowser.opento launch the generated HTML report in the system's default web browser. - [COMMAND_EXECUTION]: The test utility
scripts/test_codex_token_usage.pyemployssubprocess.runto 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.pyreads*.jsonlfiles from the~/.codex/sessionsandarchived_sessionsdirectories. - 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_htmlfunction inscripts/codex_token_usage.pyperforms 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.pyuses__import__('os')to dynamically access environment variables during subprocess execution setup.
Audit Metadata