Overview
EchoVault implements a comprehensive 3-layer redaction system to ensure API keys, passwords, and other sensitive data never make it into your memory vault.The Three Layers
From~/workspace/source/src/memory/redaction.py:1-9, the system uses three progressive layers of protection:
Layer 2: Pattern Detection
Automatic detection of known secret formats (API keys, tokens, passwords).
Layer 1: Explicit Redaction Tags
Wrap sensitive content in<redacted> tags to explicitly mark it for removal:
Tag Handling
From~/workspace/source/src/memory/redaction.py:49-59, the implementation handles nested and multiline tags:
Layer 2: Automatic Pattern Detection
EchoVault automatically detects and redacts common secret patterns:Supported Patterns
Supported Patterns
From All patterns are case-insensitive.
~/workspace/source/src/memory/redaction.py:14-26, the built-in patterns include:Pattern Examples
Pattern Examples
Before redaction:After redaction:
Pattern detection is automatic and always active. You don’t need to configure anything - it just works.
Layer 3: Custom Patterns (.memoryignore)
For project-specific sensitive data, create a.memoryignore file:
File Format
From~/workspace/source/src/memory/redaction.py:69-105, the parser supports:
- One regex pattern per line
- Comments starting with
# - Empty lines (ignored)
- Raw regex syntax (no quotes or delimiters needed)
Pattern Testing
Test your patterns before deploying:Redaction Pipeline
When you save a memory, all text fields are redacted: From~/workspace/source/src/memory/core.py:211-218:
what(always)why(if present)impact(if present)details(if present)
title(for better search UX)tags(assumed to be safe metadata)category(enum value)related_files(file paths)
If you need to redact titles or tags, wrap them in
<redacted> tags explicitly.Best Practices
Use Explicit Tags
When you know something is sensitive, wrap it in
<redacted> tags immediately. Don’t rely solely on pattern detection.Test Your Patterns
Before adding patterns to
.memoryignore, test them with sample data to avoid over-redaction.Avoid Secrets Entirely
The best practice is to not include secrets in memory saves at all. Reference them indirectly when possible.
Review Session Files
Periodically review files in
~/.memory/vault/ to ensure no secrets slipped through.Examples
Good: Redacted Reference
Bad: Secret in Title
Better: Generic Title
Redaction Guarantees
What is guaranteed:
- All known secret patterns are redacted before database insert
- All explicit
<redacted>tags are replaced with[REDACTED] - Custom
.memoryignorepatterns are applied to all text fields - Redaction happens before markdown file write
- Secrets with unknown formats that don’t match any pattern
- Secrets in unusual encodings (base64, hex) that don’t match JWT pattern
- Secrets in file paths or code structure (these require explicit tags)
Recovery
Once content is redacted, it cannot be recovered. The original text is never stored. If you accidentally redacted something important:- Check your shell history for the original command
- Look in agent logs (if the agent logged the original content)
- Recreate the memory with corrected content