feat: disinto secrets migrate — encrypt existing plaintext .env #33
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of #25 (credentials at rest).
What
disinto secrets migratetakes the existing plaintext.env, encrypts it to.env.encusing SOPS + age, and removes the plaintext file.Implementation
The scaffolding already exists in
bin/disinto(disinto_secretsfunction,ensure_age_key,write_sops_yaml). Wire it up:ensure_age_key— generate age key if not exists.sops.yamlwith public keysops --encrypt .env > .env.encsops -d .env.enc > /dev/null.envenv.shalready handles the.env.encpath — it checks for.env.encfirst, falls back to.env.Affected files
bin/disinto(secrets migratesubcommand — mostly wiring existing code)Acceptance criteria
disinto secrets migrateencrypts.env→.env.enc.envremoved after successful encryptionenv.shdecrypts.env.enccorrectly (stack still starts).sops.yamlcreated with age public key