Skip to content
This repository was archived by the owner on Jul 19, 2026. It is now read-only.

fix: redact Google user data in OpenCode audit metadata - #187

Merged
rachellerathbone merged 1 commit into
mainfrom
fix-opencode-google-audit-redaction
Jul 11, 2026
Merged

fix: redact Google user data in OpenCode audit metadata#187
rachellerathbone merged 1 commit into
mainfrom
fix-opencode-google-audit-redaction

Conversation

@rachellerathbone

Copy link
Copy Markdown
Contributor

Summary

  • OpenCode plugin now uses serializeHookAuditFragment() from codex-cli-hooks-shared.ts for both metadata.parameters and metadata.result.
  • Extended the shared helper to redact Google user-data fields (to, subject, body, query, etc.) and common patterns in free-text tool output.

Why this matters

The Google user data investigation (multicorn-service/docs/google-user-data-investigation-2026-07-11.md) found the OpenCode plugin stored Gmail arguments and up to 500 characters of raw tool output in actions.metadata. That is Google user content persisted in our database, which fails CASA restricted-scope checks.

How verified

  • plugins/opencode/multicorn-shield.test.ts: gmail_send_email parameters and result do not contain recipient, subject, or body.
  • codex-cli-hooks-shared.test.ts: Google field redaction in structured args and text output.
  • Full shield test suite passes.

Note: branch is fix-opencode-google-audit-redaction because the remote already has a branch named fix, which blocks fix/* ref names.

Made with Cursor

Reuses the Codex CLI audit serialisation helper so Gmail arguments and
tool output are redacted before they are stored in actions.metadata.

Co-authored-by: Cursor <cursoragent@cursor.com>
@rachellerathbone
rachellerathbone merged commit 9fb6172 into main Jul 11, 2026
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant