Repository navigation
feat(security): encrypt summaries, author names and backups at rest - #56
Merged
Merged
Conversation
- Event summaries and message snapshot author tags are encrypted with the existing AES-256-GCM key; legacy rows are encrypted in batches at startup. - History search: IDs match actor/target/channel; free text is matched after decryption within the latest 5,000 events of the filter. - Pre-deploy database backups are streamed into age, encrypted to a public key; the private key stays off the VPS. Unencrypted dumps are removed. - DEPLOYMENT.md: backup key setup and restore; shutdown procedure. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
What and why
Discord Developer Terms §5(c) require encryption of API data at rest, and §9(b) deletion of all data when the app stops operating.
summaryandMessageSnapshot.authorTagare now encrypted (AES-256-GCM, same key and format as the other fields). Existing plaintext rows are encrypted in batches when the bot starts; reads tolerate both formats.searchWindowis returned when the window is full).ops/sentinel-deploy: pre-deploy dumps are streamed intoage -R backup-recipients.txt, never written in clear; deploy aborts without age or a public key. Old unencrypted dumps are deleted after the first encrypted one. Requires manual setup on the VPS before installing the new script (DEPLOYMENT.md → Backups).How it was tested
CI (typecheck, tests, migrations,
sh -non ops scripts).🤖 Generated with Claude Code