Skip to content

[codex] sanitize tool analytics args#892

Open
EfeDurmaz16 wants to merge 1 commit into
paradigmxyz:mainfrom
EfeDurmaz16:codex/sanitize-tool-analytics-args
Open

[codex] sanitize tool analytics args#892
EfeDurmaz16 wants to merge 1 commit into
paradigmxyz:mainfrom
EfeDurmaz16:codex/sanitize-tool-analytics-args

Conversation

@EfeDurmaz16

Copy link
Copy Markdown

Summary

  • sanitize centaur-tools audit argument capture by default so tool-call logs keep command shape/counts without raw payloads
  • add CENTAUR_TOOL_ANALYTICS_ARGS_MODE (shape, raw, off) and surface tool_args_redacted in vlogs results
  • document the new sandbox env var

Why

Tool shim analytics currently write raw CLI args into structured logs. Those args can include prompt text, JSON payloads, API key flags, auth headers, or raw tokens, which conflicts with the repo logging contract for secrets and auth material.

Validation

  • PYTHONPYCACHEPREFIX=/private/tmp/centaur-pycache /opt/homebrew/bin/python3.14 -m unittest test_install_tool_shims.py
  • PYTHONPYCACHEPREFIX=/private/tmp/centaur-pycache /opt/homebrew/bin/python3.14 -m py_compile services/sandbox/install_tool_shims.py services/sandbox/test_install_tool_shims.py tools/infra/vlogs/client.py tools/infra/vlogs/tests/test_client.py
  • UV_CACHE_DIR=/private/tmp/uv-cache PYTHONPYCACHEPREFIX=/private/tmp/centaur-pycache PYTHONPATH=tools/infra /Users/efebarandurmaz/.local/bin/uv run --no-editable --with pytest --with ruff --project tools/infra/vlogs python -m pytest tools/infra/vlogs/tests/test_client.py
  • UV_CACHE_DIR=/private/tmp/uv-cache /Users/efebarandurmaz/.local/bin/uv run --with ruff ruff check services/sandbox/install_tool_shims.py services/sandbox/test_install_tool_shims.py tools/infra/vlogs/client.py tools/infra/vlogs/tests/test_client.py
  • git diff --check

Notes

  • raw mode preserves the previous exact-argument behavior for deployments that intentionally want full args.
  • Attempted just build-one sandbox; Docker reached OrbStack, but the local Docker install is missing the buildx component required for BuildKit.

@EfeDurmaz16 EfeDurmaz16 marked this pull request as ready for review July 3, 2026 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant