Skip to content

fix(privacy): redact credentials at capture and memory-write boundaries - #483

Merged
EyJunge1 merged 2 commits into
tickernelz:mainfrom
Phototonic:fix/credential-redaction-boundaries
Nov 3, 2026
Merged

EyJunge1 merged 2 commits into
tickernelz:mainfrom
Phototonic:fix/credential-redaction-boundaries

Conversation

@Phototonic

Copy link
Copy Markdown
Contributor

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

  • Exercised the change locally (or N/A for docs/meta-only)
  • Noted any follow-up or known limitations

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.

  • 45 focused privacy/boundary tests passed, including actual storage/provider boundaries, fallback, truncation, serialization and diagnostics.
  • bun test --timeout 30000: 1,140 passed, 4 skipped, 0 failed; 8,378 assertions.
  • Build, formatting, lint, typecheck and patch-apply checks passed.
  • A synthetic corpus of 134 credential-format/idempotence checks passed. Fixtures use fabricated credentials, not user data or production measurements.
  • The default five-second test timeout also failed on pristine upstream; repository timeout settings are unchanged. No Windows/macOS or live-provider validation is claimed.

Checklist

  • Branch is based on main (do not open PRs from commits already on main)
  • bun test passes (or N/A)
  • bun run typecheck passes (or N/A)
  • bun run check passes (format + lint + typecheck; or N/A)
  • Docs / README updated when behavior or contribution process changes

@Phototonic
Phototonic marked this pull request as ready for review November 3, 2026 04:58
@EyJunge1
EyJunge1 merged commit f2163b5 into tickernelz:main Nov 3, 2026
7 checks passed
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.

2 participants