agent-usage-analytics
Pass
Audited by Gen Agent Trust Hub on Nov 2, 2026
Risk Level: SAFEINDIRECT_PROMPT_INJECTIONCOMMAND_EXECUTION
Full Analysis
- [COMMAND_EXECUTION]: The script
scripts/agent_usage.pyexecutes the localcodexCLI tool to retrieve account quota information. - Evidence: The
capture_codexfunction usessubprocess.Popento launch thecodex app-serverand communicate with it via a JSON-RPC interface on stdin/stdout. The executable path is resolved usingshutil.which. - [INDIRECT_PROMPT_INJECTION]: The skill processes agent conversation transcripts (e.g., from Claude or Codex rollouts) which could contain malicious instructions designed to influence the agent during the analysis process.
- Ingestion points:
scripts/usage_collectors.pyreads local log files and databases from multiple agent types (Codex, Claude, Copilot, Grok, and Antigravity). - Boundary markers: The skill performs deterministic analysis (token counting, character measurement, and regex-based classification) rather than passing the raw content back to an LLM for interpretation.
- Capability inventory: The skill writes local reports (JSON, Markdown, HTML), maintains a local SQLite ledger, and interacts with the
codexCLI tool. - Sanitization: Input data is sanitized using the
safe_nameutility, Markdown output is escaped inscripts/usage_render.py, and the HTML dashboard implements a strict Content Security Policy. - [SAFE]: The skill implements a
guarded_pathfunction inscripts/agent_usage.pythat explicitly prevents the reading of common credential and configuration files (e.g.,.env,auth.json,secrets.env,credentials.json,hosts.yml). - [SAFE]: The generated HTML dashboard (
assets/dashboard.html) includes a highly restrictive Content Security Policy (CSP) that prevents the execution of external scripts, image loading from remote sources, and form actions, significantly mitigating XSS and data exfiltration risks.
Audit Metadata