Repository navigation
Memory Safety
Railroad now guards Claude Code's persistent memory system against misuse. Agent memory writes are classified, filtered, and tracked automatically.
What's new
- Content classification — memory writes are classified as secret, behavioral, or factual using pattern matching (API keys, JWTs, private keys, AWS credentials, connection strings, behavioral override attempts)
- Write guard — secrets are blocked outright; behavioral instructions require human approval; factual content is allowed. Bash commands targeting memory paths (rm, echo >) are blocked
- Append-only enforcement — existing memory files cannot be silently overwritten or deleted; modifications require human approval
- Provenance tracking — every memory write is signed with a content hash, session ID, timestamp, and classification. Tampering between sessions is detected via
railroad memory verify - Conflict detection — duplicate memory entries (same name) are flagged before write
Attack scenarios tested
- Secret exfiltration via memory storage → blocked
- Behavioral injection ("skip safety checks") → requires approval
- Memory deletion via bash (
rm -rf) → blocked - Overwriting trusted memories → requires approval
- Out-of-band file tampering → detected by provenance
Full Changelog: v0.3.4...v0.4.0