ops: rotate credentials exposed in a session transcript #44

Open
opened 2026-11-05 08:37:06 +00:00 by david · 0 comments
Owner

During a debugging session, a sed over ~/.config/mise/config.toml printed values that should not have been echoed, and a later docker inspect grep printed the knox node's KNOX_AUTH_TOKEN.

Exposure

Session transcripts (persisted in opencode.db and indexed by knox) plus the opencode log contain:

  • Gitea personal access token
  • Backblaze API key and key id
  • Grafana service-account token
  • Home Assistant long-lived token
  • GLINET admin password
  • the knox node auth token (shared by the laptop peer and the always-on node)

No values are recorded here.

Action

  1. Rotate each credential at its source.
  2. KNOX_AUTH_TOKEN: regenerate, re-encrypt tf-net/apps/knox/secrets/knox.env.sops, redeploy, and update ~/.config/knox/knox.env on the laptop.
  3. Consider scrubbing the affected observations (UPDATE observations SET content = replace(...)) and reconciling — optional once the values are dead.

Root cause worth fixing

internal/ingest/redact.go is only applied to snippets; session ingestion stores everything verbatim. Extending redaction to session content would stop the next one.

During a debugging session, a `sed` over `~/.config/mise/config.toml` printed values that should not have been echoed, and a later `docker inspect` grep printed the knox node's `KNOX_AUTH_TOKEN`. ## Exposure Session transcripts (persisted in `opencode.db` and indexed by knox) plus the opencode log contain: - Gitea personal access token - Backblaze API key and key id - Grafana service-account token - Home Assistant long-lived token - GLINET admin password - the knox node auth token (shared by the laptop peer and the always-on node) No values are recorded here. ## Action 1. Rotate each credential at its source. 2. `KNOX_AUTH_TOKEN`: regenerate, re-encrypt `tf-net/apps/knox/secrets/knox.env.sops`, redeploy, and update `~/.config/knox/knox.env` on the laptop. 3. Consider scrubbing the affected observations (`UPDATE observations SET content = replace(...)`) and reconciling — optional once the values are dead. ## Root cause worth fixing `internal/ingest/redact.go` is only applied to **snippets**; session ingestion stores everything verbatim. Extending redaction to session content would stop the next one.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: david/knox#44