Repository navigation
fix(privacy): redact credentials at capture and memory-write boundaries - #483
Merged
EyJunge1 merged 2 commits intoNov 3, 2026
Merged
Conversation
Phototonic
marked this pull request as ready for review
November 3, 2026 04:58
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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
Captured prompts and tool evidence could retain recognizable credentials in memory storage and capture-provider requests. This adds a shared deterministic sanitizer for recognizable credential formats while preserving explicit private-tag handling and useful surrounding context.
It covers pending prompts and evidence, capture-provider requests and fallback, generated summaries/tags, embedding inputs, explicit memory additions and supplied shared-client content/tag updates, Turso and plugin-created Markdown writes, and diagnostics. Redaction happens before truncation or JSON escaping. Conservative rules preserve hashes, IDs, ordinary code, obvious placeholders and bearer-authentication prose. No dependencies, additional AI calls or historical migration are introduced.
Protection is deliberately bounded: custom, all-letter and encoded secrets can be missed. This cannot protect original OpenCode traffic, erase historical data, or universally cover independent web API, import, Markdown reconciliation, profile and dreaming ingestion paths. Historical type-only updates retain their existing re-embedding behavior. This addresses a protection gap; no live user data or observed credential incident is involved.
Test plan
Validation was performed in an isolated Linux cloud checkout at base
a66d349f350b0f096b50040525b106cab16fdba5; the exact tested patch was transferred unchanged for publication. Tests were not rerun on the publishing desktop.bun test --timeout 30000: 1,140 passed, 4 skipped, 0 failed; 8,378 assertions.Checklist
main(do not open PRs from commits already onmain)bun testpasses (or N/A)bun run typecheckpasses (or N/A)bun run checkpasses (format + lint + typecheck; or N/A)