The harness is public code with no data. Your bot’s brain is different — it’s personal info, schedules, notes, maybe finances. Treat it accordingly.
Private-alone protects against casual exposure; git-crypt protects against a leak. For a personal brain, do both.
Encrypt everything except a README signpost. Use
templates/gitattributes-encrypt-all.example.
What you keep: locally — on any machine holding the key — git diff,
git log -p, git show, and git blame all show plaintext. git-crypt
installs a diff=git-crypt filter that decrypts transparently for display, and
your working tree is always plaintext, so the agent reads files normally.
What you give up: on github.com the files are opaque blobs (“Binary files differ”) — no browsing, no rendering, no PR diffs. That’s fine: the remote is a pure encrypted backup, and you’d never want to read that data on the GitHub website anyway.
The cipher is AES-256 in CTR mode — no known practical break, and git-crypt is written by a respected security engineer (AGWA). The weaknesses are not attacks on the math; they’re inherent, documented properties:
.gitattributes, or a file added before it’s covered, silently pushes in
plaintext. And the working tree is always plaintext on unlocked machines,
so machine security matters.Verify, don’t trust: after setup and periodically, run git-crypt status to
confirm which files are actually encrypted, and spot-check that a file looks like
a binary blob on GitHub. This catches the .gitattributes footgun before it
leaks anything.
If you’d rather keep most of the brain browsable on GitHub and encrypt just the
crown jewels (finances, passwords, IDs), use
templates/gitattributes-vault.example
and put sensitive files under vault/.
⚠️ Set this up before committing sensitive content. git-crypt only encrypts files committed after it’s configured — retrofitting does not scrub what’s already in history. If you started in plaintext, the clean fix is a fresh repo.
# In your (empty) private bot repo:
brew install git-crypt # or: apt-get install git-crypt
git-crypt init
cp <harness>/templates/gitattributes-encrypt-all.example .gitattributes
git add .gitattributes && git commit -m "Encrypt brain with git-crypt"
# Export the key and back it up somewhere safe (NOT in this repo):
git-crypt export-key ~/bot-brain.key
On another machine that should decrypt (e.g. a backup box), unlock with the key:
git clone <private-repo> && cd <repo>
git-crypt unlock ~/bot-brain.key
You can also add GPG recipients (git-crypt add-gpg-user <key-id>) instead of a
shared symmetric key.
The key is the brain. Lose it and the GitHub copy is unrecoverable ciphertext.
memory/.Even inside an encrypted repo, live secrets don’t belong in git. A bot token,
API key, or password should live in a file outside the repo (the
bot’s declaration, ~/.seeyourai/bots/<name>.env, chmod 600, is one). Encryption
protects data at rest; keeping secrets out of git protects against the key or a
working-tree clone leaking an active credential.