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
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
serializeHookAuditFragment()fromcodex-cli-hooks-shared.tsfor bothmetadata.parametersandmetadata.result.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 inactions.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_emailparameters and result do not contain recipient, subject, or body.codex-cli-hooks-shared.test.ts: Google field redaction in structured args and text output.Note: branch is
fix-opencode-google-audit-redactionbecause the remote already has a branch namedfix, which blocksfix/*ref names.Made with Cursor