Skip to content

feat: add PII and credential auto-redaction in smartRemember - #23

Open
buer5 wants to merge 1 commit into
Goldentrii:mainfrom
buer5:feat/pii-filtering-pr
Open

feat: add PII and credential auto-redaction in smartRemember#23
buer5 wants to merge 1 commit into
Goldentrii:mainfrom
buer5:feat/pii-filtering-pr

Conversation

@buer5

@buer5 buer5 commented Jun 4, 2026

Copy link
Copy Markdown

PR 7: feat/pii-filtering

Summary

  • Add sanitizePIIAndCredentials function in smart-remember.ts to redact API keys, Slack tokens, passwords, bearer tokens, and email addresses.
  • Integrate the filter at the smartRemember entry point so all downstream writes operate on sanitized content.
  • Add unit test covering PII redaction in smart-routing.test.mjs.

Why

The remember() interface has no content filtering — sensitive data like API keys (sk-proj-...), Slack tokens (xoxb-...), passwords, and emails can be persisted in plaintext to local Markdown/JSON files, creating a security risk if the memory directory is shared or leaked.

Tests

npm run build
npm test

Test output:

✔ Smart routing — smartRemember
  ✔ filters PII and credentials in smartRemember (445.9274ms)

Note

Non-sensitive content passes through unchanged. The filter runs only at the smartRemember entry point, so there is zero performance impact on read paths.

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.

1 participant