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.py executes the local codex CLI tool to retrieve account quota information.
  • Evidence: The capture_codex function uses subprocess.Popen to launch the codex app-server and communicate with it via a JSON-RPC interface on stdin/stdout. The executable path is resolved using shutil.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.py reads 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 codex CLI tool.
  • Sanitization: Input data is sanitized using the safe_name utility, Markdown output is escaped in scripts/usage_render.py, and the HTML dashboard implements a strict Content Security Policy.
  • [SAFE]: The skill implements a guarded_path function in scripts/agent_usage.py that 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
Risk Level
SAFE
Analyzed
Nov 2, 2026, 03:02 PM