Repository navigation
Keep one .env backup instead of one per run - #78
Merged
Merged
Conversation
env_set.py made a new .env.bak-YYYYmmdd-HHMMSS copy of the secrets on every run and never pruned them (six piled up on the server on 2026-11-22 alone). It now keeps a single .env.bak, overwritten each run, mode 600. The Dependency-Track runbook uses the same name, and .gitignore now ignores .env.bak / *.env.bak (the old patterns stay). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BTHimXjrtArDbsDweyjkYz
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.
Before
infrastructure/homelab-mcp/scripts/env_set.pycopied.envto a new.env.bak-YYYYmmdd-HHMMSSon every run and never pruned. Six such copies built up on the server on 2026-11-22.docs/dependency-track.md) made a dated.env.<date>-pre-deptrack.bakby hand..gitignoreignored.env.bak-*and*.env.backupbut not a plain.env.bak.After
env_set.pykeeps a single.env.bak, mode 600, overwritten on every run. There's still at most one backup per run, and none when the input is refused..env.bak..gitignorealso ignores.env.bakand*.env.bak; the old patterns stay..env), and a stale world-readable.env.bakis overwritten and set to 600.Context: the 13 leftover
.envcopies on 83rr-poweredge were deleted today at Mark's request, after checking that nothing referenced them and that the live.envhas every key they held (except the retiredSENDGRID_API_KEY).Testing
.venv/bin/python -m pytest -q infrastructure/homelab-mcp/tests→ 76 passed. The repo has no CI workflows.Deploy:
env_set.pyis a host script, run from the server checkout (the image copies onlyapp/), so agit pullon the server makes it live. No rebuild needed.🤖 Generated with Claude Code
https://claude.ai/code/session_01BTHimXjrtArDbsDweyjkYz