Repository navigation
docs(trinity): re-check after the audit; patch-state by name, ADR-0123, #404/#132 current #1602
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| # ADR-0123: Keep agent sessions on `trinity` | ||
|
|
||
| **Status:** Accepted · 2026-11 | ||
|
|
||
| ## Context | ||
|
|
||
| `trinity` holds the sensitive tier: the household's photographs, documents, | ||
| budget and vault, and the tier's age key in the operator's home directory. | ||
| The operator account is in `sudo`, `docker` and `lxd`, so anything that runs | ||
| as that account can reach root and every secret on the host. | ||
|
|
||
| The audit of 2026-11-13 found `trinity` also used as a development host: 41 | ||
| worktrees in the deployment checkout, Go and npm caches, two upstream forks | ||
| and their toolchains, language runtimes under `mise`, and Claude Code sessions | ||
| working in the checkout. Third-party code and agents ran as the user holding | ||
| the key. The repository said nothing about it either way. | ||
|
|
||
| `fenrir` met the same finding the same week and was cleared to an appliance, | ||
| Claude Code included (`security.md`, the sensor row). | ||
|
|
||
| ## Decision | ||
|
|
||
| On 2026-11-21 the development tooling left `trinity`: the worktrees, `~/go`, | ||
| `~/.npm`, `~/code/upstream`, the `golang` package, the `mise` languages and the | ||
| development caches. The operator's shell (the dotfiles and their tools) stays. | ||
|
|
||
| **Claude Code stays.** Sessions on `trinity` are how the operator inspects and | ||
| maintains the host: reading its state, running the repository's checks, and | ||
| preparing pull requests from a scratch clone. That is accepted with its cost. | ||
|
|
||
| - Sessions work in a scratch clone for anything they change. The deployment | ||
| checkout is converge's, and changes reach it only through `main`. | ||
| - Language toolchains and upstream forks do not return, and neither does | ||
| `pipx`. `scripts/lint.sh` runs some checks in pinned containers, which | ||
| `homelab-prune-images` clears weekly when unused, and others (yamllint, | ||
| ansible-lint, ruff) through host-side `pipx`. Without `pipx` those skip on | ||
| `trinity`, and CI runs them with `--require-all`. `scripts/validate.sh` | ||
| still runs the repository's own Python scripts on the host. | ||
| - A later audit reads Claude Code on `trinity` as this decision, not as a | ||
| finding. | ||
|
|
||
| ## Consequences | ||
|
|
||
| - **An agent session runs as the account that holds the age key and the | ||
| `docker` group.** A compromised session, or a session that does the wrong | ||
| thing, can read every secret on the tier and reach root. The mitigation is | ||
| the operator watching what each session does and approving its actions; no | ||
| control on the host separates the two. | ||
| - The agent's own dependencies (the Claude Code binary and its updates) are a | ||
| supply chain into the sensitive tier that `compose.yaml` does not pin. | ||
| - Moving agent work to `prometheus` would take the agent's installation and | ||
| its supply chain off `trinity`. It would not take away its reach: `prometheus`'s | ||
| key logs in to the same operator account, with `docker` and `lxd`, so a | ||
| session there could still read the tier's secrets and reach root over SSH. | ||
| Separating the two would need a key or account on `trinity` that cannot do | ||
| that. Either change supersedes this ADR. | ||
| - `fenrir` stays an appliance. The difference is that `trinity` is maintained | ||
| interactively by the operator, and `fenrir` is not. |
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.