Skip to content

[codex] Redact tool call log arguments - #424

Open
Dreamstore2046 wants to merge 1 commit into
harystyleseze:mainfrom
Dreamstore2046:codex/careguard-tool-log-redaction-242
Open

[codex] Redact tool call log arguments#424
Dreamstore2046 wants to merge 1 commit into
harystyleseze:mainfrom
Dreamstore2046:codex/careguard-tool-log-redaction-242

Conversation

@Dreamstore2046

Copy link
Copy Markdown

Summary

Closes #242.

Replaces arbitrary 100-character tool argument truncation with explicit structured redaction:

  • adds SAFE_TOOL_LOG_FIELDS with a per-tool allowlist
  • redacts all non-allowlisted fields as <redacted: field_name>
  • defaults unknown tools to redact every input field
  • updates agent/server.ts to log structured redacted args instead of sliced JSON
  • documents the convention in docs/observability/redaction.md
  • adds Vitest coverage for every allowlisted tool shape, structured logger output, and unknown-tool defaults

Validation

  • npm test -- agent/__tests__/tool-log-redaction.test.ts
  • npx tsc --noEmit --target ES2022 --module ESNext --moduleResolution bundler --allowImportingTsExtensions --esModuleInterop --allowSyntheticDefaultImports --strict --skipLibCheck --types node,vitest agent/tool-log-redaction.ts agent/__tests__/tool-log-redaction.test.ts
  • git diff --check

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

@Dreamstore2046 is attempting to deploy a commit to the Harrison Eze's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Tool-call args truncated to 100 chars — sensitive amounts may slip through

1 participant